// +----------------------------------------------------------- ft::FaceFitConfig::FaceFitConfig(QWidget *pParent) : QDialog(pParent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint), ui(new Ui::FaceFitConfig) { ui->setupUi(this); setFixedSize(size()); connect(ui->pathButton, SIGNAL(clicked()), this, SLOT(on_actionSelectPath_triggered())); connect(ui->pathEdit, SIGNAL(textChanged(QString)), this, SLOT(onPathChanged(QString))); connect(ui->buttonBox, SIGNAL(helpRequested()), this, SLOT(onShowHelp())); onPathChanged(ui->pathEdit->text()); }
MergeCmappedDialog::MergeCmappedDialog(TFilePath &levelPath) : Dialog(TApp::instance()->getMainWindow(), true, true, "Merge Tlv") , m_levelPath(levelPath) { bool ret = true; QString path = QString::fromStdWString(m_levelPath.getParentDir().getWideString()); QString name = QString::fromStdString(m_levelPath.getName()); setWindowTitle(tr(" Merge Tlv Levels")); m_saveInFileFld = new DVGui::FileField(0, path); ret = ret && connect(m_saveInFileFld, SIGNAL(pathChanged()), this, SLOT(onPathChanged())); addWidget(tr("Save in:"), m_saveInFileFld); m_fileNameFld = new DVGui::LineEdit(name + "_merged"); m_fileNameFld->setMaximumHeight(DVGui::WidgetHeight); ret = ret && connect(m_fileNameFld, SIGNAL(editingFinished()), SLOT(onNameChanged())); addWidget(tr("File Name:"), m_fileNameFld); QPushButton *okBtn = new QPushButton(tr("Apply"), this); okBtn->setDefault(true); QPushButton *cancelBtn = new QPushButton(tr("Cancel"), this); connect(okBtn, SIGNAL(clicked()), this, SLOT(accept())); connect(cancelBtn, SIGNAL(clicked()), this, SLOT(reject())); addButtonBarWidget(okBtn, cancelBtn); }
void SimpleList::do_connections() { connect(ui->tableViewFM, SIGNAL(clicked(QModelIndex)), this, SLOT(onRowClicked(QModelIndex))); connect(ui->tableViewFM, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(onOpenItem(QModelIndex))); connect(m_model, SIGNAL(pathChanged(QString)), this, SLOT(onPathChanged(QString))); connect(ui->toolButtonUp, SIGNAL(clicked()), m_model, SLOT(cdUp())); connect(ui->toolButtonBack, SIGNAL(clicked()), m_model, SLOT(goBack())); connect(ui->actionCopy, SIGNAL(triggered()), m_model, SLOT(copySelection())); connect(ui->actionCut, SIGNAL(triggered()), m_model, SLOT(cutSelection())); connect(ui->actionDelete, SIGNAL(triggered()), m_model, SLOT(removeSelection())); connect(ui->actionPaste, SIGNAL(triggered()), m_model, SLOT(paste())); connect(ui->actionMoveToTrash,SIGNAL(triggered()), m_model, SLOT(moveSelectionToTrash())); connect(ui->actionTerminnal, SIGNAL(triggered()), this, SLOT(onOpenTerminal())); connect(ui->actionRestoreFromTrash, SIGNAL(triggered()), m_model, SLOT(restoreSelectionFromTrash())); connect(ui->checkBoxShowDirs, SIGNAL(clicked(bool)), m_model, SLOT(setShowDirectories(bool))); connect(ui->checkBoxShowHidden, SIGNAL(clicked(bool)), m_model, SLOT(setShowHiddenFiles(bool))); connect(ui->checkBoxExtFsWatcher, SIGNAL(clicked(bool)), m_model, SLOT(setEnabledExternalFSWatcher(bool))); connect(ui->checkBoxShowMediaInfo, SIGNAL(clicked(bool)),m_model, SLOT(setReadsMediaMetadata(bool))); connect(ui->checkBoxMultiSelection,SIGNAL(clicked(bool)), m_selection, SLOT(setMultiSelection(bool))); connect(ui->comboBoxPath, SIGNAL(activated(int)), this, SLOT(onPathChoosedFromList(int))); connect(ui->comboBoxPath->lineEdit(), SIGNAL(returnPressed()), this, SLOT(onPathComboEdited())); connect(ui->tableViewFM->horizontalHeader(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), this, SLOT(onSetSort(int,Qt::SortOrder))); connect(m_model, SIGNAL(progress(int,int,int)), this, SLOT(onProgress(int,int,int))); connect(m_model, SIGNAL(clipboardChanged()), this, SLOT(onClipboardChanged())); connect(m_model, SIGNAL(error(QString,QString)), this, SLOT(onError(QString,QString))); connect(m_model, SIGNAL(awaitingResultsChanged()), this, SLOT(onStatusChanged())); connect(m_selection, SIGNAL(selectionChanged(int)), this, SLOT(onSelectionChanged(int))); connect(ui->listViewPlaces, SIGNAL(clicked(QModelIndex)), this, SLOT(onPlacesClicked(QModelIndex))); connect(m_pbar, SIGNAL(cancel()), this, SLOT(onCancelAction())); }
FileSystemWidget::FileSystemWidget(QWidget *parent) : QWidget(parent), ui(new Ui::FileSystemWidget) { ui->setupUi(this); m_delegate = new FileSystemItemDelegate(this); ui->listView->setItemDelegate(m_delegate); initModel(); ui->listView->setModel(m_sortModel); connect(ui->listView, SIGNAL(open(QModelIndex)),m_model, SLOT(cd(QModelIndex))); connect(ui->listView, SIGNAL(up()), m_model, SLOT(cdUp())); connect(ui->listView, SIGNAL(play(QStringList,bool,bool)), this, SLOT(play(QStringList,bool,bool))); initSearch(); ui->progressPanel->hide(); connect(ui->upButton, SIGNAL(clicked()), m_model, SLOT(cdUp())); connect(m_model, SIGNAL(upChanged(bool)),ui->upButton, SLOT(setEnabled(bool))); connect(m_model, SIGNAL(pathChanged()), this, SLOT(onPathChanged())); connect(ui->selectButton, SIGNAL(clicked()), this, SLOT(selectFolder())); connect(ui->playAllButton, SIGNAL(clicked()), this, SLOT(playAll())); connect(ui->playRootButton, SIGNAL(clicked()), this, SLOT(playRoot())); connect(ui->addAllButton, SIGNAL(clicked()), this, SLOT(addAll())); connect(ui->addRootButton, SIGNAL(clicked()), this, SLOT(addRoot())); m_scanDialog = new ScanProgressDialog(this); connect(m_scanDialog, SIGNAL(cancelled()), Player::instance()->folder(), SLOT(cancel())); connect(Player::instance()->folder(), SIGNAL(cancelled()), m_scanDialog, SLOT(onScanCancelled())); connect(Player::instance()->folder(), SIGNAL(scanPathChanged(QString)), m_scanDialog, SLOT(setScanPath(QString))); connect(Player::instance()->folder(), SIGNAL(finished(int)), m_scanDialog, SLOT(onScanFinished(int))); m_scanDialogTimer.setSingleShot(true); connect(&m_scanDialogTimer, SIGNAL(timeout()), this, SLOT(showScanDialog())); connect(Player::instance()->folder(), SIGNAL(finished(int)), &m_scanDialogTimer, SLOT(stop())); }
CategorySettingsPage::CategorySettingsPage(QWidget *parent) : SettingsPage(parent), m_model(new CategoryModel(this)), m_view(new QTreeView(this)), m_nameEdit(new QLineEdit(this)), m_pathEdit(new QLineEdit(this)), m_pathButton(new QPushButton(QIcon::fromTheme("document-open"), tr("&Browse"), this)), m_saveButton(new QPushButton(QIcon::fromTheme("document-save"), tr("&Save"), this)), m_layout(new QFormLayout(this)) { setWindowTitle(tr("Categories")); m_view->setModel(m_model); m_view->setAlternatingRowColors(true); m_view->setSelectionBehavior(QTreeView::SelectRows); m_view->setContextMenuPolicy(Qt::CustomContextMenu); m_view->setEditTriggers(QTreeView::NoEditTriggers); m_view->setItemsExpandable(false); m_view->setUniformRowHeights(true); m_view->setAllColumnsShowFocus(true); m_view->setRootIsDecorated(false); m_view->header()->setStretchLastSection(true); m_saveButton->setEnabled(false); m_layout->addRow(m_view); m_layout->addRow(tr("&Name:"), m_nameEdit); m_layout->addRow(tr("&Path:"), m_pathEdit); m_layout->addWidget(m_pathButton); m_layout->addWidget(m_saveButton); connect(m_view, SIGNAL(clicked(QModelIndex)), this, SLOT(setCurrentCategory(QModelIndex))); connect(m_view, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint))); connect(m_nameEdit, SIGNAL(textChanged(QString)), this, SLOT(onNameChanged(QString))); connect(m_nameEdit, SIGNAL(returnPressed()), m_saveButton, SLOT(animateClick())); connect(m_pathEdit, SIGNAL(textChanged(QString)), this, SLOT(onPathChanged(QString))); connect(m_pathEdit, SIGNAL(returnPressed()), m_saveButton, SLOT(animateClick())); connect(m_pathButton, SIGNAL(clicked()), this, SLOT(showFileDialog())); connect(m_saveButton, SIGNAL(clicked()), this, SLOT(addCategory())); }