int Elina_Labels::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: onTypeChar(); break; case 1: rowClicked((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 2: next1Clicked(); break; case 3: insertClicked(); break; case 4: removeClicked(); break; case 5: rewrapClicked(); break; case 6: rowClickedSel((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 7: Scanned(); break; case 8: setSpinBoxFormat(); break; case 9: clearLineEdit(); break; case 10: copy_machine(); break; case 11: copy_middledate(); break; case 12: upClicked(); break; case 13: downClicked(); break; case 14: checkClicked(); break; case 15: startread(); break; case 16: weight_check(); break; case 17: rowClickedSelProd((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break; case 18: timer1_v(); break; case 19: timer2_v(); break; case 20: dummycheckpressed(); break; default: ; } _id -= 21; } return _id; }
NovelsWindow::NovelsWindow(QWidget* parent, Database* data) : QWidget(parent, Qt::Dialog), m_data(data) { setWindowTitle(tr("Select Novel")); m_novels = new QListWidget(this); connect(m_novels, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(currentNovelChanged(QListWidgetItem*))); connect(m_novels, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(hide())); m_add_button = new QPushButton(tr("New"), this); connect(m_add_button, SIGNAL(clicked()), this, SLOT(addClicked())); m_rename_button = new QPushButton(tr("Rename"), this); connect(m_rename_button, SIGNAL(clicked()), this, SLOT(renameClicked())); m_remove_button = new QPushButton(tr("Delete"), this); connect(m_remove_button, SIGNAL(clicked()), this, SLOT(removeClicked())); QPushButton* close_button = new QPushButton(tr("Close"), this); connect(close_button, SIGNAL(clicked()), this, SLOT(hide())); QVBoxLayout* button_layout = new QVBoxLayout; button_layout->addWidget(m_add_button); button_layout->addWidget(m_rename_button); button_layout->addWidget(m_remove_button); button_layout->addStretch(); button_layout->addWidget(close_button); QHBoxLayout* layout = new QHBoxLayout(this); layout->addWidget(m_novels); layout->addLayout(button_layout); }
QWidget* medDatabaseDataSource::mainViewWidget() { if(d->mainWidget.isNull()) { d->mainWidget = new QWidget; d->largeView = new medDatabaseView(d->mainWidget); d->largeView->setModel(d->proxy); QVBoxLayout *database_layout = new QVBoxLayout(d->mainWidget); database_layout->setContentsMargins(0, 0, 0, 0); database_layout->setSpacing(0); database_layout->addWidget(d->largeView); connect(d->largeView, SIGNAL(open(const medDataIndex&)), this, SIGNAL(open(const medDataIndex&))); connect(d->largeView, SIGNAL(exportData(const medDataIndex&)), this, SIGNAL(exportData(const medDataIndex&))); connect(d->largeView, SIGNAL(dataRemoved(const medDataIndex&)), this, SIGNAL(dataRemoved(const medDataIndex&))); if(!d->toolBoxes.isEmpty()) { connect(d->actionsToolBox, SIGNAL(removeClicked()), d->largeView, SLOT(onRemoveSelectedItemRequested())); connect(d->actionsToolBox, SIGNAL(exportClicked()), d->largeView, SLOT(onExportSelectedItemRequested())); connect(d->actionsToolBox, SIGNAL(viewClicked()), d->largeView, SLOT(onViewSelectedItemRequested())); connect(d->actionsToolBox, SIGNAL(saveClicked()), d->largeView, SLOT(onSaveSelectedItemRequested())); connect(d->actionsToolBox, SIGNAL(newPatientClicked()), d->largeView, SLOT(onCreatePatientRequested())); connect(d->actionsToolBox, SIGNAL(newStudyClicked()), d->largeView, SLOT(onCreateStudyRequested())); connect(d->actionsToolBox, SIGNAL(editClicked()), d->largeView, SLOT(onEditRequested())); connect(d->largeView, SIGNAL(patientClicked(const medDataIndex&)), d->actionsToolBox, SLOT(patientSelected(const medDataIndex&))); connect(d->largeView, SIGNAL(seriesClicked(const medDataIndex&)), d->actionsToolBox, SLOT(seriesSelected(const medDataIndex&))); connect(d->largeView, SIGNAL(noPatientOrSeriesSelected()), d->actionsToolBox, SLOT(noPatientOrSeriesSelected())); connect(d->largeView, SIGNAL(multipleEntriesSelected(const QVector<medDataIndex>&)), d->actionsToolBox, SLOT(multipleEntriesSelected(const QVector<medDataIndex>&))); }
QWidget* Image::createConfigurationInterface(QWidget* parent) { m_configWidget = new QWidget(parent); connect(m_configWidget, SIGNAL(destroyed(QObject*)), this, SLOT(configWidgetDestroyed())); if (m_mode == "SingleImage") { m_uiImage.setupUi(m_configWidget); m_model = new BackgroundListModel(this, m_configWidget); m_model->setResizeMethod(resizeMethodHint()); m_model->setWallpaperSize(m_size); m_model->reload(m_usersWallpapers); QTimer::singleShot(0, this, SLOT(setConfigurationInterfaceModel())); m_uiImage.m_view->setItemDelegate(new BackgroundDelegate(m_uiImage.m_view)); //FIXME: setting the minimum width is rather ugly, but this gets us 3 columns of papers //which looks quite good as a default. the magic number 7 at the end of the calculation is //evidently making up for some other PM involved in the QListView that isn't being caught. //if a cleaner way can be found to achieve all this, that would be great m_uiImage.m_view->setMinimumWidth((BackgroundDelegate::SCREENSHOT_SIZE + BackgroundDelegate::MARGIN * 2 + BackgroundDelegate::BLUR_INCREMENT) * 3 + m_uiImage.m_view->spacing() * 4 + QApplication::style()->pixelMetric(QStyle::PM_ScrollBarExtent) + QApplication::style()->pixelMetric(QStyle::PM_DefaultFrameWidth) * 2 + 7); m_uiImage.m_view->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); RemoveButtonManager *rmManager = new RemoveButtonManager(m_uiImage.m_view, &m_usersWallpapers); connect(rmManager, SIGNAL(removeClicked(QString)), this, SLOT(removeWallpaper(QString))); m_uiImage.m_pictureUrlButton->setIcon(KIcon("document-open")); connect(m_uiImage.m_pictureUrlButton, SIGNAL(clicked()), this, SLOT(showFileDialog())); m_uiImage.m_resizeMethod->addItem(i18n("Scaled & Cropped"), ScaledAndCroppedResize); m_uiImage.m_resizeMethod->addItem(i18n("Scaled"), ScaledResize); m_uiImage.m_resizeMethod->addItem(i18n("Scaled, keep proportions"), MaxpectResize); m_uiImage.m_resizeMethod->addItem(i18n("Centered"), CenteredResize); m_uiImage.m_resizeMethod->addItem(i18n("Tiled"), TiledResize); m_uiImage.m_resizeMethod->addItem(i18n("Center Tiled"), CenterTiledResize); for (int i = 0; i < m_uiImage.m_resizeMethod->count(); ++i) { if (resizeMethodHint() == m_uiImage.m_resizeMethod->itemData(i).value<int>()) { m_uiImage.m_resizeMethod->setCurrentIndex(i); break; } } connect(m_uiImage.m_resizeMethod, SIGNAL(currentIndexChanged(int)), this, SLOT(positioningChanged(int))); m_uiImage.m_color->setColor(m_color); //Color button is useless with some resize methods m_uiImage.m_color->setEnabled(resizeMethodHint() == MaxpectResize || resizeMethodHint() == CenteredResize); connect(m_uiImage.m_color, SIGNAL(changed(QColor)), this, SLOT(colorChanged(QColor))); m_uiImage.m_newStuff->setIcon(KIcon("get-hot-new-stuff")); connect(m_uiImage.m_newStuff, SIGNAL(clicked()), this, SLOT(getNewWallpaper())); connect(m_uiImage.m_color, SIGNAL(changed(QColor)), this, SLOT(modified())); connect(m_uiImage.m_resizeMethod, SIGNAL(currentIndexChanged(int)), this, SLOT(modified())); connect(m_uiImage.m_view, SIGNAL(clicked(QModelIndex)), this, SLOT(modified())); } else {
RemovePlanDialog::RemovePlanDialog(QWidget *parent, const char *name, bool modal, WFlags f):RemovePlanDialogBase(parent, name, modal, f) { setPlanTable(); connect(planTable, SIGNAL(clicked(int, int, int, const QPoint&)), this, SLOT(selectOne(int, int))); connect(planTable, SIGNAL(clicked(int, int, int, const QPoint&)), this, SLOT(enableRemoveButton())); connect(resetAllButton, SIGNAL(clicked()), this, SLOT(resetAllClicked())); connect(selectAllButton, SIGNAL(clicked()), this, SLOT(selectAllClicked())); connect(removeButton, SIGNAL(clicked()), this, SLOT(removeClicked())); }
SubTabController::SubTabController(SubTabView* subTabView) : OSQObjectController(), m_subTabView(subTabView) { addQObject(subTabView); bool isConnected = false; isConnected = connect(subTabView, SIGNAL(itemSelected(OSItem*)), this, SLOT(selectItem(OSItem*))); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(itemRemoveClicked(OSItem*)), this, SLOT(removeItem(OSItem*))); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(itemReplacementDropped(OSItem*, const OSItemId&)), this, SLOT(replaceItem(OSItem*, const OSItemId&))); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(selectionCleared()), this, SLOT(clearSelection())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(itemDropped(const OSItemId&)), this, SLOT(handleDrop(const OSItemId&))); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(addClicked()), this, SLOT(doAdd())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(copyClicked()), this, SLOT(doCopy())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(removeClicked()), this, SLOT(doRemove())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(purgeClicked()), this, SLOT(doPurge())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(openBclDlgClicked()), this, SIGNAL(openBclDlgClicked())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(openLibDlgClicked()), this, SIGNAL(openLibDlgClicked())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(dropZoneItemClicked(OSItem*)), this, SLOT(inspectItem(OSItem*))); BOOST_ASSERT(isConnected); }
DictEditorWidget::DictEditorWidget(QWidget *parent) : QWidget(parent) { mView = new QTableView; mModel = new DictEditorModel; mKeyEdit = new QComboBox; mValueEdit = new QLineEdit; mAddButton = new QToolButton; mRemButton = new QToolButton; mTypeLabel = new QLabel("type"); mValueLabel = new QLabel("value"); mAddButton->setIcon(QtAwesome::instance()->icon("plus")); mRemButton->setIcon(QtAwesome::instance()->icon("minus")); mView->setModel(mModel); mView->verticalHeader()->hide(); mView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); mView->setSelectionBehavior(QAbstractItemView::SelectRows); QFormLayout * formLayout = new QFormLayout; formLayout->addRow(mTypeLabel,mKeyEdit); formLayout->addRow(mValueLabel,mValueEdit); formLayout->setVerticalSpacing(5); formLayout->setFormAlignment(Qt::AlignCenter); QVBoxLayout * vLayout = new QVBoxLayout; vLayout->addItem(formLayout); vLayout->addWidget(mView); QHBoxLayout * buttonLayout = new QHBoxLayout; buttonLayout->addWidget(mAddButton); buttonLayout->addWidget(mRemButton); buttonLayout->addStretch(); vLayout->addLayout(buttonLayout); setLayout(vLayout); mKeyEdit->setEditable(true); connect(mAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); connect(mRemButton,SIGNAL(clicked()),this,SLOT(removeClicked())); }
void QtFileTransferWidget::addReceiveItem(ReceiveFileSession * fileSession) { QtFileTransferDownloadItem * fileTransferItem = new QtFileTransferDownloadItem(this, fileSession, _downloadFolder); SAFE_CONNECT(fileTransferItem, SIGNAL(removeClicked()), SLOT(itemRemoveClicked())); QListWidgetItem * item = new QListWidgetItem(/*_ui->downloadTransferListWidget*/); item->setSizeHint(fileTransferItem->minimumSizeHint()); _ui->downloadTransferListWidget->insertItem(0, item); _ui->downloadTransferListWidget->setItemWidget(item, fileTransferItem); showDownloadTab(); showAndRaise(); }
void QtFileTransferWidget::addSendItem(SendFileSession * fileSession, const std::string & filename, const std::string & contact) { QtFileTransferUploadItem * fileTransferItem = new QtFileTransferUploadItem(this, fileSession, QString::fromStdString(filename), contact); SAFE_CONNECT(fileTransferItem, SIGNAL(removeClicked()), SLOT(itemRemoveClicked())); QListWidgetItem * item = new QListWidgetItem(/*_ui->uploadTransferListWidget*/); item->setSizeHint(fileTransferItem->minimumSizeHint()); _ui->uploadTransferListWidget->insertItem(0, item); _ui->uploadTransferListWidget->setItemWidget(item, fileTransferItem); showUploadTab(); showAndRaise(); }
ListLayoutRow::ListLayoutRow(QWidget *widget, QWidget *parent, const bool &moveEnabled) : QFrame(parent) { m_widget = widget; m_upButton = m_downButton = 0; setMidLineWidth(0); setLineWidth(1); setFrameStyle(QFrame::Box); setFrameShadow(QFrame::Sunken); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); QToolButton *removeButton = new QToolButton(this); removeButton->setIcon(KIcon("list-remove")); removeButton->setText(i18n("Remove")); removeButton->setToolTip(i18n("Remove")); connect(removeButton, SIGNAL(clicked()), this, SLOT(removeClicked())); KSeparator *separator = new KSeparator(Qt::Vertical); QHBoxLayout *layout = new QHBoxLayout; if (moveEnabled) { QToolButton *upButton = new QToolButton(this); upButton->setIcon(KIcon("go-up")); upButton->setText(i18n("Move up")); upButton->setToolTip(i18n("Move up")); QToolButton *downButton = new QToolButton(this); downButton->setIcon(KIcon("go-down")); downButton->setText(i18n("Move down")); downButton->setToolTip(i18n("Move down")); connect(upButton, SIGNAL(clicked()), this, SLOT(upClicked())); connect(downButton, SIGNAL(clicked()), this, SLOT(downClicked())); layout->addWidget(upButton); layout->addWidget(downButton); m_upButton = upButton; m_downButton = downButton; } layout->addWidget(removeButton); layout->addWidget(separator); layout->addWidget(m_widget); setLayout(layout); }
ZerberusGui::ZerberusGui(Ms::Synthesizer* s) : SynthesizerGui(s) { setupUi(this); connect(add, SIGNAL(clicked()), SLOT(addClicked())); connect(remove, SIGNAL(clicked()), SLOT(removeClicked())); connect(&_futureWatcher, SIGNAL(finished()), this, SLOT(onSoundFontLoaded())); _progressDialog = new QProgressDialog(tr("Loading..."), tr("Cancel"), 0, 100, 0, Qt::FramelessWindowHint); _progressDialog->reset(); // required for Qt 5.5, see QTBUG-47042 connect(_progressDialog, SIGNAL(canceled()), this, SLOT(cancelLoadClicked())); _progressTimer = new QTimer(this); connect(_progressTimer, SIGNAL(timeout()), this, SLOT(updateProgress())); connect(files, SIGNAL(itemSelectionChanged()), this, SLOT(updateButtons())); updateButtons(); }
void ParameterWidget::notifyRemoveClicked() { bool OK = true; if (openfluid::base::PreferencesManager::instance()->isParamRemovalConfirm()) { OK = (QMessageBox::question(QApplication::activeWindow(), "OpenFLUID-Builder", tr("You are removing the %1 parameter.\n" "Its value will be lost.\nProceed anyway?").arg(getName()), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok); } if (OK) emit removeClicked(ui->NameLabel->text()); }
void TagListWidget::setTagList(QStringList list) { empty(); parentLayout->removeWidget(addButton); foreach(const QString &tagName, list) { if (m_ignoredFlags.contains(tagName.toLower())) continue; TagWidget *lbl = new TagWidget(tagName, "x"); parentLayout->addWidget(lbl); connect(lbl, SIGNAL(removeClicked(QString)), this, SIGNAL(tagRemoved(QString))); children << lbl; } parentLayout->addWidget(addButton); }
ListEditButtonsWidget::ListEditButtonsWidget(QWidget *parent) : QWidget(parent), m_addButton(new QPushButton(tr("Add"))), m_removeButton(new QPushButton(tr("Remove"))), m_editButton(new QPushButton(tr("Edit"))) { QHBoxLayout *layout = new QHBoxLayout(this); layout->setSpacing(10); layout->addStretch(); layout->addWidget(m_addButton); layout->addWidget(m_removeButton); layout->addWidget(m_editButton); setLayout(layout); connect(m_addButton, SIGNAL(clicked()), this, SIGNAL(addClicked())); connect(m_removeButton, SIGNAL(clicked()), this, SIGNAL(removeClicked())); connect(m_editButton, SIGNAL(clicked()), this, SIGNAL(editClicked())); }
void UnitsClassWidget::notifyRemoveClicked() { bool OK = true; if (openfluid::base::PreferencesManager::instance()->isBuilderSpatialUnitsRemovalConfirm()) { OK = (QMessageBox::question(QApplication::activeWindow(), "OpenFLUID-Builder", tr("You are removing the %1 units class.\n" "All units of class %1 and associated attributes and connections will be lost.\n\n" "Proceed anyway?").arg(m_ClassName), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok); } if (OK) { emit removeClicked(m_ClassName); } }
SharedFilesWindow::SharedFilesWindow() : KviWindow(KviWindow::Tool,"shared files window",0) { g_pSharedFilesWindow = this; m_pSplitter = new KviTalSplitter(Qt::Horizontal,this); m_pSplitter->setObjectName("sharedfiles_splitter"); KviTalVBox * vbox = new KviTalVBox(m_pSplitter); m_pTreeWidget = new KviThemedTreeWidget(vbox, this, "sharedfileswindow_treewidget"); //m_pTreeWidget->header()->hide(); m_pTreeWidget->setAllColumnsShowFocus(true); QStringList columsLabels; columsLabels.append(__tr2qs_ctx("Name","sharedfileswindow")); columsLabels.append(__tr2qs_ctx("Filename","sharedfileswindow")); columsLabels.append(__tr2qs_ctx("Mask","sharedfileswindow")); columsLabels.append(__tr2qs_ctx("Expires","sharedfileswindow")); m_pTreeWidget->setHeaderLabels(columsLabels); m_pTreeWidget->setColumnWidth(0,200); m_pTreeWidget->setColumnWidth(0,300); m_pTreeWidget->setColumnWidth(0,300); m_pTreeWidget->setColumnWidth(0,200); m_pTreeWidget->setSelectionMode(QAbstractItemView::SingleSelection); connect(m_pTreeWidget,SIGNAL(itemSelectionChanged()),this,SLOT(enableButtons())); connect(g_pSharedFilesManager,SIGNAL(sharedFilesChanged()),this,SLOT(fillFileView())); connect(g_pSharedFilesManager,SIGNAL(sharedFileAdded(KviSharedFile *)),this,SLOT(sharedFileAdded(KviSharedFile *))); connect(g_pSharedFilesManager,SIGNAL(sharedFileRemoved(KviSharedFile *)),this,SLOT(sharedFileRemoved(KviSharedFile *))); KviTalHBox * b = new KviTalHBox(vbox); m_pAddButton = new QPushButton(__tr2qs_ctx("&Add...","sharedfileswindow"),b); connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); m_pRemoveButton = new QPushButton(__tr2qs_ctx("Re&move","sharedfileswindow"),b); connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeClicked())); m_pEditButton = new QPushButton(__tr2qs_ctx("&Edit","sharedfileswindow"),b); connect(m_pEditButton,SIGNAL(clicked()),this,SLOT(editClicked())); fillFileView(); }
bool WizardEditor::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: okClicked(); break; case 1: applyClicked(); break; case 2: cancelClicked(); break; case 3: helpClicked(); break; case 4: addClicked(); break; case 5: removeClicked(); break; case 6: upClicked(); break; case 7: downClicked(); break; case 8: itemHighlighted((int)static_QUType_int.get(_o+1)); break; case 9: itemSelected((int)static_QUType_int.get(_o+1)); break; case 10: itemDragged((QListBoxItem*)static_QUType_ptr.get(_o+1)); break; case 11: itemDropped((QListBoxItem*)static_QUType_ptr.get(_o+1)); break; default: return WizardEditorBase::qt_invoke( _id, _o ); } return TRUE; }
void Widget::addNotify(const QPixmap &icon, const QString &text, int timeout) { QPointer<Label> label = new Label(icon, "<style type=\"text/css\">" + styleSheet() + "</style>" + text, timeout); connect(label, SIGNAL(timeout()), SLOT(maybeRemove())); connect(label, SIGNAL(clicked()), SLOT(removeAll())); connect(label, SIGNAL(linkClicked(QString)), SLOT(removeClicked(QString))); if((m_limit > 0) && (m_layout->count() >= m_limit)) { delete m_layout->takeAt(0)->widget(); } m_layout->addWidget(label); if(!isVisible()) { move(-1000, -1000); show(); } adjustSize(); }
KviChannelListSelector::KviChannelListSelector(QWidget * par,const QString & txt,QStringList * pOption,bool bEnabled) : KviTalVBox(par), KviSelectorInterface() { m_pLabel = new QLabel(txt,this); m_pTreeWidget = new QTreeWidget(this); m_pTreeWidget->setRootIsDecorated(false); m_pTreeWidget->setColumnCount(2); QStringList columnLabels; columnLabels.append(__tr2qs("Channel Name")); columnLabels.append(__tr2qs("Channel Password")); m_pTreeWidget->setHeaderLabels(columnLabels); KviTalHBox* pEditsHBox = new KviTalHBox(this); m_pChanLineEdit = new QLineEdit(pEditsHBox); connect(m_pChanLineEdit,SIGNAL(textChanged(const QString &)),this,SLOT(textChanged(const QString &))); connect(m_pChanLineEdit,SIGNAL(returnPressed()),this,SLOT(addClicked())); m_pPassLineEdit = new QLineEdit(pEditsHBox); m_pPassLineEdit->setEchoMode(QLineEdit::Password); connect(m_pPassLineEdit,SIGNAL(textChanged(const QString &)),this,SLOT(textChanged(const QString &))); connect(m_pPassLineEdit,SIGNAL(returnPressed()),this,SLOT(addClicked())); KviTalHBox * hBox = new KviTalHBox(this); m_pAddButton = new QPushButton(__tr2qs("A&dd"),hBox); connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); m_pRemoveButton = new QPushButton(__tr2qs("Re&move"),hBox); connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeClicked())); m_pOption = pOption; for ( QStringList::Iterator it = pOption->begin(); it != pOption->end(); ++it ) { new KviChanTreeViewItem(m_pTreeWidget,(*it).section(':',0,0),(*it).section(':',1)); } m_pTreeWidget->setSelectionMode(QAbstractItemView::ExtendedSelection); m_pTreeWidget->setAllColumnsShowFocus(true); connect(m_pTreeWidget,SIGNAL(itemSelectionChanged()),this,SLOT(itemSelectionChanged())); setSpacing(4); setStretchFactor(m_pTreeWidget,1); setEnabled(bEnabled); }
KviStringListSelector::KviStringListSelector(QWidget * par,const QString & txt,QStringList * pOption,bool bEnabled) : KviTalVBox(par), KviSelectorInterface() { m_pLabel = new QLabel(txt,this); m_pListWidget = new KviTalListWidget(this); m_pLineEdit = new QLineEdit(this); connect(m_pLineEdit,SIGNAL(textChanged(const QString &)),this,SLOT(textChanged(const QString &))); connect(m_pLineEdit,SIGNAL(returnPressed()),this,SLOT(addClicked())); KviTalHBox * hBox = new KviTalHBox(this); m_pAddButton = new QPushButton(__tr2qs("A&dd"),hBox); connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); m_pRemoveButton = new QPushButton(__tr2qs("Re&move"),hBox); connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeClicked())); m_pOption = pOption; m_pListWidget->addItems(*pOption); m_pListWidget->setSelectionMode(QAbstractItemView::ExtendedSelection); connect(m_pListWidget,SIGNAL(itemSelectionChanged()),this,SLOT(itemSelectionChanged())); setSpacing(4); setStretchFactor(m_pListWidget,1); setEnabled(bEnabled); }
bool WizardEditorBase::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: languageChange(); break; case 1: init(); break; case 2: destroy(); break; case 3: addClicked(); break; case 4: applyClicked(); break; case 5: cancelClicked(); break; case 6: downClicked(); break; case 7: helpClicked(); break; case 8: itemHighlighted((int)static_QUType_int.get(_o+1)); break; case 9: itemSelected((int)static_QUType_int.get(_o+1)); break; case 10: okClicked(); break; case 11: removeClicked(); break; case 12: upClicked(); break; default: return QDialog::qt_invoke( _id, _o ); } return TRUE; }
// Initialize the dialog widgets and connect the signals/slots void AddRemoveLandscapesDialog::createDialogContent() { ui->setupUi(dialog); //Signals and slots connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); connect(ui->pushButtonBrowseForArchive, SIGNAL(clicked()), this, SLOT(browseForArchiveClicked())); connect(ui->listWidgetUserLandscapes, SIGNAL(currentRowChanged(int)), this, SLOT(updateSidePane(int))); connect(ui->pushButtonRemove, SIGNAL(clicked()), this, SLOT(removeClicked())); connect(ui->pushButtonMessageOK, SIGNAL(clicked()), this, SLOT(messageAcknowledged())); connect(landscapeManager, SIGNAL(landscapesChanged()), this, SLOT(populateLists())); connect(landscapeManager, SIGNAL(errorUnableToOpen(QString)), this, SLOT(messageUnableToOpen(QString))); connect(landscapeManager, SIGNAL(errorNotArchive()), this, SLOT(messageNotArchive())); connect(landscapeManager, SIGNAL(errorNotUnique(QString)), this, SLOT(messageNotUnique(QString))); connect(landscapeManager, SIGNAL(errorRemoveManually(QString)), this, SLOT(messageRemoveManually(QString))); ui->groupBoxMessage->setVisible(false); populateLists(); }
/** * @brief Constructor */ MultiFieldEditor() : m_buttonBox(new QVBoxLayout()), m_treeView(new QTreeWidget()), m_addButton(new QPushButton("&Add")), m_removeButton(new QPushButton("&Remove")), m_moveUpButton(new QPushButton("&Up")), m_moveDownButton(new QPushButton("&Down")) { m_widget = new MultiFieldLayout(); m_status = new QLabel("label status"); m_buttonBox->addWidget(m_addButton); m_buttonBox->addWidget(m_removeButton); m_buttonBox->addWidget(m_moveUpButton); m_buttonBox->addWidget(m_moveDownButton); m_buttonBox->addStretch(); m_treeView->setRootIsDecorated(false); m_treeView->setColumnCount( 2 ); m_treeView->setUniformRowHeights(true); m_adapter.addColumnsToView(m_treeView); m_widget->addWidget(m_treeView,0,0); m_widget->addLayout(m_buttonBox, 0, 1); m_widget->addWidget(m_status, 1, 0); updateLabel(); connect(m_addButton, SIGNAL(clicked()), this, SLOT(addClicked())); connect(m_removeButton, SIGNAL(clicked()), this, SLOT(removeClicked())); connect(m_moveUpButton, SIGNAL(clicked()), this, SLOT(moveUpClicked())); connect(m_moveDownButton, SIGNAL(clicked()), this, SLOT(moveDownClicked())); connect(m_treeView, SIGNAL(itemChanged(QTreeWidgetItem*,int)), m_widget, SIGNAL(signalChanged())); connect(this, SIGNAL(signalChanged()), m_widget, SIGNAL(signalChanged())); }
AlbumManager::AlbumManager(QWidget* parent) : AbstractDialog(parent) { setObjectName("AlbumManager"); setupUi(this); setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); up->setIcon(*icons[int(Icons::arrowUp_ICON)]); down->setIcon(*icons[int(Icons::arrowDown_ICON)]); album = 0; connect(add, SIGNAL(clicked()), SLOT(addClicked())); connect(addNew, SIGNAL(clicked()), SLOT(addNewClicked())); connect(up, SIGNAL(clicked()), SLOT(upClicked())); connect(down, SIGNAL(clicked()), SLOT(downClicked())); connect(remove, SIGNAL(clicked()), SLOT(removeClicked())); connect(scoreList, SIGNAL(currentRowChanged(int)), SLOT(currentScoreChanged(int))); connect(scoreList, SIGNAL(itemChanged(QListWidgetItem*)), SLOT(itemChanged(QListWidgetItem*))); connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), SLOT(buttonBoxClicked(QAbstractButton*))); currentScoreChanged(-1); add->setEnabled(false); MuseScore::restoreGeometry(this); //createNewClicked(); }
void ProfileWidget::on_removeButton_clicked() { emit removeClicked(); }
VideoFormatTypeForm::VideoFormatTypeForm(VideoFormatType *videoFormat, QEbuMainWindow *mainWindow, QWidget *parent) : StackableWidget(mainWindow, parent) { m_op = (videoFormat) ? Edit : Add; if (!videoFormat) m_videoFormat = new VideoFormatType; else m_videoFormat = videoFormat; //Layout QHBoxLayout *mainHLayout = new QHBoxLayout; QVBoxLayout *vl = new QVBoxLayout; { QFormLayout *fl = new QFormLayout; m_editVideoFormatId = new QLineEdit; fl->addRow(tr("Video Format Id"), m_editVideoFormatId); m_editVideoFormatName = new QLineEdit; fl->addRow(tr("Video Format Name"), m_editVideoFormatName); m_editVideoFormatDefinition = new QLineEdit; fl->addRow(tr("Video Format Definition"), m_editVideoFormatDefinition); vl->addLayout(fl); } { QGridLayout *gl = new QGridLayout; m_spinRegionDelimX = new QUnsignedSpinBox; m_spinRegionDelimX->setRange(qEbuLimits::getMinUInt(), qEbuLimits::getMaxUInt()); m_checkRegionDelimX = new QCheckBox(tr("Region Delim X")); gl->addWidget(m_checkRegionDelimX, 0, 0); gl->addWidget(m_spinRegionDelimX, 0, 1); QObject::connect(m_spinRegionDelimX, SIGNAL(valueChanged()), this, SLOT(regionDelimXChanged())); m_spinRegionDelimY = new QUnsignedSpinBox; m_spinRegionDelimY->setRange(qEbuLimits::getMinUInt(), qEbuLimits::getMaxUInt()); m_checkRegionDelimY = new QCheckBox(tr("Region Delim Y")); gl->addWidget(m_checkRegionDelimY, 1, 0); gl->addWidget(m_spinRegionDelimY, 1, 1); QObject::connect(m_spinRegionDelimY, SIGNAL(valueChanged()), this, SLOT(regionDelimYChanged())); m_editWidth = new LengthTypeEditBox(m_videoFormat->width()); m_editWidth->setLabel(tr("Width")); gl->addWidget(m_editWidth, 2, 0, 1, 2); m_editHeight = new LengthTypeEditBox(m_videoFormat->height()); m_editHeight->setLabel(tr("Heigth")); gl->addWidget(m_editHeight, 3, 0, 1, 2); vl->addLayout(gl); } { QFormLayout *fl = new QFormLayout; m_buttonAspectRatio = new QPushButton(">>"); fl->addRow(tr("Aspect Ratio"), m_buttonAspectRatio); QObject::connect(m_buttonAspectRatio, SIGNAL(toggled(bool)), this, SLOT(aspectRatioChecked(bool))); m_buttonVideoEncoding = new QPushButton(">>"); fl->addRow(tr("Video Encoding"), m_buttonVideoEncoding); QObject::connect(m_buttonVideoEncoding, SIGNAL(toggled(bool)), this, SLOT(videoEncodingChecked(bool))); m_buttonVideoTrack = new QPushButton(">>"); fl->addRow(tr("Video Track"), m_buttonVideoTrack); QObject::connect(m_buttonVideoTrack, SIGNAL(toggled(bool)), this, SLOT(videoTrackTypeChecked(bool))); m_buttonTechnicalAttributes = new QPushButton(">>"); fl->addRow(tr("Technical Attributes"), m_buttonTechnicalAttributes); QObject::connect(m_buttonTechnicalAttributes, SIGNAL(toggled(bool)), this, SLOT(technicalAttributesChecked(bool))); vl->addLayout(fl); QButtonGroup *group = new QButtonGroup(this); m_buttonAspectRatio->setCheckable(true); group->addButton(m_buttonAspectRatio); m_buttonVideoEncoding->setCheckable(true); group->addButton(m_buttonVideoEncoding); m_buttonVideoTrack->setCheckable(true); group->addButton(m_buttonVideoTrack); m_buttonTechnicalAttributes->setCheckable(true); group->addButton(m_buttonTechnicalAttributes); } mainHLayout->addLayout(vl); // Add list view on the right m_listView = new ListView(); QObject::connect(m_listView->buttonAdd(), SIGNAL(clicked()), this, SLOT(addClicked())); QObject::connect(m_listView->buttonEdit(), SIGNAL(clicked()), this, SLOT(editClicked())); QObject::connect(m_listView->buttonRemove(), SIGNAL(clicked()), this, SLOT(removeClicked())); mainHLayout->addWidget(m_listView); this->setLayout(mainHLayout); //Event filter m_textDocumentation->setText(tr("A description of video characteristics of the resource to provide technical information such as colour, greyscale or black and white colour schemes, frame rate, sampling rate, scanning format, encoding, track configuration.")); m_editVideoFormatId->installEventFilter(this); m_editVideoFormatDefinition->installEventFilter(this); m_editVideoFormatName->installEventFilter(this); m_spinRegionDelimX->installEventFilter(this); m_spinRegionDelimY->installEventFilter(this); m_editWidth->editValue()->installEventFilter(this); m_editWidth->editUnit()->installEventFilter(this); m_editHeight->editValue()->installEventFilter(this); m_editHeight->editUnit()->installEventFilter(this); m_buttonAspectRatio->installEventFilter(this); m_buttonVideoEncoding->installEventFilter(this); m_buttonVideoTrack->installEventFilter(this); m_buttonTechnicalAttributes->installEventFilter(this); //Set data fields... m_editVideoFormatId->setText(m_videoFormat->videoFormatId()); m_editVideoFormatName->setText(m_videoFormat->videoFormatName()); m_editVideoFormatDefinition->setText(m_videoFormat->videoFormatDefinition()); if (m_videoFormat->regionDelimX()) { m_spinRegionDelimX->setValue(*(m_videoFormat->regionDelimX())); m_checkRegionDelimX->setChecked(true); } if (m_videoFormat->regionDelimY()) { m_spinRegionDelimY->setValue(*(m_videoFormat->regionDelimY())); m_checkRegionDelimY->setChecked(true); } m_buttonAspectRatio->setChecked(true); }
ContactDetailsTypeForm::ContactDetailsTypeForm( ContactDetailsType *contactDetails, QEbuMainWindow *mainWindow, QWidget *parent) : StackableWidget(mainWindow, parent) { m_op = (contactDetails) ? Edit : Add; if (!contactDetails) m_contactDetails = new ContactDetailsType; else m_contactDetails = contactDetails; // Layout QHBoxLayout *mainHLayout = new QHBoxLayout; QVBoxLayout *l = new QVBoxLayout; { QFormLayout *fl = new QFormLayout; m_editContactId = new QLineEdit; m_editContactId->setValidator(TypeConverter::getUriValidator()); fl->addRow(tr("Contact ID"), m_editContactId); l->addLayout(fl); } { m_radioName = new QRadioButton(tr("Simple name")); m_radioCName = new QRadioButton(tr("Complex name")); QButtonGroup *radio = new QButtonGroup; m_radioName->setCheckable(true); m_radioCName->setCheckable(true); QObject::connect(m_radioName, SIGNAL(toggled(bool)), this, SLOT(simpleNameChecked(bool))); QObject::connect(m_radioCName, SIGNAL(toggled(bool)), this, SLOT(complexNameChecked(bool))); radio->addButton(m_radioName); radio->addButton(m_radioCName); QHBoxLayout *rl = new QHBoxLayout; rl->addWidget(m_radioName); rl->addWidget(m_radioCName); l->addLayout(rl); } { QFormLayout *fl = new QFormLayout; m_editName = new QLineEdit; fl->addRow(tr("Name"), m_editName); m_editGivenName = new QLineEdit; fl->addRow(tr("Given name"), m_editGivenName); m_editFamilyName = new QLineEdit; fl->addRow(tr("Family name"), m_editFamilyName); m_editUsername = new QLineEdit; fl->addRow(tr("Username"), m_editUsername); m_editOccupation = new QLineEdit; fl->addRow(tr("Occupation"), m_editOccupation); m_buttonDetails = new QPushButton(">>"); fl->addRow(tr("Details"), m_buttonDetails); QObject::connect(m_buttonDetails, SIGNAL(toggled(bool)), this, SLOT(contactDetailsChecked(bool))); m_buttonStageName = new QPushButton(">>"); fl->addRow(tr("Stage Name"), m_buttonStageName); QObject::connect(m_buttonStageName, SIGNAL(toggled(bool)), this, SLOT(stageNameChecked(bool))); m_buttonRelatedContacts = new QPushButton(">>"); fl->addRow(tr("Related Contacts"), m_buttonRelatedContacts); QObject::connect(m_buttonRelatedContacts, SIGNAL(toggled(bool)), this, SLOT(relatedContactsChecked(bool))); l->addLayout(fl); QButtonGroup *group = new QButtonGroup(this); m_buttonDetails->setCheckable(true); group->addButton(m_buttonDetails); m_buttonStageName->setCheckable(true); group->addButton(m_buttonStageName); m_buttonRelatedContacts->setCheckable(true); group->addButton(m_buttonRelatedContacts); } mainHLayout->addLayout(l); // Add list view on the right m_listView = new ListView(); QObject::connect(m_listView->buttonAdd(), SIGNAL(clicked()), this, SLOT(addClicked())); QObject::connect(m_listView->buttonEdit(), SIGNAL(clicked()), this, SLOT(editClicked())); QObject::connect(m_listView->buttonRemove(), SIGNAL(clicked()), this, SLOT(removeClicked())); mainHLayout->addWidget(m_listView); this->setLayout(mainHLayout); // Event Filter m_textDocumentation->setText(tr("Minimum information providing means to further identify and contact a person.")); m_editContactId->installEventFilter(this); m_editName->installEventFilter(this); m_editFamilyName->installEventFilter(this); m_editGivenName->installEventFilter(this); m_editUsername->installEventFilter(this); m_editOccupation->installEventFilter(this); m_buttonDetails->installEventFilter(this); m_buttonStageName->installEventFilter(this); m_buttonRelatedContacts->installEventFilter(this); // Set data fields... m_editContactId->setText(m_contactDetails->contactId()); m_editName->setText(m_contactDetails->name().getName()); m_editFamilyName->setText(m_contactDetails->name().getFamilyName()); m_editGivenName->setText(m_contactDetails->name().getGivenName()); m_editOccupation->setText(m_contactDetails->occupation()); m_editUsername->setText(m_contactDetails->username()); m_buttonDetails->setChecked(true); if (m_contactDetails && !m_contactDetails->name().isComplexName()) m_radioName->setChecked(true); else if (m_contactDetails && m_contactDetails->name().isComplexName()) m_radioCName->setChecked(true); else m_radioName->setChecked(true); }
KviMaskEditor::KviMaskEditor(QWidget * par, KviChannelWindow * pChannel, KviWindowToolPageButton * button, std::vector<KviMaskEntry *> maskList, char cMode, const char * name) : KviWindowToolWidget(par, button) { setObjectName(name); m_pChannel = pChannel; setFocusPolicy(Qt::ClickFocus); QGridLayout * g = new QGridLayout(this); m_cFlag = cMode; KviIrcConnectionServerInfo * pServerInfo = nullptr; QString szDescription = ""; if(m_pChannel) pServerInfo = m_pChannel->serverInfo(); if(pServerInfo) szDescription = pServerInfo->getChannelModeDescription(cMode); if(szDescription.isEmpty()) szDescription = __tr2qs("Mode \"%1\" masks").arg(cMode); switch(cMode) { case 'b': m_eIcon = KviIconManager::Ban; break; case 'e': m_eIcon = KviIconManager::BanExcept; break; case 'I': m_eIcon = KviIconManager::InviteExcept; break; case 'a': m_eIcon = KviIconManager::ChanAdmin; break; case 'q': // this could also be quiet bans.. m_eIcon = KviIconManager::Kick; break; default: m_eIcon = KviIconManager::Ban; break; } KviTalHBox * pTitleLayout = new KviTalHBox(this); g->addWidget(pTitleLayout, 0, 0); QLabel * l = new QLabel("", pTitleLayout); l->setPixmap(*(g_pIconManager->getSmallIcon(m_eIcon))); l = new QLabel(szDescription, pTitleLayout); QFrame * pFrame = new QFrame(this); pFrame->setFrameStyle(QFrame::HLine | QFrame::Sunken); g->addWidget(pFrame, 1, 0, 1, -1); KviTalHBox * hb = new KviTalHBox(this); g->addWidget(hb, 2, 0, 1, 2); new QLabel(__tr2qs("Filter:"), hb); m_pSearch = new QLineEdit(hb); connect(m_pSearch, SIGNAL(textChanged(const QString &)), this, SLOT(searchTextChanged(const QString &))); l = new QLabel(__tr2qs("Use double-click to edit item"), this); g->addWidget(l, 2, 1); g->addWidget(l, 3, 0, 1, 2); m_pMaskBox = new QTreeWidget(this); m_pMaskBox->setFocusPolicy(Qt::ClickFocus); m_pMaskBox->setFocusProxy(this); m_pMaskBox->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); m_pMaskBox->setSelectionMode(QAbstractItemView::ExtendedSelection); QStringList columnLabels; m_pMaskBox->setColumnCount(3); columnLabels.append(__tr2qs("Mask")); columnLabels.append(__tr2qs("Set by")); columnLabels.append(__tr2qs("Set at")); m_pMaskBox->setHeaderLabels(columnLabels); m_pMaskBox->setAllColumnsShowFocus(true); m_pMaskBox->setSortingEnabled(true); connect(m_pMaskBox, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(itemDoubleClicked(QTreeWidgetItem *, int))); g->addWidget(m_pMaskBox, 4, 0, 1, 2); m_pRemoveMask = new QPushButton(__tr2qs("Re&move"), this); m_pRemoveMask->setFocusPolicy(Qt::ClickFocus); m_pRemoveMask->setFocusProxy(this); g->addWidget(m_pRemoveMask, 5, 1); connect(m_pRemoveMask, SIGNAL(clicked()), this, SLOT(removeClicked())); m_pRemoveMask->setIcon(*(g_pIconManager->getSmallIcon(KviIconManager::DeleteItem))); m_pAddButton = new QPushButton(__tr2qs("&Add"), this); g->addWidget(m_pAddButton, 5, 0); connect(m_pAddButton, SIGNAL(clicked()), this, SLOT(addClicked())); m_pAddButton->setIcon(*(g_pIconManager->getSmallIcon(KviIconManager::NewItem))); g->setColumnStretch(1, 1); if(m_pChannel && (!m_pChannel->connection())) { m_pRemoveMask->setEnabled(false); m_pAddButton->setEnabled(false); return; } for(auto & e : maskList) addMask(e); updateOpStatus(); if(m_pChannel) connect(m_pChannel, SIGNAL(opStatusChanged()), this, SLOT(updateOpStatus())); }
SubTabView::SubTabView(OSItemSelector* itemSelector, OSInspectorView *inspectorView, QWidget * parent) : QSplitter(parent), m_itemSelector(itemSelector), m_inspectorView(inspectorView) { this->setObjectName("GrayWidgetWithLeftTopBorders"); //QHBoxLayout * mainHLayout = new QHBoxLayout(); //mainHLayout->setContentsMargins(1,1,0,0); //mainHLayout->setSpacing(0); //this->setLayout(mainHLayout); QWidget * leftWidget = new QWidget(); //leftWidget->setFixedWidth(190); //mainHLayout->addWidget(leftWidget); addWidget(leftWidget); QVBoxLayout * outerLeftVLayout = new QVBoxLayout(); outerLeftVLayout->setContentsMargins(0,0,0,0); outerLeftVLayout->setSpacing(0); leftWidget->setLayout(outerLeftVLayout); //mainHLayout->addLayout(outerLeftVLayout); // Item Selector outerLeftVLayout->addWidget(m_itemSelector, 10); bool isConnected = false; isConnected = QObject::connect(m_itemSelector, SIGNAL(itemSelected(OSItem*)), this, SIGNAL(itemSelected(OSItem*))); OS_ASSERT(isConnected); isConnected = QObject::connect(m_itemSelector, SIGNAL(itemRemoveClicked(OSItem*)), this, SIGNAL(itemRemoveClicked(OSItem*))); OS_ASSERT(isConnected); isConnected = QObject::connect(m_itemSelector, SIGNAL(itemReplacementDropped(OSItem*, const OSItemId&)), this, SIGNAL(itemReplacementDropped(OSItem*, const OSItemId&))); OS_ASSERT(isConnected); isConnected = QObject::connect(m_itemSelector, SIGNAL(selectionCleared()), this, SIGNAL(selectionCleared())); OS_ASSERT(isConnected); // Item Selector Buttons m_itemSelectorButtons = new OSItemSelectorButtons(); outerLeftVLayout->addWidget(m_itemSelectorButtons); isConnected = QObject::connect(m_itemSelectorButtons, SIGNAL(itemDropped(const OSItemId&)), this, SIGNAL(itemDropped(const OSItemId&))); OS_ASSERT(isConnected); isConnected = QObject::connect(m_itemSelectorButtons, SIGNAL(addClicked()), this, SIGNAL(addClicked())); OS_ASSERT(isConnected); isConnected = QObject::connect(m_itemSelectorButtons, SIGNAL(copyClicked()), this, SIGNAL(copyClicked())); OS_ASSERT(isConnected); isConnected = QObject::connect(m_itemSelectorButtons, SIGNAL(removeClicked()), this, SIGNAL(removeClicked())); OS_ASSERT(isConnected); isConnected = QObject::connect(m_itemSelectorButtons, SIGNAL(purgeClicked()), this, SIGNAL(purgeClicked())); OS_ASSERT(isConnected); isConnected = QObject::connect(m_itemSelectorButtons, SIGNAL(openBclDlgClicked()), this, SIGNAL(openBclDlgClicked())); OS_ASSERT(isConnected); //isConnected = QObject::connect(m_itemSelectorButtons, // SIGNAL(openLibDlgClicked()), // this, // SIGNAL(openLibDlgClicked())); //OS_ASSERT(isConnected); TODO // vertical separator //QWidget * vLine = new QWidget(); //vLine->setObjectName("VLine"); //vLine->setStyleSheet("QWidget#VLine { background: #445051;}"); //vLine->setFixedWidth(2); //mainHLayout->addWidget(vLine); // Inspector View //mainHLayout->addWidget(m_inspectorView, 10); addWidget(m_inspectorView); setStretchFactor(1,100000); isConnected = QObject::connect(m_inspectorView, SIGNAL(dropZoneItemClicked(OSItem*)), this, SIGNAL(dropZoneItemClicked(OSItem*))); OS_ASSERT(isConnected); }
SoxEffectWidget::SoxEffectWidget( QWidget *parent ) : QWidget( parent ) { QHBoxLayout *box = new QHBoxLayout( this ); box->setMargin( 0 ); QLabel *lEffect = new QLabel( i18n("Effect:") ); box->addWidget( lEffect ); cEffect = new KComboBox( this ); connect( cEffect, SIGNAL(activated(int)), this, SLOT(effectChanged(int)) ); cEffect->addItem( i18n("Disabled") ); // cEffect->addItem( "allpass" ); // cEffect->addItem( "band" ); // cEffect->addItem( "bandpass" ); // cEffect->addItem( "bandreject" ); cEffect->addItem( "bass" ); // cEffect->addItem( "bend" ); // cEffect->addItem( "biquad" ); // cEffect->addItem( "chorus" ); // cEffect->addItem( "channels" ); // cEffect->addItem( "compand" ); // cEffect->addItem( "contrast" ); // cEffect->addItem( "dcshift" ); // cEffect->addItem( "deemph" ); // cEffect->addItem( "delay" ); // cEffect->addItem( "dither" ); // // cEffect1->addItem( "divide" ); // experimental // cEffect->addItem( "downsample" ); // cEffect->addItem( "earwax" ); // cEffect->addItem( "echo" ); // cEffect->addItem( "echos" ); // cEffect->addItem( "equalizer" ); // cEffect->addItem( "fade" ); // cEffect->addItem( "fir" ); // // cEffect1->addItem( "firfit" ); // experimental // cEffect->addItem( "flanger" ); // cEffect->addItem( "gain" ); // cEffect->addItem( "highpass" ); // cEffect->addItem( "hilbert" ); // // cEffect1->addItem( "input" ); // libSoX-only // cEffect->addItem( "ladspa" ); // cEffect->addItem( "loudness" ); // cEffect->addItem( "lowpass" ); // cEffect->addItem( "mcompand" ); // // cEffect1->addItem( "mixer" ); // deprecated // cEffect->addItem( "noiseprof" ); // cEffect->addItem( "noisered" ); cEffect->addItem( "norm" ); // cEffect->addItem( "oops" ); // // cEffect1->addItem( "output" ); // libSoX-only // cEffect->addItem( "overdrive" ); // cEffect->addItem( "pad" ); // cEffect->addItem( "phaser" ); // cEffect->addItem( "pitch" ); // cEffect->addItem( "rate" ); // cEffect->addItem( "remix" ); // cEffect->addItem( "repeat" ); // cEffect->addItem( "reverb" ); // cEffect->addItem( "reverse" ); // cEffect->addItem( "riaa" ); // cEffect->addItem( "silence" ); // cEffect->addItem( "sinc" ); // cEffect->addItem( "spectrogram" ); // cEffect->addItem( "speed" ); // cEffect->addItem( "splice" ); // cEffect->addItem( "stat" ); // cEffect->addItem( "stats" ); // cEffect->addItem( "stretch" ); // cEffect->addItem( "swap" ); // cEffect->addItem( "synth" ); // cEffect->addItem( "tempo" ); cEffect->addItem( "treble" ); // cEffect->addItem( "tremolo" ); // cEffect->addItem( "trim" ); // cEffect->addItem( "upsample" ); // cEffect->addItem( "vad" ); // cEffect->addItem( "vol" ); box->addWidget( cEffect ); widgetsBox = new QHBoxLayout(); box->addLayout( widgetsBox ); box->addStretch(); pRemove = new KPushButton( KIcon("list-remove"), i18n("Remove"), this ); pRemove->setToolTip( i18n("Remove this effect") ); box->addWidget( pRemove ); connect( pRemove, SIGNAL(clicked()), this, SLOT(removeClicked()) ); pAdd = new KPushButton( KIcon("list-add"), i18n("Add"), this ); pAdd->setToolTip( i18n("Add another effect") ); box->addWidget( pAdd ); connect( pAdd, SIGNAL(clicked()), SIGNAL(addEffectWidgetClicked()) ); pAdd->setEnabled( false ); }