RibbonSummaryStatistics::RibbonSummaryStatistics(QWidget *parent) : RibbonWidget(parent), ui(new Ui::RibbonSummaryStatistics) { ui->setupUi(this); addRibbonButton(ui->bfFromTButton); addRibbonButton(ui->regressionButton); addRibbonButton(ui->frequenciesButton); ui->bfFromTButton->setDataSetNotNeeded(); ui->regressionButton->setDataSetNotNeeded(); ui->frequenciesButton->setDataSetNotNeeded(); QMenu *menu; menu = new QMenu(this); menu->addAction(QString("Bayesian Independent Samples T-Test"), this, SLOT(itemSelected()))->setObjectName("BFFromTIndependentSamples"); menu->addAction(QString("Bayesian Paired Samples T-Test"), this, SLOT(itemSelected()))->setObjectName("BFFromTPairedSamples"); menu->addAction(QString("Bayesian One Sample T-Test"), this, SLOT(itemSelected()))->setObjectName("BFFromTOneSample"); ui->bfFromTButton->setMenu(menu); menu = new QMenu(this); menu->addAction(QString("Bayesian Linear Regression"), this, SLOT(itemSelected()))->setObjectName("RegressionBayesianSummaryStatistics"); ui->regressionButton->setMenu(menu); menu = new QMenu(this); menu->addAction(QString("Bayesian Binomial Test"), this, SLOT(itemSelected()))->setObjectName("BinomialBayesianSummaryStatistics"); ui->frequenciesButton->setMenu(menu); }
void FindFilesDialog::slotItemSelected(const QString& item) { KILE_DEBUG() << "\tgrep: start item selected"; int pos; QString filename, linenumber; QString str = item; if((pos = str.indexOf(':')) != -1) { filename = str.left(pos); str = str.right(str.length() - 1 - pos); if((pos = str.indexOf(':')) != -1) { linenumber = str.left(pos); QFileInfo fileInfo(filename); if(fileInfo.isAbsolute()) { emit itemSelected(filename, linenumber.toInt()); } else if(m_mode == KileGrep::Project) { emit itemSelected(m_projectdir + QDir::separator() + filename, linenumber.toInt()); } else { emit itemSelected(dir_combo->comboBox()->itemText(0) + QDir::separator() + filename, linenumber.toInt()); } } } }
void SelectorWidget::mouseReleaseEvent(QMouseEvent *event) { int flag = flagAt(event->x(), event->y()); if (event->button()==Qt::LeftButton) { selected_ = flag; if (only_one_) { for (auto &q : my_items_) q.visible = false; if ((flag > -1) && (flag < my_items_.size())) my_items_[flag].visible = true; } update(); if ((flag > -1) && (flag < my_items_.size())) emit itemSelected(my_items_[flag]); else emit itemSelected(SelectorItem()); } if ((!only_one_) && (event->button()==Qt::RightButton) && (flag > -1) && (flag < my_items_.size())) { my_items_[flag].visible = !my_items_[flag].visible; update(); emit itemToggled(my_items_[flag]); } }
void VtkVisPipelineView::selectionChanged( const QItemSelection &selected, const QItemSelection &deselected ) { QTreeView::selectionChanged(selected, deselected); if (selected.empty()) return; QModelIndex index = *selected.indexes().begin(); if (index.isValid()) { VtkVisPipelineItem* item = static_cast<VtkVisPipelineItem*>(index.internalPointer()); emit actorSelected(item->actor()); emit itemSelected(item); if (item->transformFilter()) emit dataObjectSelected(vtkDataObject::SafeDownCast( item->transformFilter()->GetOutputDataObject(0))); } else { emit actorSelected(NULL); emit itemSelected(NULL); emit dataObjectSelected(NULL); } }
void AmazonStore::polish() { DEBUG_BLOCK; if( !m_polished ) { m_polished = true; initTopPanel(); initBottomPanel(); initView(); connect( m_itemView, SIGNAL(itemSelected(QModelIndex)), this, SLOT(itemSelected(QModelIndex)) ); connect( m_itemView, SIGNAL(itemDoubleClicked(QModelIndex)), this, SLOT(itemDoubleClicked(QModelIndex)) ); connect( m_itemView, SIGNAL(searchForAlbum(QModelIndex)), this, SLOT(searchForAlbum(QModelIndex)) ); m_amazonInfoParser = new AmazonInfoParser(); setInfoParser( m_amazonInfoParser ); m_amazonInfoParser->showFrontPage(); AmazonUrlRunner *runner = new AmazonUrlRunner(); connect( runner, SIGNAL(search(QString)), this, SLOT(newSearchRequest(QString)) ); The::amarokUrlHandler()->registerRunner( runner, runner->command() ); } }
/* Méthode qui permet de créer les connexions entre les différents objets */ void HomeCreator3D::createConnection() { QObject::connect(&window, SIGNAL(itemSelected(QString)), this, SLOT(itemSelected(QString))); QObject::connect(window.getUi()->widget, SIGNAL(constructionOK()), this, SLOT(enable3D())); QObject::connect(window.getUi()->widget, SIGNAL(objectChangePosition(double, double, double)), this, SLOT(objectMove(double, double, double))); QObject::connect(window.getUi()->widget, SIGNAL(objectChangeRotation()), this, SLOT(objectRotate())); QObject::connect(window.getUi()->widget, SIGNAL(selection(int)), this, SLOT(selection(int))); QObject::connect(window.getUi()->widget, SIGNAL(deleteObject()), this, SLOT(deleteObject())); QObject::connect(&window, SIGNAL(newHouse()), this, SLOT(reInit())); QObject::connect(&window, SIGNAL(loadHouse(QString)), this, SLOT(loadMaison(QString))); QObject::connect(&window, SIGNAL(saveHouse(QString)), this, SLOT(saveMaison(QString))); }
void RibbonWidget::itemSelected() { QObject *source = this->sender(); QString name = source->objectName(); emit itemSelected(name); }
void TreeView::newsep() { TreeItem *parentItem = 0; TreeItem *item = (TreeItem*)selectedItem(); if(!item) { parentItem = 0; } else if(item->isDirectory()) { parentItem = item; item = 0; } else { parentItem = static_cast<TreeItem*>(item->parent()); } // create the TreeItem if(parentItem) parentItem->setOpen(true); TreeItem *newItem = createTreeItem(parentItem, item, m_separator, true); setSelected ( newItem, true); itemSelected( newItem); setLayoutDirty(parentItem); }
UserConfig::UserConfig(Contact *contact, Group *group) : QDialog( NULL) { this->setAttribute( Qt::WA_DeleteOnClose); setupUi( this); m_contact = contact; m_group = group; m_nUpdates = 0; SET_WNDPROC("configure") setIcon(Pict(contact ? "info" : "configure").pixmap()); setButtonsPict(this); setTitle(); QIcon iconSet = Icon("webpress"); if (!iconSet.pixmap(QIcon::Small, QIcon::Normal).isNull()) btnUpdate->setIconSet(iconSet); btnUpdate->hide(); lstBox->setHScrollBarMode(Q3ScrollView::AlwaysOff); lstBox->setSorting(1); lstBox->header()->hide(); fill(); connect(lstBox, SIGNAL(currentChanged(Q3ListViewItem*)), this, SLOT(itemSelected(Q3ListViewItem*))); connect(buttonApply, SIGNAL(clicked()), this, SLOT(apply())); connect(btnUpdate, SIGNAL(clicked()), this, SLOT(updateInfo())); lstBox->setCurrentItem(lstBox->firstChild()); itemSelected(lstBox->firstChild()); }
UserConfig::UserConfig(Contact *contact, Group *group) : ConfigureDialogBase(NULL, "userconfig", false, WDestructiveClose) { m_contact = contact; m_group = group; m_nUpdates = 0; SET_WNDPROC("configure") setIcon(Pict(contact ? "info" : "configure")); setButtonsPict(this); setTitle(); const QIconSet *iconSet = Icon("webpress"); if (iconSet) btnUpdate->setIconSet(*iconSet); btnUpdate->hide(); lstBox->setHScrollBarMode(QScrollView::AlwaysOff); lstBox->setSorting(1); lstBox->header()->hide(); fill(); connect(lstBox, SIGNAL(currentChanged(QListViewItem*)), this, SLOT(itemSelected(QListViewItem*))); connect(buttonApply, SIGNAL(clicked()), this, SLOT(apply())); connect(btnUpdate, SIGNAL(clicked()), this, SLOT(updateInfo())); lstBox->setCurrentItem(lstBox->firstChild()); itemSelected(lstBox->firstChild()); }
void TabbedWidget::mouseReleaseEvent(QMouseEvent* e) { if (QWhatsThis::inWhatsThisMode()) return; int position; int width; if (e->x() < 0) return ; for (position = 0, width = 0; (position < int(areas.count())) && (e->x() >= width); position++) width += areas[position]; if ((e->x() <= width) && (e->button() == Qt::LeftButton) && !(current_position == position - 1)) { if (pressed && pressed_position == (position - 1)) { current_position = position - 1; refreshBuffer(); emit itemSelected(items[current_position]); } } pressed = false; }
k9MenuEdit::k9MenuEdit(QWidget* parent, const char* name,QCanvas *_canvas) : menuEdit(parent,name) { bAddText->setPixmap (SmallIcon("add")); m_noUpdate=false; m_canvas=_canvas; m_format=PAL; m_imageHeight=576; QGridLayout *grid=new QGridLayout(frame,1,1); m_menuEditor=new k9MenuEditor(*m_canvas,frame); grid->addWidget(m_menuEditor,0,0); m_canvas->resize(720,m_imageHeight); m_text=NULL; m_menuEditor->setMenu(this); connect(m_menuEditor,SIGNAL(itemSelected()),this,SLOT(itemSelected())); cbPosTitle->setEnabled(false); }
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: backgroundButtonGroupClicked((*reinterpret_cast< QAbstractButton*(*)>(_a[1]))); break; case 1: buttonGroupClicked((*reinterpret_cast< int(*)>(_a[1]))); break; case 2: deleteItem(); break; case 3: pointerGroupClicked((*reinterpret_cast< int(*)>(_a[1]))); break; case 4: bringToFront(); break; case 5: sendToBack(); break; case 6: itemInserted((*reinterpret_cast< DiagramItem*(*)>(_a[1]))); break; case 7: textInserted((*reinterpret_cast< QGraphicsTextItem*(*)>(_a[1]))); break; case 8: currentFontChanged((*reinterpret_cast< const QFont(*)>(_a[1]))); break; case 9: fontSizeChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 10: sceneScaleChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 11: textColorChanged(); break; case 12: itemColorChanged(); break; case 13: lineColorChanged(); break; case 14: textButtonTriggered(); break; case 15: fillButtonTriggered(); break; case 16: lineButtonTriggered(); break; case 17: handleFontChange(); break; case 18: itemSelected((*reinterpret_cast< QGraphicsItem*(*)>(_a[1]))); break; case 19: about(); break; default: ; } _id -= 20; } return _id; }
QModelIndex VtkVisPipeline::addPipelineItem(VtkVisPipelineItem* item, const QModelIndex &parent) { item->Initialize(_renderer); TreeItem* parentItem = item->parentItem(); parentItem->appendChild(item); if (!parent.isValid()) // Set global superelevation on source objects { QSettings settings; if (dynamic_cast<vtkImageAlgorithm*>(item->algorithm()) == NULL) // if not an image item->setScale(1.0, 1.0, settings.value("globalSuperelevation", 1.0).toDouble()); } int parentChildCount = parentItem->childCount(); QModelIndex newIndex = index(parentChildCount - 1, 0, parent); if (_resetCameraOnAddOrRemove || _rootItem->childCount() == 1) _renderer->ResetCamera(_renderer->ComputeVisiblePropBounds()); _actorMap.insert(item->actor(), newIndex); // Do not interpolate images if (dynamic_cast<vtkImageAlgorithm*>(item->algorithm())) static_cast<vtkImageActor*>(item->actor())->InterpolateOff(); reset(); emit vtkVisPipelineChanged(); emit itemSelected(newIndex); return newIndex; }
void LayerWidget::addItem(LayerItem *item) { layout_->insertWidget(0,item); connect(item,SIGNAL(selected()),this,SLOT(itemSelected())); connect(item,SIGNAL(hide(bool)),this,SLOT(itemHidden())); connect(item,SIGNAL(lock(bool)),this,SLOT(itemLocked())); }
void FeedsView::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) { RootItem *selected_item = selectedItem(); m_proxyModel->setSelectedItem(selected_item); QTreeView::selectionChanged(selected, deselected); emit itemSelected(selected_item); m_proxyModel->invalidateReadFeedsFilter(); }
NameWizardPage::NameWizardPage(QWidget *parent) : NameWizardPageDecl(parent) { // Register the fields with the QWizard and connect the // appropriate signals to update the "Next" button correctly registerField("payeeEdit", m_payeeEdit, "selectedItem", SIGNAL(itemSelected(QString))); connect(m_nameEdit, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged())); }
void UIListTreeType::select() { if (currentpos) { emit selected(currentpos); emit itemSelected(this, currentpos); } }
void KListItem::hoverLeaveEvent( QGraphicsSceneHoverEvent *event ) { if(!itemSelected()) { QVariant v = m_listWidget->itemUnselectBackgroundVariant(); setUnselected(v); } }
void KListItem::hoverEnterEvent( QGraphicsSceneHoverEvent *event ) { if(!itemSelected()) { QVariant v = m_listWidget->itemHoveredBackgroundVariant(); setHovered(v); } }
CuteRadioPluginGetTunesDialog::CuteRadioPluginGetTunesDialog(QObject *parent) : QompPluginGettunesDlg(parent) { setWindowTitle(CUTERADIO_PLUGIN_NAME); p = new Private; connect (p, SIGNAL(itemClicked(QModelIndex)), SLOT(itemSelected(QModelIndex))); setResultsWidget(p->item); }
void XmlTree::itemSelected ( const QModelIndex& index ) { if ( !index.isValid() ) return; if ( !m_treeModel ) return; AbstractXmlModelNode *n = m_treeModel->getNode ( index ); if ( n ) emit itemSelected ( KTextEditor::Cursor ( n->lineNumber(), n->columnNumber() ) ); }
void UIListBtnType::MoveDown(MovementUnit unit) { int pos = m_selPosition; if (pos == -1) return; switch (unit) { case MoveItem: if (!m_selIterator->atLast()) { ++(*m_selIterator); ++m_selPosition; } break; case MovePage: if ((pos + (int)m_itemsVisible) < m_itemCount - 1) { for (int i = 0; i < (int)m_itemsVisible; i++) { ++(*m_selIterator); ++m_selPosition; } break; } // fall through case MoveMax: m_selIterator->toLast(); m_selPosition = m_itemCount - 1; break; } if (!m_selIterator->current()) return; m_selItem = m_selIterator->current(); while (m_topPosition + (int)m_itemsVisible < m_selPosition + 1) { ++(*m_topIterator); ++m_topPosition; } m_topItem = m_topIterator->current(); if (m_topItem != m_itemList.first()) m_showUpArrow = true; else m_showUpArrow = false; if (m_topPosition + (int)m_itemsVisible < m_itemCount) m_showDnArrow = true; else m_showDnArrow = false; emit itemSelected(m_selItem); }
bool DicomDirQtWidget::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: itemSelected((QListViewItem*)static_QUType_ptr.get(_o+1)); break; default: return QWidget::qt_invoke( _id, _o ); } return TRUE; }
void FtpView::slotSelected( QListViewItem *item ) { if ( !item ) return; FtpViewItem *i = (FtpViewItem*)item; if ( i->entryInfo().isDir() ) emit itemSelected( i->entryInfo() ); }
void UIListBtnType::MoveUp(MovementUnit unit) { int pos = m_selPosition; if (pos == -1) return; switch (unit) { case MoveItem: if (!m_selIterator->atFirst()) { --(*m_selIterator); --m_selPosition; } break; case MovePage: if (pos > (int)m_itemsVisible) { for (int i = 0; i < (int)m_itemsVisible; i++) { --(*m_selIterator); --m_selPosition; } break; } // fall through case MoveMax: m_selIterator->toFirst(); m_selPosition = 0; break; } if (!m_selIterator->current()) return; m_selItem = m_selIterator->current(); if (m_selPosition <= m_topPosition) { m_topItem = m_selItem; (*m_topIterator) = (*m_selIterator); m_topPosition = m_selPosition; } if (m_topItem != m_itemList.first()) m_showUpArrow = true; else m_showUpArrow = false; if (m_topPosition + (int)m_itemsVisible < m_itemCount) m_showDnArrow = true; else m_showDnArrow = false; emit itemSelected(m_selItem); }
ProstoPleerPluginGetTunesDialog::ProstoPleerPluginGetTunesDialog(QObject *parent) : QompPluginGettunesDlg(parent) { setWindowTitle(PROSTOPLEER_PLUGIN_NAME); p = new Private; connect (p, SIGNAL(itemClicked(QModelIndex)), SLOT(itemSelected(QModelIndex))); connect (p, SIGNAL(next()), SIGNAL(next())); setResultsWidget(p->item); }
void SelectorLabel::addItem(const QString &text, const QString &data, const QString &tt) { QAction *act=menu->addAction(text, this, SLOT(itemSelected())); act->setData(data); if (!tt.isEmpty()) { act->setToolTip(tt); } setText(addMarkup(text, useArrow)); current=menu->actions().count(); }
PoiskmPluginGetTunesDialog::PoiskmPluginGetTunesDialog(QObject *parent) : QompPluginGettunesDlg(parent) { setWindowTitle(POISKM_PLUGIN_NAME); p = new Private; connect (p, SIGNAL(itemClicked(QModelIndex)), SLOT(itemSelected(QModelIndex))); connect (p, &PoiskmPluginGetTunesDialog::Private::next, this, &PoiskmPluginGetTunesDialog::next); setResultsWidget(p->item); }
void LayerWidget::removeItem(const QString &name) { for(int i=0;i<layout_->count();++i){ LayerItem *item = qobject_cast<LayerItem *>(layout_->itemAt(i)->widget()); if(item && item->label() == name){ layout_->removeWidget(item); disconnect(item,SIGNAL(selected()),this,SLOT(itemSelected())); } } }