void UpsamplingParaDlg::initConnects() { if (!connect(area,SIGNAL(needUpdateStatus()),this,SLOT(initWidgets()))) { cout << "can not connect signal" << endl; } connect(ui->radius,SIGNAL(valueChanged(double)),this,SLOT(getRadiusValues(double))); connect(ui->sigma,SIGNAL(valueChanged(double)),this,SLOT(getSigma(double))); connect(ui->add_num,SIGNAL(valueChanged(int)),this,SLOT(setNum(int))); connect(ui->using_threshol_process,SIGNAL(clicked(bool)),this,SLOT(setUsingThresholdProcess(bool))); connect(ui->threshold,SIGNAL(valueChanged(double)),this,SLOT(setThreshold(double))); connect(ui->apply_add_point,SIGNAL(clicked()),this,SLOT(runAddPts())); connect(ui->pushButton_Projection,SIGNAL(clicked()),this,SLOT(runProjection())); connect(ui->edge_paramete,SIGNAL(valueChanged(double)),this,SLOT(setEdgeParameter(double))); connect(ui->begin_index,SIGNAL(valueChanged(double)),this,SLOT(getBeginIndex(double))); connect(ui->end_index,SIGNAL(valueChanged(double)),this,SLOT(getEndIndex(double))); connect(ui->video_speed,SIGNAL(valueChanged(double)),this,SLOT(getSpeed(double))); connect(ui->pushButton_play_video,SIGNAL(clicked()),this,SLOT(applyPlayVideo())); connect(ui->wlop_snapshot_resolution,SIGNAL(valueChanged(double)),this,SLOT(getSnapShotResolution(double))); connect(ui->wlop_snapshot_index,SIGNAL(valueChanged(double)),this,SLOT(getSnapShotIndex(double))); }
BtBookshelfWidget::BtBookshelfWidget(QWidget *parent, Qt::WindowFlags flags) : QWidget(parent, flags) , m_sourceModel(nullptr) , m_treeModel(nullptr) , m_leftCornerWidget(nullptr) , m_rightCornerWidget(nullptr) { // Setup post-filter: m_postFilterModel = new BtBookshelfFilterModel(this); // Init widgets and such: initActions(); initMenus(); initWidgets(); // Connect treeview to model: m_treeView->setModel(m_postFilterModel); retranslateUi(); BT_CONNECT(m_nameFilterEdit, SIGNAL(textEdited(QString)), m_postFilterModel, SLOT(setNameFilterFixedString(QString))); BT_CONNECT(m_treeView, SIGNAL(contextMenuActivated(QPoint)), this, SLOT(slotShowContextMenu(QPoint))); BT_CONNECT(m_treeView, SIGNAL(moduleContextMenuActivated(CSwordModuleInfo *, QPoint)), this, SLOT(slotShowItemContextMenu(CSwordModuleInfo *, QPoint))); }
int main(int argc, char **argv) { exitCode = 0; initGtk(&argc, &argv); migrateConfigToXdgDir(); migrateThemesToXdgDir(); initDataDefault(); if (parseCommandline(&argc, &argv)) { if(initLockFile()) { printMessage(MSG_INFO, "Startup %s %s (-h to print usage)\n", OBS_NAME, OBS_VERSION); if (initConfigs()) { initWidgets(); gtk_widget_show_all(winWidget); gtk_main(); } else exitCode = 1; deleteLockFile(); } else exitCode = 1; } else exitCode = 1; freeData(); exit(exitCode); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), scene(new QGraphicsScene(this)), view(new QGraphicsView(scene, this)), pbLoadFile(new QPushButton("Load Input", this)), lbLoadFile(new QLabel("<input file>", this)), pbLoadLog(new QPushButton("Load Log", this)), lbLoadLog(new QLabel("<input log>", this)), pbLoadMap(new QPushButton("Load Map", this)), lbLoadMap(new QLabel("<input map>", this)), pbSaveMap(new QPushButton("Save Map", this)), lbSaveMap(new QLabel("<output map>", this)), pbDumpLog(new QPushButton("Save Log", this)), lbDumpLog(new QLabel("<output log>", this)), pbRun(new QPushButton("Run", this)), pbCancel(new QPushButton("Cancel", this)), pbSave(new QPushButton("Save", this)), prog(new QProgressBar(this)), mapper(prog) { initWidgets(); createForm(); createConnections(); }
caScan2D::caScan2D(QWidget *parent) : QWidget(parent) { m_init = true; m_widthDefined = false; m_heightDefined = false; m_xcptDefined = false; m_ycptDefined = false; m_xnewdataDefined = false; m_ynewdataDefined = false; m_savedata_pathDefined = false; m_savedata_subdirDefined = false; m_savedata_filenameDefined = false; thisSimpleView = false; savedSize = 0; savedWidth = 0; savedHeight = 0; selectionInProgress = false; savedData = (float*) 0; initWidgets(); Xpos = Ypos = 0; scrollArea = (QScrollArea *) 0; mainLayout = new QGridLayout(this); mainLayout->setMargin(0); mainLayout->setSpacing(0); setLayout(mainLayout); setup(); setColormap(spectrum_wavelength); setCustomMap(""); setDiscreteCustomMap(false); setROIChannelsRead(""); setROIChannelsWrite(""); setROIreadType(none); setROIwriteType(none); setROIwritemarkerType(box); setROIreadmarkerType(box); setAccessW(true); installEventFilter(this); scaleFactor = 1.0; UpdatesPerSecond = 0; startTimer(1000); writeTimer = new QTimer(this); connect(writeTimer, SIGNAL(timeout()), this, SLOT(updateChannels())); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , m_defaultMasterDelay(5) , m_defaultLoginDelay(15) , m_defaultLength(8) , m_removeText(tr("&Remove URL && User")) , m_saveText(tr("&Save URL && User")) , m_saveToolTip(tr("Save current URL & User. Passwords are not saved.")) , m_removeToolTip(tr("Don't remember current URL & User anymore.")) , m_masterPasswordText(tr("<b>Master password:</b>")) , m_masterDelay(m_defaultMasterDelay) , m_loginDelay(m_defaultLoginDelay) , m_autoCopy(false) , m_autoClear(false) , m_alwaysOnTop(true) , m_masterEdit(new QLineEdit(this)) , m_masterLabel(new QLabel(this)) , m_userEdit(new QLineEdit(this)) , m_passwdEdit(new QLineEdit(this)) , m_urlCombo(new QComboBox(this)) , m_genButton(new QPushButton(tr("&Show password!"), this)) , m_saveButton(new QPushButton(m_saveText, this)) , m_lengthSpinBox(new QSpinBox(this)) , m_masterTimer(new QTimer) , m_timeLine(new QTimeLine) , m_settingsDlg(new SettingsDlg(this)) { setWindowTitle("Fleeting Password Manager"); setWindowIcon(QIcon(":/fleetingpm.png")); initWidgets(); initMenu(); initBackground(); loadSettings(); // Apply window flags if (m_alwaysOnTop) { setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint); } // Initialize the timer used when fading out the login details. m_timeLine->setDuration(m_loginDelay * 1000); connect(m_timeLine, SIGNAL(frameChanged(int)), this, SLOT(decreasePasswordAlpha(int))); connect(m_timeLine, SIGNAL(finished()), this, SLOT(invalidateAll())); m_timeLine->setFrameRange(0, 255); // Initialize the timer used when showing the // master password. m_masterTimer->setInterval(m_masterDelay * 60 * 1000); m_masterTimer->setSingleShot(true); connect(m_masterTimer, SIGNAL(timeout()), m_masterEdit, SLOT(clear())); connect(m_masterEdit, SIGNAL(textChanged(QString)), m_masterTimer, SLOT(start())); // Load previous location or center the window. centerOrRestoreLocation(); }
/** Constructor @param complete True for this dialog to show the radio buttons that allow the user to specify whether the dimension is absolute, relative to the total width or relative to the remaining width. @param parent Parent QWidget */ TitleBlockDimensionWidget::TitleBlockDimensionWidget(bool complete, QWidget *parent) : QDialog(parent), complete_(complete), read_only_(false) { initWidgets(); initLayouts(); }
void CQHeaderView:: showEvent(QShowEvent *e) { initWidgets(); QHeaderView::showEvent(e); }
QWidget *qtdcmDataSource::mainViewWidget() { if ( d->mainWidget ) return d->mainWidget; initWidgets(); return d->mainWidget; }
ActiviteView::ActiviteView(Activite& a): a(&a) { initWidgets(); this->titre->setText(a.getTitre()); this->titre->setEnabled(false); this->details->setText(a.getDetails()); this->details->setEnabled(false); }
QWidget *qtdcmDataSource::sourceSelectorWidget() { if ( d->rightWidget ) return d->rightWidget; initWidgets(); return d->rightWidget; }
CSVDoc::Operation::Operation (int type, QWidget* parent) : mType (type), mStalling (false) { /// \todo Add a cancel button or a pop up menu with a cancel item initWidgets(); setBarColor( type); updateLabel(); /// \todo assign different progress bar colours to allow the user to distinguish easily between operation types }
/** Constructeur @param project projet a visualiser @param parent Widget parent */ ProjectView::ProjectView(QETProject *project, QWidget *parent) : QWidget(parent), project_(0) { initActions(); initWidgets(); initLayout(); setProject(project); }
mainView::mainView(QWidget *parent) : QWidget(parent), timer(new QTimer(this)) { setWindowTitle(tr("Life on Qt4.")); //setFixedSize(550, 420); timer->setInterval(250); initWidgets(); setWidgetLayout(); setConnections(); }
KMixWindow::KMixWindow(bool invisible) : KXmlGuiWindow(0, Qt::WindowContextHelpButtonHint), m_multiDriverMode(false), // -<- I never-ever want the multi-drivermode to be activated by accident m_dockWidget(), m_dsm(0), m_dontSetDefaultCardOnStart(false) { setObjectName(QLatin1String("KMixWindow")); // disable delete-on-close because KMix might just sit in the background waiting for cards to be plugged in setAttribute(Qt::WA_DeleteOnClose, false); initActions(); // init actions first, so we can use them in the loadConfig() already loadConfig(); // Load config before initMixer(), e.g. due to "MultiDriver" keyword initActionsLate(); // init actions that require a loaded config KGlobal::locale()->insertCatalog(QLatin1String("kmix-controls")); initWidgets(); initPrefDlg(); DBusMixSetWrapper::initialize(this, "/Mixers"); MixerToolBox::instance()->initMixer(m_multiDriverMode, m_backendFilter, m_hwInfoString); KMixDeviceManager *theKMixDeviceManager = KMixDeviceManager::instance(); initActionsAfterInitMixer(); // init actions that require initialized mixer backend(s). recreateGUI(false); if (m_wsMixers->count() < 1) { // Something is wrong. Perhaps a hardware or driver or backend change. Let KMix search harder recreateGUI(false, QString(), true); } if (!kapp->isSessionRestored() ) // done by the session manager otherwise setInitialSize(); fixConfigAfterRead(); theKMixDeviceManager->initHotplug(); connect(theKMixDeviceManager, SIGNAL(plugged(const char*,QString,QString&)), SLOT (plugged(const char*,QString,QString&))); connect(theKMixDeviceManager, SIGNAL(unplugged(QString)), SLOT (unplugged(QString))); if (m_startVisible && !invisible) show(); // Started visible connect(kapp, SIGNAL(aboutToQuit()), SLOT(saveConfig()) ); ControlManager::instance().addListener( QString(), // All mixers (as the Global master Mixer might change) (ControlChangeType::Type)(ControlChangeType::ControlList | ControlChangeType::MasterChanged), this, QString("KMixWindow") ); // Send an initial volume refresh (otherwise all volumes are 0 until the next change) ControlManager::instance().announce(QString(), ControlChangeType::Volume, QString("Startup")); }
Widget::Widget(QWidget *parent) : QMainWindow(parent) { initMenu(); initWidgets(); initConnexions(); statusBar(); m_timer = new QTimer(this); m_timer->setInterval(m_set.value("interval", 1000).toInt()); connect(m_timer, &QTimer::timeout, this, &Widget::nextWord); }
/** * @brief TimeTable::TimeTable 생성자 * @param parent 부모 위젯 */ TimeTable::TimeTable(QWidget *parent) : QMainWindow(parent) , _tableRows(0) , _tableCols(0) , _timeTable(0) , _named(false) { initMenus(); // 메뉴 초기화 initWidgets(); // 위젯 초기화 // newTimeTable() 을 나중에 이벤트 루프에서 호출 QMetaObject::invokeMethod(this, "newTimeTable", Qt::QueuedConnection); }
/** * @brief 생성자 * @param parent 부모 위젯 */ Puzzle::Puzzle(QWidget *parent) : QMainWindow(parent) , _emptyPiece(0) , _shuffle(false) , _tryCount(0) { initMenus(); // 메뉴 초기화 initWidgets(); // 위젯 초기화 initConnections(); // 시그널과 슬롯 연결 newPuzzle(); // 새 퍼즐 }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { qRegisterMetaType<QVector<SpectrumStruct> >("QVector<SpectrumStruct>"); setWindowTitle(TITLE); m_total_size = 0; m_paused = true; initWidgets(); qInstallMessageHandler(messageHandler); }
NormalParaDlg::NormalParaDlg(QWidget *p, ParameterMgr * _paras, GLArea * _area) : QFrame(p) { ui = new Ui::normal_paras; NormalParaDlg::ui->setupUi(this); area = _area; m_paras = _paras; if(!initWidgets()) { cerr << " NormalParaDlg::initWidgets failed." << endl; return; } initConnects(); }
KASearchSettings::KASearchSettings(const char *title, QWidget *parent, const char *name) :QGroupBox( title, parent, name ) { // setup the main organizer // mainlayout = new QGridLayout( this, 2, 2, 15, 0 ); // setup the searchlevel searchbox = new QGroupBox( this, "searchbox" ); searchbox->setFrameStyle( QFrame::NoFrame ); searchmode = new QComboBox( searchbox, "searchmode" ); // searchmode->insertStrList(&SearchMode::fullList()); searchlabel = new QLabel( searchmode, "S&earch Mode", searchbox, "searchlabel" ); searchlabel->adjustSize(); // setup the sorttype // sortbox = new QGroupBox( this, "sortbox" ); // sortbox->setFrameStyle( QFrame::NoFrame ); // sortmode = new QComboBox( sortbox, "sortmode" ); // sortlabel = new QLabel( sortmode, "S&ort Mode", sortbox, "sortlabel" ); // sortlabel->adjustSize(); // setup the weightsbox, belongs to sorttype // weightbox = new QGroupBox( this, "weightbox" ); // weightbox->setFrameStyle( QFrame::NoFrame ); // weightlist = new QListBox( weightbox, "weightlist" ); // weightlabel = new QLabel( weightlist, "&Weight", weightbox, "weightlabel" ); // weightlabel->adjustSize(); // setup the nicelevel nicebox = new QGroupBox( this, "nicebox" ); nicebox->setFrameStyle( QFrame::NoFrame ); nicelevel = new QComboBox( nicebox, "nicelevel" ); nicelabel = new QLabel( nicelevel, i18n("&Nice Level"), nicebox, "nicelabel" ); nicelabel->adjustSize(); // setup the hitslevel hitsbox = new QGroupBox( this, "hitsbox" ); hitsbox->setFrameStyle( QFrame::NoFrame ); maxhits = new KIntegerLine( hitsbox, "maxhits" ); hitslabel = new QLabel( maxhits, i18n("max. &Hits"), hitsbox, "hitslabel" ); hitslabel->adjustSize(); connect(maxhits, SIGNAL(returnPressed()), this, SLOT(slotRP()) ); initWidgets(); doLayout(); readConfig(); }
ServiceBrowser::ServiceBrowser(QWidget *parent, Qt::WindowFlags flags) : QWidget(parent, flags) { serviceManager = new QServiceManager(this); systemManager = new QServiceManager(QService::SystemScope); #ifndef Q_OS_SYMBIAN registerExampleServices(); #endif initWidgets(); reloadServicesList(); setWindowTitle(tr("Services Browser")); }
MaterialEditor::MaterialEditor(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); ui.rollup->initialize(); // ui.rollup->setGroupVisible("root", false); ui.matTree->header()->setHidden(true); ui.matTree->setRoot("/"); ui.matTree->setFilter("*.mtr"); ui.matTree->refresh(); initWidgets(); }
/** @param parent parent QWidget of this window */ QETTitleBlockTemplateEditor::QETTitleBlockTemplateEditor(QWidget *parent) : QETMainWindow(parent), opened_from_file_(false), read_only_(false), duplicate_(false), tb_template_(0), logo_manager_(0) { setWindowIcon(QET::Icons::QETLogo); setAttribute(Qt::WA_DeleteOnClose); initWidgets(); initActions(); initMenus(); initToolbars(); readSettings(); }
UpsamplingParaDlg::UpsamplingParaDlg(QWidget *p, ParameterMgr * _paras, GLArea * _area) : QFrame(p) { ui = new Ui::Upsampling_para; UpsamplingParaDlg::ui->setupUi(this); m_paras = _paras; area = _area; video_begin_index = 0; video_end_index = 0; video_speed = 1.1; if(!initWidgets()) { cout << "Warning: UpsamplingParaDlg::initWidgets failed!" << endl; return ; } initConnects(); }
McaEditorWgt::McaEditorWgt(McaEditor *editor) : MaEditorWgt(editor) { rowHeightController = new McaRowHeightController(this); refCharController = new McaReferenceCharController(this, editor); initActions(); initWidgets(); refArea = new McaEditorReferenceArea(this, getEditor()->getReferenceContext()); connect(refArea, SIGNAL(si_selectionChanged()), statusBar, SLOT(sl_update())); seqAreaHeaderLayout->insertWidget(0, refArea); MaEditorConsensusAreaSettings consSettings; consSettings.visibleElements = MSAEditorConsElement_CONSENSUS_TEXT | MSAEditorConsElement_RULER; consSettings.highlightMismatches = true; consArea->setDrawSettings(consSettings); MSAConsensusAlgorithmFactory* algoFactory = AppContext::getMSAConsensusAlgorithmRegistry()->getAlgorithmFactory(BuiltInConsensusAlgorithms::SIMPLE_EXTENDED_ALGO); consArea->setConsensusAlgorithm(algoFactory); QString name = getEditor()->getReferenceContext()->getSequenceObject()->getSequenceName(); QWidget *refName = createHeaderLabelWidget(tr("Reference %1:").arg(name), Qt::Alignment(Qt::AlignRight | Qt::AlignVCenter), refArea); refName->setObjectName("reference label container widget"); nameAreaLayout->insertWidget(0, refName); QVector<U2Region> itemRegions; for (int i = 0; i < editor->getNumSequences(); i++) { itemRegions << U2Region(i, 1); } collapseModel->setTrivialGroupsPolicy(MSACollapsibleItemModel::Allow); collapseModel->reset(itemRegions); collapseModel->collapseAll(false); collapseModel->setFakeCollapsibleModel(true); collapsibleMode = true; McaEditorConsensusArea* mcaConsArea = qobject_cast<McaEditorConsensusArea*>(consArea); SAFE_POINT(mcaConsArea != NULL, "Failed to cast consensus area to MCA consensus area", ); connect(mcaConsArea->getMismatchController(), SIGNAL(si_selectMismatch(int)), refArea, SLOT(sl_selectMismatch(int))); }
MainForm::MainForm(QWidget *parent):QWidget(parent) { // Icon für die Anwendung festlegen QIcon Icon(":/img/gnuboy.png"); qApp->setWindowIcon(Icon); this->setWindowTitle(trUtf8("KBoy")); // Objektmember initialisieren Spieleliste=new CGBSpielListModel(); Spieleliste->fromXml(QDir::homePath()+"/.kboy/gamelist.xml"); // Wenn Datei nicht geladen werden kann, bleibt die Liste leer Gnuboy=new QProcess(this); // Grafische Oberfläche aufbauen initWidgets(); buildGUI(); configureWidgets(); // Signal-/Slot-Objekte verknüpfen connectObjects(); }
MainWindow::MainWindow() : KMainWindow() { /* Draw main window */ initWidgets(); /* Load JPEG support from KDE library */ KImageIO::registerFormats(); /* Initialize interface & gPhoto2 */ GPInterface::initialize(); /* Set window size */ setGeometry(GPInterface::getGeometry()); /* Check if a camera is configured */ if (GPInterface::getCamera().isNull()) selectCamera(); statusBar()->message(i18n("Ready")); }
void NormalParaDlg::initConnects() { if (!connect(area,SIGNAL(needUpdateStatus()),this,SLOT(initWidgets()))) { cout << "can not connect signal" << endl; } if(!connect(ui->radius,SIGNAL(valueChanged(double)),this,SLOT(getRadiusValues(double)))) { cerr << "cannot connect WlopParaDlg::getDoubleValues(double)." << endl; } connect(ui->radius,SIGNAL(valueChanged(double)),this,SLOT(getRadiusValues(double))); connect(ui->sigma,SIGNAL(valueChanged(double)),this,SLOT(getSigma(double))); connect(ui->KNN,SIGNAL(valueChanged(int)),this,SLOT(getKNN(int))); connect(ui->normal_smoothing,SIGNAL(clicked()),this,SLOT(applyNormalSmoothing())); connect(ui->normal_PCA,SIGNAL(clicked()),this,SLOT(applyPCANormal())); connect(ui->pushButton_reorientate_normal,SIGNAL(clicked()),this,SLOT(reorientateNormal())); connect(ui->use_anistropic_PCA, SIGNAL(clicked(bool)),this,SLOT(isAPCA(bool))); connect(ui->smooth_normal_interate_num,SIGNAL(valueChanged(int)),this,SLOT(getIterateNum(int))); }
MainWindow::MainWindow(QWidget* parent) :QMainWindow(parent) , _viewerWidget(NULL) , _projectObject(NULL) , _objectsTreeDockWidget(NULL) , _propertyDockWidget(NULL) , _vdsResourcesDockWidget(NULL) , _animationMergeDialog(NULL) , _viewPointDockWidget(NULL) , _plantBrushDockWidget(NULL) , _particleEditDialog(NULL) , _builtinResourcesDockWidget(NULL) , _viewPointAnimationWidget(NULL) , _physicalEditDockWidget(NULL) , _csharpAssemblyDockWidget(NULL) , _riverEditDockWidget(NULL) , _plotEditDockWidget(NULL) { initWidgets(); initMenu(); setWindowIcon(QIcon(":/images/vds.png")); resize(800, 600); }