/* A dialog for getting/setting general info about a Make Controller */ Inspector::Inspector(MainWindow *mainWindow) : QDialog( 0 ) { this->mainWindow = mainWindow; setupUi(this); connect(this, SIGNAL(finished(int)), this, SLOT(onFinished())); connect(&infoTimer, SIGNAL(timeout()), this, SLOT(getBoardInfo())); connect(applyButton, SIGNAL(clicked()), this, SLOT(onApply())); connect(revertButton, SIGNAL(clicked()), this, SLOT(onRevert())); connect(nameEdit, SIGNAL(textEdited(QString)), this, SLOT(onAnyValueEdited())); connect(serialEdit, SIGNAL(textEdited(QString)), this, SLOT(onAnyValueEdited())); connect(versionEdit, SIGNAL(textEdited(QString)), this, SLOT(onAnyValueEdited())); connect(freememEdit, SIGNAL(textEdited(QString)), this, SLOT(onAnyValueEdited())); connect(ipEdit, SIGNAL(textEdited(QString)), this, SLOT(onAnyValueEdited())); connect(netmaskEdit, SIGNAL(textEdited(QString)), this, SLOT(onAnyValueEdited())); connect(gatewayEdit, SIGNAL(textEdited(QString)), this, SLOT(onAnyValueEdited())); connect(listenPortEdit, SIGNAL(textEdited(QString)), this, SLOT(onAnyValueEdited())); connect(sendPortEdit, SIGNAL(textEdited(QString)), this, SLOT(onAnyValueEdited())); connect(dhcpBox, SIGNAL(clicked(bool)), this, SLOT(onAnyValueEdited())); QSettings settings("MakingThings", "mchelper"); QPoint inspectorPos = settings.value("inspector_pos").toPoint(); if(!inspectorPos.isNull()) move(inspectorPos); resize(gridLayout->sizeHint()); }
bool Effect::tryPerform(Unit* owner) { if (_firstPerform) { onApply(owner); _firstPerform = false; } //if force remove we do not want the effect to get another tick if (_forceRemove) { //remove me onRemoving(owner); return false; } double now = BW_Time::getMilliSecondsCached(); if (_tickDelay != NOTICK && _lastperform < now - _tickDelay) { perform(owner); _lastperform += _tickDelay; } //if timeover we want to give the effect the chance for a last tick if (_removeTime != FOREVER && now > _removeTime) { //remove me onRemoving(owner); return false; } return true; }
void OperatorDlg::onOK( wxCommandEvent& event ) { if( m_bSave ) { onApply(event); Destroy(); } else { EndModal( wxID_OK ); } }
static void onNotify(HWND hWnd, int idCtrl, LPNMHDR lpNMHdr) { switch(lpNMHdr->code) { case PSN_RESET: break; case PSN_APPLY: onApply(hWnd); break; } }
void Frame::apply(float percent) { if (!_tween) return; float tweenpercent = percent; if ( _tweenType != tweenfunc::TWEEN_EASING_MAX && _tweenType != tweenfunc::Linear) { tweenpercent = tweenPercent(tweenpercent); } onApply(tweenpercent); }
/* * Constructs a CMeshPrimitiveDialog as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ CMeshPrimitiveDialog::CMeshPrimitiveDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "CMeshPrimitiveDialog" ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 100, 100, sizePolicy().hasHeightForWidth() ) ); setPaletteForegroundColor( QColor( 0, 0, 0 ) ); setSizeGripEnabled( TRUE ); CMeshPrimitiveDialogLayout = new QGridLayout( this, 1, 1, 6, 4, "CMeshPrimitiveDialogLayout"); m_pLayout1 = new QHBoxLayout( 0, 0, 6, "m_pLayout1"); buttonApply = new QPushButton( this, "buttonApply" ); buttonApply->setAutoDefault( TRUE ); m_pLayout1->addWidget( buttonApply ); m_pHSpacing1 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); m_pLayout1->addItem( m_pHSpacing1 ); buttonOk = new QPushButton( this, "buttonOk" ); buttonOk->setAutoDefault( TRUE ); buttonOk->setDefault( TRUE ); m_pLayout1->addWidget( buttonOk ); buttonCancel = new QPushButton( this, "buttonCancel" ); buttonCancel->setAutoDefault( TRUE ); m_pLayout1->addWidget( buttonCancel ); CMeshPrimitiveDialogLayout->addLayout( m_pLayout1, 1, 0 ); m_pSplitter = new QSplitter( this, "m_pSplitter" ); m_pSplitter->setMinimumSize( QSize( 300, 60 ) ); m_pSplitter->setOrientation( QSplitter::Horizontal ); m_pSplitter->setOpaqueResize( FALSE ); m_pSplitter->setHandleWidth( 4 ); m_pListView = new QListView( m_pSplitter, "m_pListView" ); m_pGLPreviewWin = new CGLPreviewWin( m_pSplitter, "m_pGLPreviewWin" ); CMeshPrimitiveDialogLayout->addWidget( m_pSplitter, 0, 0 ); languageChange(); resize( QSize(733, 505).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); connect( m_pListView, SIGNAL( doubleClicked(QListViewItem*,const QPoint&,int) ), this, SLOT( onListViewDoubleClicked(QListViewItem*,const QPoint&,int) ) ); connect( buttonApply, SIGNAL( clicked() ), this, SLOT( onApply() ) ); }
EditPageSetDialog::EditPageSetDialog(QWidget * parent) : QDialog(parent) { QLOG_DEBUG() << Q_FUNC_INFO; QStringList cols; cols << tr("Id") << tr("Title") << tr("Tab count") << tr("Created") << tr("Delete") << tr("Select tabs") << tr("Tabs to delete"); m_setlist = new ColumnarTableWidget(cols); m_setlist->setKey(ColumnarTableWidget::STATE,SID_PAGESET_EDIT_TAB_LIST_STATE); readSettings(); setWindowTitle(tr("Edit Tab Set")); QVBoxLayout * layout = new QVBoxLayout; layout->addWidget(m_setlist); int rows = this->loadTitles(); QDialogButtonBox * buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel); m_loadButton = new QPushButton(tr("Apply")); buttonBox->addButton(m_loadButton,QDialogButtonBox::ActionRole); m_loadButton->setVisible(rows > 0); m_loadButton->setEnabled(false); connect(m_loadButton,SIGNAL(clicked()),this,SLOT(onApply())); connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); layout->addWidget(buttonBox); setLayout(layout); connect(m_setlist,SIGNAL(itemDoubleClicked(QTableWidgetItem *)),this,SLOT(onItemDoubleClicked(QTableWidgetItem *))); m_dirty = false; SETTINGS settings.beginGroup("PageSets"); m_setlist->readConfiguration(settings); }
INT_PTR OptionsPageMore::handleNotify(const LPNMHDR header) { if (header->code == PSN_APPLY) { bool fromApplyButton = !((LPPSHNOTIFY)header)->lParam; onApply(fromApplyButton); return TRUE; } else if (header->idFrom == IDC_SETTINGS_ABOUT) { if (header->code == NM_CLICK || header->code == NM_RETURN) { DialogBox(NULL, MAKEINTRESOURCE(IDD_ABOUT), GetParent(m_hwnd), aboutBoxDialogProc); return TRUE; WS_TABSTOP; } else { return FALSE; } } else { return FALSE; } }
void VariableDlg::onOK( wxCommandEvent& event ) { onApply(event); EndModal( wxID_OK ); }
void WeatherDlg::onOK( wxCommandEvent& event ) { onApply(event); EndModal( wxID_OK ); }
void AccDecDlg::onOK( wxCommandEvent& event ) { onApply(event); EndModal( wxID_OK ); }
void OpenVpzBox::onRowActivated(const Gtk::TreeModel::Path& /* path */, Gtk::TreeViewColumn* /* column */) { onApply(); }
void ToursDlg::onOK( wxCommandEvent& event ){ if( m_bSave ) onApply(event); EndModal( wxID_OK ); }
void ToursDlg::onModifyTour( wxCommandEvent& event ) { onApply(event); }
ccColorLevelsDlg::ccColorLevelsDlg(QWidget* parent, ccGenericPointCloud* pointCloud) : QDialog(parent, Qt::Tool) , Ui::ColorLevelsDialog() , m_histogram(0) , m_cloud(pointCloud) { setupUi(this); //connect GUI elements connect(channelComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onChannelChanged(int))); connect(buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(onApply())); //create histogram view m_histogram = new ccHistogramWindow(this); { m_histogram->setColorScheme(ccHistogramWindow::USE_SOLID_COLOR); m_histogram->setSolidColor(Qt::black); //add view histoFrame->setLayout(new QHBoxLayout()); histoFrame->layout()->addWidget(m_histogram); } //restore previous parameters minInputSpinBox->setValue(s_inputLevels[0]); maxInputSpinBox->setValue(s_inputLevels[1]); minOutputSpinBox->setValue(s_outputLevels[0]); maxOutputSpinBox->setValue(s_outputLevels[1]); outputLevelsCheckBox->setChecked(s_outputLevelsEnabled); updateHistogram(); }
ccColorScaleEditorDialog::ccColorScaleEditorDialog( ccColorScalesManager* manager, ccMainAppInterface* mainApp, ccColorScale::Shared currentScale/*=0*/, QWidget* parent/*=0*/) : QDialog(parent) , Ui::ColorScaleEditorDlg() , m_manager(manager) , m_colorScale(currentScale) , m_scaleWidget(new ccColorScaleEditorWidget(this,Qt::Horizontal)) , m_associatedSF(0) , m_modified(false) , m_minAbsoluteVal(0.0) , m_maxAbsoluteVal(1.0) , m_mainApp(mainApp) { assert(m_manager); setupUi(this); colorScaleEditorFrame->setLayout(new QHBoxLayout()); colorScaleEditorFrame->layout()->setContentsMargins(0,0,0,0); colorScaleEditorFrame->layout()->addWidget(m_scaleWidget); //main combo box connect(rampComboBox, SIGNAL(activated(int)), this, SLOT(colorScaleChanged(int))); //import/export buttons connect(exportToolButton, SIGNAL(clicked()), this, SLOT(exportCurrentScale())); connect(importToolButton, SIGNAL(clicked()), this, SLOT(importScale())); //upper buttons connect(renameToolButton, SIGNAL(clicked()), this, SLOT(renameCurrentScale())); connect(saveToolButton, SIGNAL(clicked()), this, SLOT(saveCurrentScale())); connect(deleteToolButton, SIGNAL(clicked()), this, SLOT(deleteCurrentScale())); connect(copyToolButton, SIGNAL(clicked()), this, SLOT(copyCurrentScale())); connect(newToolButton, SIGNAL(clicked()), this, SLOT(createNewScale())); connect(scaleModeComboBox, SIGNAL(activated(int)), this, SLOT(relativeModeChanged(int))); //scale widget connect(m_scaleWidget, SIGNAL(stepSelected(int)), this, SLOT(onStepSelected(int))); connect(m_scaleWidget, SIGNAL(stepModified(int)), this, SLOT(onStepModified(int))); //slider editor connect(deleteSliderToolButton, SIGNAL(clicked()), this, SLOT(deletecSelectedStep())); connect(colorToolButton, SIGNAL(clicked()), this, SLOT(changeSelectedStepColor())); connect(valueDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeSelectedStepValue(double))); //labels list widget connect(customLabelsGroupBox, SIGNAL(toggled(bool)), this, SLOT(toggleCustomLabelsList(bool))); connect(customLabelsPlainTextEdit, SIGNAL(textChanged()), this, SLOT(onCustomLabelsListChanged())); //apply button connect(applyPushButton, SIGNAL(clicked()), this, SLOT(onApply())); //close button connect(closePushButton, SIGNAL(clicked()), this, SLOT(onClose())); //populate main combox box with all known scales updateMainComboBox(); if (!m_colorScale) m_colorScale = m_manager->getDefaultScale(ccColorScalesManager::BGYR); setActiveScale(m_colorScale); }