QgsRendererV2PropertiesDialog::QgsRendererV2PropertiesDialog( QgsVectorLayer* layer, QgsStyleV2* style, bool embedded ) : mLayer( layer ), mStyle( style ), mActiveWidget( NULL ) { setupUi( this ); // can be embedded in vector layer properties if ( embedded ) { buttonBox->hide(); layout()->setContentsMargins( 0, 0, 0, 0 ); } connect( buttonBox, SIGNAL( accepted() ), this, SLOT( onOK() ) ); connect( btnSymbolLevels, SIGNAL( clicked() ), this, SLOT( showSymbolLevels() ) ); connect( btnOldSymbology, SIGNAL( clicked() ), this, SLOT( useOldSymbology() ) ); // initialize registry's widget functions _initRendererWidgetFunctions(); QPixmap pix; QgsRendererV2Registry* reg = QgsRendererV2Registry::instance(); QStringList renderers = reg->renderersList(); foreach( QString name, renderers ) { QgsRendererV2AbstractMetadata* m = reg->rendererMetadata( name ); cboRenderers->addItem( m->icon(), m->visibleName(), name ); }
QgsOSMDownloadDialog::QgsOSMDownloadDialog( QWidget* parent ) : QDialog( parent ) , mDownload( new QgsOSMDownload ) { setupUi( this ); editXMin->setValidator( new QDoubleValidator( -180.0, 180.0, 6, this ) ); editXMax->setValidator( new QDoubleValidator( -180.0, 180.0, 6, this ) ); editYMin->setValidator( new QDoubleValidator( -90.0, 90.0, 6, this ) ); editYMax->setValidator( new QDoubleValidator( -90.0, 90.0, 6, this ) ); populateLayers(); onExtentCanvas(); connect( radExtentCanvas, SIGNAL( clicked() ), this, SLOT( onExtentCanvas() ) ); connect( radExtentLayer, SIGNAL( clicked() ), this, SLOT( onExtentLayer() ) ); connect( radExtentManual, SIGNAL( clicked() ), this, SLOT( onExtentManual() ) ); connect( cboLayers, SIGNAL( currentIndexChanged( int ) ), this, SLOT( onCurrentLayerChanged( int ) ) ); connect( btnBrowse, SIGNAL( clicked() ), this, SLOT( onBrowseClicked() ) ); connect( buttonBox, SIGNAL( accepted() ), this, SLOT( onOK() ) ); connect( buttonBox, SIGNAL( rejected() ), this, SLOT( onClose() ) ); connect( mDownload, SIGNAL( finished() ), this, SLOT( onFinished() ) ); connect( mDownload, SIGNAL( downloadProgress( qint64, qint64 ) ), this, SLOT( onDownloadProgress( qint64, qint64 ) ) ); }
ParameterEstimationDialog::ParameterEstimationDialog(QWidget *parent) : QDialog(parent) { ui.setupUi(this); QButtonGroup group(this); group.addButton(ui.radioButtonStreetView); group.addButton(ui.radioButtonAerialView); ui.lineEditCGADirectory->setText("../cga/mass"); ui.lineEditTestDataDirectory->setText("C:/Anaconda/caffe/contour_regression/data"); ui.lineEditRegressionDirectory->setText("C:/Anaconda/caffe/contour_regression"); ui.lineEditOutputDirectory->setText("results"); ui.checkBoxCentering->setChecked(true); ui.radioButtonStreetView->setChecked(true); ui.lineEditCameraDistance->setText("25"); ui.checkBoxSubtractMean->setChecked(false); ui.lineEditXrotMin->setText("50"); ui.lineEditXrotMax->setText("70"); ui.lineEditYrotMin->setText("20"); ui.lineEditYrotMax->setText("70"); ui.lineEditZrotMin->setText("-20"); ui.lineEditZrotMax->setText("20"); ui.lineEditFovMin->setText("10"); ui.lineEditFovMax->setText("10"); connect(ui.pushButtonCGADirectory, SIGNAL(clicked()), this, SLOT(onCGADirectory())); connect(ui.pushButtonTestDataDirectory, SIGNAL(clicked()), this, SLOT(onTestDataDirectory())); connect(ui.pushButtonRegressionDirectory, SIGNAL(clicked()), this, SLOT(onRegressionDirectory())); connect(ui.pushButtonOutputDirectory, SIGNAL(clicked()), this, SLOT(onOutputDirectory())); connect(ui.pushButtonOK, SIGNAL(clicked()), this, SLOT(onOK())); connect(ui.pushButtonCancel, SIGNAL(clicked()), this, SLOT(onCancel())); }
QgsLabelEngineConfigDialog::QgsLabelEngineConfigDialog( QgsPalLabeling* lbl, QWidget* parent ) : QDialog( parent ), mLBL( lbl ) { setupUi( this ); connect( buttonBox, SIGNAL( accepted() ), this, SLOT( onOK() ) ); connect( buttonBox->button( QDialogButtonBox::RestoreDefaults ), SIGNAL( clicked() ), this, SLOT( setDefaults() ) ); // search method cboSearchMethod->setCurrentIndex( mLBL->searchMethod() ); // candidate numbers int candPoint, candLine, candPolygon; mLBL->numCandidatePositions( candPoint, candLine, candPolygon ); spinCandPoint->setValue( candPoint ); spinCandLine->setValue( candLine ); spinCandPolygon->setValue( candPolygon ); chkShowCandidates->setChecked( mLBL->isShowingCandidates() ); chkShowAllLabels->setChecked( mLBL->isShowingAllLabels() ); mShadowDebugRectChkBox->setChecked( mLBL->isShowingShadowRectangles() ); mSaveWithProjectChkBox->setChecked( mLBL->isStoredWithProject() ); chkShowPartialsLabels->setChecked( mLBL-> isShowingPartialsLabels() ); }
bool LoadSaveWindow::handleKeyPress(SDL_KeyboardEvent& key) { if(pChildWindow != NULL) { bool ret = pChildWindow->handleKeyPress(key); return ret; } if(isEnabled() && (pWindowWidget != NULL)) { if(key.keysym.sym == SDLK_RETURN) { onOK(); return true; } else if(key.keysym.sym == SDLK_DELETE) { int index = fileList.getSelectedIndex(); if(index >= 0) { QstBox* pQstBox = QstBox::create( strprintf(_("Do you really want to delete '%s' ?"), fileList.getEntry(index).c_str()), _("No"), _("Yes"), QSTBOX_BUTTON2); pQstBox->setTextColor(color); openWindow(pQstBox); } return true; } else { return pWindowWidget->handleKeyPress(key); } } else { return false; } }
void AddDeviceToTimerDlg::layoutWindow() { QHBoxLayout *hLayout; QVBoxLayout *mainLayout = new QVBoxLayout(); m_deviceSelect = new QComboBox; m_deviceSelect->setMinimumWidth(250); for (int i = 0; i < m_deviceList.count(); i++) m_deviceSelect->addItem(InsteonDevice::deviceIDToString(m_deviceList[i].deviceID) + ":" + m_deviceList[i].name, m_deviceList[i].deviceID); mainLayout->addWidget(m_deviceSelect); hLayout = new QHBoxLayout(); m_okButton = new QPushButton("OK"); m_cancelButton = new QPushButton("Cancel"); hLayout->addStretch(); hLayout->addWidget(m_okButton); hLayout->addWidget(m_cancelButton); mainLayout->addSpacing(12); mainLayout->addLayout(hLayout); setLayout(mainLayout); connect(m_okButton, SIGNAL(clicked()), this, SLOT(onOK())); connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject())); };
SerialPortDlg::SerialPortDlg(QWidget *parent, QSettings *settings) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint), m_settings(settings) { layoutWindow(); connect(m_okBtn, SIGNAL(clicked()), this, SLOT(onOK())); connect(m_cancelBtn, SIGNAL(clicked()), this, SLOT(onCancel())); setWindowTitle("Configure Gateway"); }
virtual bool onCommand(int id, HWND hwndCtl, UINT codeNotify) { switch (id) { case IDOK: return onOK(); case IDCANCEL: return onCancel(); } return mxWindow::onCommand(id, hwndCtl, codeNotify); }
QgsRendererV2PropertiesDialog::QgsRendererV2PropertiesDialog( QgsVectorLayer* layer, QgsStyleV2* style, bool embedded ) : mLayer( layer ) , mStyle( style ) , mActiveWidget( nullptr ) , mPaintEffect( nullptr ) , mMapCanvas( nullptr ) { setupUi( this ); // can be embedded in vector layer properties if ( embedded ) { buttonBox->hide(); layout()->setContentsMargins( 0, 0, 0, 0 ); } connect( buttonBox, SIGNAL( accepted() ), this, SLOT( onOK() ) ); // initialize registry's widget functions _initRendererWidgetFunctions(); // Blend mode mBlendModeComboBox->setBlendMode( mLayer->blendMode() ); // Feature blend mode mFeatureBlendComboBox->setBlendMode( mLayer->featureBlendMode() ); // Layer transparency mLayerTransparencySlider->setValue( mLayer->layerTransparency() ); mLayerTransparencySpnBx->setValue( mLayer->layerTransparency() ); // connect layer transparency slider and spin box connect( mLayerTransparencySlider, SIGNAL( valueChanged( int ) ), mLayerTransparencySpnBx, SLOT( setValue( int ) ) ); connect( mLayerTransparencySpnBx, SIGNAL( valueChanged( int ) ), mLayerTransparencySlider, SLOT( setValue( int ) ) ); //paint effect widget if ( mLayer->rendererV2() ) { if ( mLayer->rendererV2()->paintEffect() ) { mPaintEffect = mLayer->rendererV2()->paintEffect()->clone(); mEffectWidget->setPaintEffect( mPaintEffect ); } mOrderBy = mLayer->rendererV2()->orderBy(); } QgsRendererV2Registry* reg = QgsRendererV2Registry::instance(); QStringList renderers = reg->renderersList(); Q_FOREACH ( const QString& name, renderers ) { QgsRendererV2AbstractMetadata* m = reg->rendererMetadata( name ); cboRenderers->addItem( m->icon(), m->visibleName(), name ); }
SerialDlg::SerialDlg(QWidget *parent, QString *portName) : QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint) { m_portName = portName; layoutWindow(); connect(m_okButton, SIGNAL(clicked()), this, SLOT(onOK())); connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject())); setWindowTitle("Select serial port"); }
void prefDialog::connectSlots() { connect(ui.okPushButton, SIGNAL(clicked()), this, SLOT(onOK()) ); connect(ui.cancelPushButton, SIGNAL(clicked()), this, SLOT(onCancel()) ); connect(ui.selectsoundPushButton, SIGNAL(clicked()), this, SLOT(onSound()) ); connect(ui.selectPlayerPushButton, SIGNAL(clicked()), this, SLOT(onPlayer()) ); connect(ui.choosehttpPushButton, SIGNAL(clicked()), this, SLOT(onHttp()) ); connect(ui.browsePushButton, SIGNAL(clicked()), this, SLOT(onBrowse()) ); connect(ui.imagePushButton, SIGNAL(clicked()), this, SLOT(onImage()) ); connect(ui.poolPushButton, SIGNAL(clicked()), this, SLOT(onPool()) ); connect(ui.resetPushButton, SIGNAL(clicked()), this, SLOT(onReset()) ); }
CircleDetectionScaleInputDialog::CircleDetectionScaleInputDialog(MainWindow* mainWin) : QDialog((QWidget*)mainWin) { this->mainWin = mainWin; // set up the UI ui.setupUi(this); ui.lineEditScale->setText("500.0"); // register the event handlers connect(ui.okButton, SIGNAL(clicked()), this, SLOT(onOK())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(onCancel())); hide(); }
int MyFileDialog::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: onOK(); break; case 1: onCancel(); break; } _id -= 2; } return _id; }
TerrainSizeInputDialog::TerrainSizeInputDialog(MainWindow* mainWin) : QDialog((QWidget*)mainWin) { this->mainWin = mainWin; // set up the UI ui.setupUi(this); ui.lineEditSide->setText("6000"); ui.lineEditCellResolution->setText("200"); // register the event handlers connect(ui.okButton, SIGNAL(clicked()), this, SLOT(onOK())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(onCancel())); hide(); }
// virtual LRESULT PropertyPage::wndProc(UINT msg, WPARAM wp, LPARAM lp) { switch(msg) { case WM_NOTIFY: switch(LPNMHDR(lp)->code) { case PSN_APPLY: onOK(); return TRUE; case PSN_QUERYCANCEL: onCancel(); return TRUE; } } return Dialog::wndProc(msg, wp, lp); }
SampleChooserDialog::SampleChooserDialog(const K::File& lastFile, QWidget *parent) : QDialog(parent), ui(new Ui::SampleChooserDialog) { ui->setupUi(this); // create directory model K::File root("samples"); std::string rootPath = root.getAbsolutePath(); dirModel = new QFileSystemModel(this); dirModel->setFilter(QDir::NoDotAndDotDot | QDir::Dirs); ui->treeFolders->setModel(dirModel); ui->treeFolders->setRootIndex(dirModel->setRootPath( rootPath.c_str() )); ui->treeFolders->hideColumn(1); ui->treeFolders->hideColumn(2); ui->treeFolders->hideColumn(3); // create file model fileModel = new QFileSystemModel(this); fileModel->setFilter(QDir::NoDotAndDotDot | QDir::Files); ui->listFiles->setModel(fileModel); //ui->listFiles->setRootIndex(fileModel->setRootPath( rootPath.c_str() )); // select start path std::string startPath = ""; std::string startFile = ""; if (lastFile.isFolder()) { startPath = lastFile.getAbsolutePath(); } else { startPath = lastFile.getParent().getAbsolutePath(); startFile = lastFile.getAbsolutePath(); } ui->treeFolders->setCurrentIndex(dirModel->index( startPath.c_str() )); ui->listFiles->setRootIndex(fileModel->setRootPath( startPath.c_str() )); if (!startFile.empty()) { ui->listFiles->setCurrentIndex(fileModel->index( startFile.c_str() )); } // signals connect(ui->btnCancel, SIGNAL(clicked()), this, SLOT(onCancel())); connect(ui->btnOk, SIGNAL(clicked()), this, SLOT(onOK())); connect(ui->treeFolders->selectionModel(), SIGNAL(currentRowChanged(QModelIndex, QModelIndex)), this, SLOT(onFolderSelect(QModelIndex, QModelIndex))); connect(ui->listFiles->selectionModel(), SIGNAL(currentRowChanged(QModelIndex, QModelIndex)), this, SLOT(onFileSelect(QModelIndex, QModelIndex))); }
QgsOSMImportDialog::QgsOSMImportDialog( QWidget* parent ) : QDialog( parent ) , mImport( new QgsOSMXmlImport ) { setupUi( this ); connect( btnBrowseXml, SIGNAL( clicked() ), this, SLOT( onBrowseXml() ) ); connect( btnBrowseDb, SIGNAL( clicked() ), this, SLOT( onBrowseDb() ) ); connect( editXmlFileName, SIGNAL( textChanged( const QString& ) ), this, SLOT( xmlFileNameChanged( const QString& ) ) ); connect( editDbFileName, SIGNAL( textChanged( const QString& ) ), this, SLOT( dbFileNameChanged( const QString& ) ) ); connect( buttonBox, SIGNAL( accepted() ), this, SLOT( onOK() ) ); connect( buttonBox, SIGNAL( rejected() ), this, SLOT( onClose() ) ); connect( mImport, SIGNAL( progress( int ) ), this, SLOT( onProgress( int ) ) ); }
ImageGenerationDialog::ImageGenerationDialog(QWidget *parent) : QDialog(parent) { ui.setupUi(this); //ui.lineEditOutputDirectory->setText("C:/Anaconda/caffe/facade/data/images"); ui.lineEditOutputDirectory->setText("//cuda.cs.purdue.edu/scratch2/facade/data/images"); ui.lineEditNumImages->setText("10000"); ui.lineEditImageSize->setText("227"); ui.checkBoxGrayscale->setChecked(false); ui.lineEditEdgeDisplacement->setText("10"); ui.lineEditMissingWindows->setText("10"); connect(ui.pushButtonOutputDirectory, SIGNAL(clicked()), this, SLOT(onOutputDirectory())); connect(ui.pushButtonOK, SIGNAL(clicked()), this, SLOT(onOK())); connect(ui.pushButtonCancel, SIGNAL(clicked()), this, SLOT(onCancel())); }
PreferencesDialog::PreferencesDialog(QWidget *parent) : QDialog(parent, Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint), ui(new Ui::PreferencesDialog), mTableWorkingHours(NULL) { ui->setupUi(this); mTableWorkingHours = ui->tableViewWorkingHours; ui->lineEditUserName->setText(Misc::getUserName()); ui->lineEditRealName->setText(TimeTrackingSettings::getInstance()->getPrintingRealName()); ui->checkBoxDisplayImage->setChecked(TimeTrackingSettings::getInstance()->getPrintingShowPicture()); ui->textEditFooter->setText(TimeTrackingSettings::getInstance()->getPrintingFooter()); ui->checkBoxEnableDefaultActions->setCheckState( TimeTrackingSettings::getInstance()->getEnablePeriodDefaultAction() ? Qt::Checked : Qt::Unchecked); ui->timeEditDefaultAction->setTime(TimeTrackingSettings::getInstance()->getPeriodDefaultAction()); connect(ui->timeEditDefaultAction, SIGNAL(timeChanged(QTime)), this, SLOT(onTimeChangedDefaultAction(QTime))); connect(ui->checkBoxEnableDefaultActions, SIGNAL(stateChanged(int)), this, SLOT(onStateChangedDefaultAction(int))); ui->checkBoxRemindPauseTime->setCheckState( TimeTrackingSettings::getInstance()->getEnablePeriodPauseTime() ? Qt::Checked : Qt::Unchecked); ui->timeEditRemindPauseTime->setTime(TimeTrackingSettings::getInstance()->getPeriodPauseTime()); connect(ui->timeEditRemindPauseTime, SIGNAL(timeChanged(QTime)), this, SLOT(onTimeChangedPauseTime(QTime))); connect(ui->checkBoxRemindPauseTime, SIGNAL(stateChanged(int)), this, SLOT(onStateChangedPauseTime(int))); connect(ui->pushButtonAddAction, SIGNAL(clicked()), this, SLOT(onAddAction())); connect(ui->pushButtonDeleteAction, SIGNAL(clicked()), this, SLOT(onDeleteAction())); connect(ui->tableWidgetActions->selectionModel(), SIGNAL(currentChanged(const QModelIndex &,const QModelIndex &)), this, SLOT(onTableActionSelectionChanged(const QModelIndex &, const QModelIndex &))); connect(ui->labelWhatIsThis, SIGNAL(clicked()), this, SLOT(onWhatIsThis())); ui->OKButton->setImagesPath(ClickableImage::mNotSelectedOKButton, ClickableImage::mSelectedOKButtonDefault); connect(ui->OKButton, SIGNAL(clicked()), this, SLOT(onOK())); setAttribute(Qt::WA_TranslucentBackground); init(); }
ParameterEstimationDialog::ParameterEstimationDialog(QWidget *parent) : QDialog(parent) { ui.setupUi(this); ui.lineEditTestDataDirectory->setText("C:/Anaconda/caffe/facade/data"); ui.lineEditClassificationDirectory->setText("C:/Anaconda/caffe/facade"); ui.lineEditRegressionDirectory->setText("C:/Anaconda/caffe/facade_regression"); ui.lineEditOutputDirectory->setText("results"); ui.lineEditNumFloorsMin->setText("4"); ui.lineEditNumFloorsMax->setText("40"); ui.lineEditNumColumnsMin->setText("4"); ui.lineEditNumColumnsMax->setText("40"); connect(ui.pushButtonTestDataDirectory, SIGNAL(clicked()), this, SLOT(onTestDataDirectory())); connect(ui.pushButtonClassificationDirectory, SIGNAL(clicked()), this, SLOT(onClassificationDirectory())); connect(ui.pushButtonRegressionDirectory, SIGNAL(clicked()), this, SLOT(onRegressionDirectory())); connect(ui.pushButtonOutputDirectory, SIGNAL(clicked()), this, SLOT(onOutputDirectory())); connect(ui.pushButtonOK, SIGNAL(clicked()), this, SLOT(onOK())); connect(ui.pushButtonCancel, SIGNAL(clicked()), this, SLOT(onCancel())); }
Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); ui->comboBox->addItem("ipv4"); ui->comboBox->addItem("ipv6"); ui->comboBox_2->addItem(QStringLiteral("随机")); ui->comboBox_2->addItem(QStringLiteral("3选1")); ui->comboBox_2->addItem(QStringLiteral("BP")); ui->comboBox_3->addItem(QStringLiteral("6人局")); ui->comboBox_3->addItem(QStringLiteral("4人局")); ui->lineEdit->setText("50000"); connect(ui->buttonBox,SIGNAL(accepted()), this, SLOT(onOK())); }
QgsOSMExportDialog::QgsOSMExportDialog( QWidget *parent ) : QDialog( parent ) , mDatabase( new QgsOSMDatabase ) { setupUi( this ); connect( btnBrowseDb, SIGNAL( clicked() ), this, SLOT( onBrowse() ) ); connect( buttonBox, SIGNAL( accepted() ), this, SLOT( onOK() ) ); connect( buttonBox, SIGNAL( rejected() ), this, SLOT( onClose() ) ); connect( editDbFileName, SIGNAL( textChanged( QString ) ), this, SLOT( updateLayerName() ) ); connect( radPoints, SIGNAL( clicked() ), this, SLOT( updateLayerName() ) ); connect( radPolylines, SIGNAL( clicked() ), this, SLOT( updateLayerName() ) ); connect( radPolygons, SIGNAL( clicked() ), this, SLOT( updateLayerName() ) ); connect( btnLoadTags, SIGNAL( clicked() ), this, SLOT( onLoadTags() ) ); connect( btnSelectAll, SIGNAL( clicked() ), this, SLOT( onSelectAll() ) ); connect( btnUnselectAll, SIGNAL( clicked() ), this, SLOT( onUnselectAll() ) ); mTagsModel = new QStandardItemModel( this ); mTagsModel->setHorizontalHeaderLabels( QStringList() << tr( "Tag" ) << tr( "Count" ) << tr( "Not null" ) ); viewTags->setModel( mTagsModel ); }
ParameterEstimationDialog::ParameterEstimationDialog(QWidget *parent) : QDialog(parent) { ui.setupUi(this); ui.comboBoxObjectType->addItem("Building mass"); ui.comboBoxObjectType->addItem("Roof"); ui.comboBoxObjectType->addItem("Window"); ui.comboBoxObjectType->addItem("Ledge"); ui.lineEditCGADirectory->setText("../cga/building"); ui.lineEditTestDataDirectory->setText("C:/Anaconda/caffe/building/data"); ui.lineEditClassificationDirectory->setText("C:/Anaconda/caffe/building"); ui.lineEditRegressionDirectory->setText("C:/Anaconda/caffe/building_regression"); ui.lineEditOutputDirectory->setText("results"); connect(ui.comboBoxObjectType, SIGNAL(currentIndexChanged(int)), this, SLOT(onObjectTypeChanged())); connect(ui.pushButtonCGADirectory, SIGNAL(clicked()), this, SLOT(onCGADirectory())); connect(ui.pushButtonTestDataDirectory, SIGNAL(clicked()), this, SLOT(onTestDataDirectory())); connect(ui.pushButtonClassificationDirectory, SIGNAL(clicked()), this, SLOT(onClassificationDirectory())); connect(ui.pushButtonRegressionDirectory, SIGNAL(clicked()), this, SLOT(onRegressionDirectory())); connect(ui.pushButtonOutputDirectory, SIGNAL(clicked()), this, SLOT(onOutputDirectory())); connect(ui.pushButtonOK, SIGNAL(clicked()), this, SLOT(onOK())); connect(ui.pushButtonCancel, SIGNAL(clicked()), this, SLOT(onCancel())); }
MassReconstructionDialog::MassReconstructionDialog(QWidget *parent) : QDialog(parent) { ui.setupUi(this); groupSilhouetteLine = new QButtonGroup(this); groupSilhouetteLine->addButton(ui.radioButtonSilhouetteLine8); groupSilhouetteLine->addButton(ui.radioButtonSilhouetteLineAA); groupRefinement = new QButtonGroup(this); groupRefinement->addButton(ui.radioButtonRefinementBobyqa); groupRefinement->addButton(ui.radioButtonRefinementRandom); ui.checkBoxAutomaticRecognition->setChecked(false); ui.lineEditGrammarSnippet->setText("1"); ui.lineEditGrammarSnippet->setEnabled(!ui.checkBoxAutomaticRecognition->isChecked()); ui.lineEditImageSize->setText("227"); ui.lineEditCameraDistance->setText("25"); // all ui.lineEditXrotMin->setText("-40"); ui.lineEditXrotMax->setText("0"); ui.lineEditYrotMin->setText("-70"); ui.lineEditYrotMax->setText("-20"); ui.lineEditZrotMin->setText("-10"); ui.lineEditZrotMax->setText("10"); ui.lineEditFovMin->setText("20"); ui.lineEditFovMax->setText("90"); ui.lineEditOXMin->setText("-0.8"); ui.lineEditOXMax->setText("0.8"); ui.lineEditOYMin->setText("-0.8"); ui.lineEditOYMax->setText("0.8"); ui.lineEditXMin->setText("-15"); ui.lineEditXMax->setText("15"); ui.lineEditYMin->setText("-15"); ui.lineEditYMax->setText("15"); // #3 /* ui.lineEditXrotMin->setText("-24.6008"); ui.lineEditXrotMax->setText("-24.6008"); ui.lineEditYrotMin->setText("-39.9673"); ui.lineEditYrotMax->setText("-39.9673"); ui.lineEditZrotMin->setText("1.55795"); ui.lineEditZrotMax->setText("1.55795"); ui.lineEditFovMin->setText("64.9414"); ui.lineEditFovMax->setText("64.9414"); ui.lineEditOXMin->setText("0.0272728"); ui.lineEditOXMax->setText("0.0272728"); ui.lineEditOYMin->setText("-0.000758028"); ui.lineEditOYMax->setText("-0.000758028"); ui.lineEditXMin->setText("-1.94318"); ui.lineEditXMax->setText("-1.94318"); ui.lineEditYMin->setText("0.531049"); ui.lineEditYMax->setText("0.531049"); */ // #11 /* ui.lineEditXrotMin->setText("-11.7039"); ui.lineEditXrotMax->setText("-11.7039"); ui.lineEditYrotMin->setText("-44.5257"); ui.lineEditYrotMax->setText("-44.5257"); ui.lineEditZrotMin->setText("-1.6928"); ui.lineEditZrotMax->setText("-1.6928"); ui.lineEditFovMin->setText("81.7128"); ui.lineEditFovMax->setText("81.7128"); ui.lineEditOXMin->setText("-0.0603159"); ui.lineEditOXMax->setText("-0.0603159"); ui.lineEditOYMin->setText("-0.313111"); ui.lineEditOYMax->setText("-0.313111"); ui.lineEditXMin->setText("4.51085"); ui.lineEditXMax->setText("4.51085"); ui.lineEditYMin->setText("-1.22776"); ui.lineEditYMax->setText("-1.22776"); */ ui.radioButtonSilhouetteLine8->setChecked(false); ui.radioButtonSilhouetteLineAA->setChecked(true); ui.checkBoxImageBlur->setChecked(false); ui.lineEditImageBlurSize->setEnabled(false); ui.lineEditImageBlurSize->setText("5"); ui.checkBoxTryMultiples->setChecked(false); ui.lineEditNumMultipleTries->setText("100"); ui.lineEditNumMultipleTries->setEnabled(ui.checkBoxTryMultiples->isChecked()); ui.lineEditMaxNoise->setText("0.5"); ui.lineEditMaxNoise->setEnabled(ui.checkBoxTryMultiples->isChecked()); ui.checkBoxRefinement->setChecked(false); ui.lineEditIterations->setText("30"); ui.lineEditIterations->setEnabled(ui.checkBoxRefinement->isChecked()); ui.radioButtonRefinementBobyqa->setChecked(true); ui.radioButtonRefinementBobyqa->setEnabled(ui.checkBoxRefinement->isChecked()); ui.radioButtonRefinementRandom->setChecked(false); ui.radioButtonRefinementRandom->setEnabled(ui.checkBoxRefinement->isChecked()); connect(ui.checkBoxAutomaticRecognition, SIGNAL(clicked()), this, SLOT(onAutomaticRecognition())); connect(ui.checkBoxImageBlur, SIGNAL(clicked()), this, SLOT(onImageBlur())); connect(ui.checkBoxTryMultiples, SIGNAL(clicked()), this, SLOT(onTryMultiples())); connect(ui.checkBoxRefinement, SIGNAL(clicked()), this, SLOT(onRefinement())); connect(ui.pushButtonOK, SIGNAL(clicked()), this, SLOT(onOK())); connect(ui.pushButtonCancel, SIGNAL(clicked()), this, SLOT(onCancel())); }
void OClientPeer::init() { connect(this,SIGNAL(onLogin(QString,QString,QVector<int>,bool,bool,bool)),this,SLOT(onLogin(QString,QString,QVector<int>,bool,bool,bool))); connect(this,SIGNAL(onAskInfo(QStringList)),this,SLOT(onAskInfo(QStringList))); connect(this,SIGNAL(onAskPublicKey()),this,SLOT(onAskPublicKey())); connect(this,SIGNAL(onAskUserList(QString,QString,bool)),this,SLOT(onAskUserList(QString,QString,bool))); connect(this,SIGNAL(onModifyUserList(QString,QString,QString,QString)),this,SLOT(onModifyUserList(QString,QString,QString,QString))); connect(this,SIGNAL(onState(QString)),this,SLOT(onState(QString))); connect(this,SIGNAL(onLogout()),this,SLOT(onLogout())); connect(this,SIGNAL(onSendMsg(QString,QString)),this,SLOT(onSendMsg(QString,QString))); connect(this,SIGNAL(onUserRequest(QString,QString)),this,SLOT(onUserRequest(QString,QString))); connect(this,SIGNAL(onRequestResult(int,QString)),this,SLOT(onRequestResult(int,QString))); connect(this,SIGNAL(onModifyGroup(QString,QString,QStringList)),this,SLOT(onModifyGroup(QString,QString,QStringList))); connect(this,SIGNAL(onAskUserInfo(QString,QStringList)),this,SLOT(onAskUserInfo(QString,QStringList))); connect(this,SIGNAL(onModifyInfo(QString,QMap<QString,QString>)),this,SLOT(onModifyInfo(QString,QMap<QString,QString>))); connect(this,SIGNAL(onOK(QString)),this,SLOT(onOK(QString))); OAbstractPeer::init(); } //public slots: void OClientPeer::onLogin(QString uname,QString pwdHash,QVector<int> p2pPort,bool isMain,bool isForce,bool isShowIp) { if(client->isLoged)//如果已经登录了 { LoginResult(ALREADY); return; } //测试用代码 //if(true)
void ABoxDlg::onClose( wxCloseEvent& event ) { wxCommandEvent cmdEvent; onOK(cmdEvent); }
this->setDockMode( embedded ); // initialize registry's widget functions _initRendererWidgetFunctions(); QgsRendererV2Registry* reg = QgsRendererV2Registry::instance(); QStringList renderers = reg->renderersList( mLayer ); Q_FOREACH ( const QString& name, renderers ) { QgsRendererV2AbstractMetadata* m = reg->rendererMetadata( name ); cboRenderers->addItem( m->icon(), m->visibleName(), name ); } cboRenderers->setCurrentIndex( -1 ); // set no current renderer connect( buttonBox, SIGNAL( accepted() ), this, SLOT( onOK() ) ); // connect layer transparency slider and spin box connect( mLayerTransparencySlider, SIGNAL( valueChanged( int ) ), mLayerTransparencySpnBx, SLOT( setValue( int ) ) ); connect( mLayerTransparencySpnBx, SIGNAL( valueChanged( int ) ), mLayerTransparencySlider, SLOT( setValue( int ) ) ); connect( cboRenderers, SIGNAL( currentIndexChanged( int ) ), this, SLOT( rendererChanged() ) ); connect( checkboxEnableOrderBy, SIGNAL( toggled( bool ) ), btnOrderBy, SLOT( setEnabled( bool ) ) ); connect( checkboxEnableOrderBy, SIGNAL( toggled( bool ) ), lineEditOrderBy, SLOT( setEnabled( bool ) ) ); connect( btnOrderBy, SIGNAL( clicked( bool ) ), this, SLOT( showOrderByDialog() ) ); QList<QgsPanelWidget*> panels; panels << mEffectWidget; mainStack->connectPanels( panels ); syncToLayer();