void FileBrowser::onAcceptPressed() { QStringList *list = new QStringList(this->txtFilename->text()); int ret = 0; if (exists(list->at(0)) && (this->mMode == FileBrowser::SAVE)) { ret = QMessageBox::question(this, tr("Remote File Browser"), tr("The file already exists!\n Do you want to overwrite it?"), QMessageBox::Save | QMessageBox::Cancel, QMessageBox::Save); } this->mFilename = list; //emit fileload event here QString file = mFilename->at(0); if (!(ret == QMessageBox::Cancel) && (list->at(0) != "")) { emit fileSelected(file, this->mLocationPath, this->chkLoadAllClients->isChecked()); this->hide(); } else { /** * Take the local stored path location and return it as selected path * */ emit pathSelected(file, mLocationPath); this->hide(); } }
bool HelpWindow::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: setBackwardAvailable((bool)static_QUType_bool.get(_o+1)); break; case 1: setForwardAvailable((bool)static_QUType_bool.get(_o+1)); break; case 2: sourceChanged((const QString&)static_QUType_QString.get(_o+1)); break; case 3: about(); break; case 4: aboutQt(); break; case 5: openFile(); break; case 6: newWindow(); break; case 7: print(); break; case 8: pathSelected((const QString&)static_QUType_QString.get(_o+1)); break; case 9: histChosen((int)static_QUType_int.get(_o+1)); break; case 10: bookmChosen((int)static_QUType_int.get(_o+1)); break; case 11: addBookmark(); break; default: return QMainWindow::qt_invoke( _id, _o ); } return TRUE; }
ctkCmdLineModuleExplorerModulesSettings::ctkCmdLineModuleExplorerModulesSettings(ctkCmdLineModuleManager *moduleManager) : ui(new Ui::ctkCmdLineModuleExplorerModulesSettings) , ModuleManager(moduleManager) , ShowXmlAction(new ctkCmdLineModuleExplorerShowXmlAction(this)) , ModulesRegistered(false) { ui->setupUi(this); ui->PathListButtonsWidget->init(ui->PathListWidget); ui->PathListWidget->addAction(this->ShowXmlAction); ui->PathListWidget->setContextMenuPolicy(Qt::ActionsContextMenu); this->ShowXmlAction->setEnabled(false); connect(ui->PathListWidget, SIGNAL(currentPathChanged(QString,QString)), SLOT(pathSelected(QString))); connect(ui->PathListWidget, SIGNAL(pathsChanged(QStringList,QStringList)), SLOT(pathsAdded(QStringList))); this->registerProperty(ctkCmdLineModuleExplorerConstants::KEY_REGISTERED_MODULES, ui->PathListWidget, "paths", SIGNAL(pathsChanged(QStringList,QStringList))); }
void PathWindow::moveClicked(QListWidgetItem* item) { emit pathSelected(currentRow()); }