• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ editingFinished函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中editingFinished函数的典型用法代码示例。如果您正苦于以下问题:C++ editingFinished函数的具体用法?C++ editingFinished怎么用?C++ editingFinished使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了editingFinished函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: editingFinished

void TextEdit::focusOutEvent(QFocusEvent*)
{
  if (isVisible()) {
    emit editingFinished(toPlainText());
  }
}
开发者ID:BackupTheBerlios,项目名称:galerist-svn,代码行数:6,代码来源:textedit.cpp


示例2: GenericPanel


//.........这里部分代码省略.........
    tableLayout->addWidget(i, 1, fswtchSwtch[i]);
    // s1.report("switch");

    // The function
    fswtchFunc[i] = new QComboBox(this);
    fswtchFunc[i]->setProperty("index", i);
    populateFuncCB(fswtchFunc[i], functions[i].func);
    connect(fswtchFunc[i], SIGNAL(currentIndexChanged(int)), this, SLOT(functionEdited()));
    tableLayout->addWidget(i, 2, fswtchFunc[i]);
    // s1.report("func");

    // The parameters
    QHBoxLayout * paramLayout = new QHBoxLayout();
    tableLayout->addLayout(i, 3, paramLayout);

    fswtchGVmode[i] = new QComboBox(this);
    fswtchGVmode[i]->setProperty("index", i);
    populateGVmodeCB(fswtchGVmode[i], functions[i].adjustMode);
    fswtchGVmode[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents);
    connect(fswtchGVmode[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited()));
    paramLayout->addWidget(fswtchGVmode[i]);

    fswtchParamGV[i] = new QCheckBox(this);
    fswtchParamGV[i]->setProperty("index", i);
    fswtchParamGV[i]->setText("GV");
    fswtchParamGV[i]->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
    connect(fswtchParamGV[i], SIGNAL(stateChanged(int)), this, SLOT(customFunctionEdited()));
    paramLayout->addWidget(fswtchParamGV[i]);

    fswtchParam[i] = new QDoubleSpinBox(this);
    fswtchParam[i]->setProperty("index", i);
    fswtchParam[i]->setAccelerated(true);
    fswtchParam[i]->setDecimals(0);
    connect(fswtchParam[i], SIGNAL(editingFinished()), this, SLOT(customFunctionEdited()));
    paramLayout->addWidget(fswtchParam[i]);

    fswtchParamTime[i] = new QTimeEdit(this);
    fswtchParamTime[i]->setProperty("index", i);
    fswtchParamTime[i]->setAccelerated(true);
    fswtchParamTime[i]->setDisplayFormat("hh:mm:ss");
    connect(fswtchParamTime[i], SIGNAL(editingFinished()), this, SLOT(customFunctionEdited()));
    paramLayout->addWidget(fswtchParamTime[i]);

    fswtchParamT[i] = new QComboBox(this);
    fswtchParamT[i]->setProperty("index", i);
    populateFuncParamCB(fswtchParamT[i], functions[i].func, functions[i].param, functions[i].adjustMode);
    paramLayout->addWidget(fswtchParamT[i]);
    fswtchParamT[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents);
    connect(fswtchParamT[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited()));

    fswtchParamArmT[i] = new QComboBox(this);
    fswtchParamArmT[i]->setProperty("index", i);
    fswtchParamArmT[i]->setEditable(true);
    fswtchParamArmT[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents);
    paramLayout->addWidget(fswtchParamArmT[i]);

    connect(fswtchParamArmT[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited()));
    connect(fswtchParamArmT[i], SIGNAL(editTextChanged ( const QString)), this, SLOT(customFunctionEdited()));

    fswtchBLcolor[i] = new QSlider(this);
    fswtchBLcolor[i]->setProperty("index", i);
    fswtchBLcolor[i]->setMinimum(0);
    fswtchBLcolor[i]->setMaximum(100);
    fswtchBLcolor[i]->setSingleStep(1);
    fswtchBLcolor[i]->setOrientation(Qt::Horizontal);
    paramLayout->addWidget(fswtchBLcolor[i]);
开发者ID:klamath1977,项目名称:opentx,代码行数:67,代码来源:customfunctions.cpp


示例3: GenericForm


//.........这里部分代码省略.........
    bodyUI->themeColorCBox->setCurrentIndex(Settings::getInstance().getThemeColor());

    bodyUI->emoticonSize->setValue(Settings::getInstance().getEmojiFontPointSize());

    QStringList timestamps;
    for (QString timestamp : timeFormats)
        timestamps << QString("%1 - %2").arg(timestamp, QTime::currentTime().toString(timestamp));

    bodyUI->timestamp->addItems(timestamps);

    QLocale ql;
    QStringList datestamps;
    dateFormats.append(ql.dateFormat());
    dateFormats.append(ql.dateFormat(QLocale::LongFormat));
    dateFormats.removeDuplicates();
    timeFormats.append(ql.timeFormat());
    timeFormats.append(ql.timeFormat(QLocale::LongFormat));
    timeFormats.removeDuplicates();

    for (QString datestamp : dateFormats)
        datestamps << QString("%1 - %2").arg(datestamp, QDate::currentDate().toString(datestamp));

    bodyUI->dateFormats->addItems(datestamps);

    bodyUI->timestamp->setCurrentText(QString("%1 - %2").arg(Settings::getInstance().getTimestampFormat(), QTime::currentTime().toString(Settings::getInstance().getTimestampFormat())));

    bodyUI->dateFormats->setCurrentText(QString("%1 - %2").arg(Settings::getInstance().getDateFormat(), QDate::currentDate().toString(Settings::getInstance().getDateFormat())));

    bodyUI->autoAwaySpinBox->setValue(Settings::getInstance().getAutoAwayTime());

    bodyUI->cbEnableUDP->setChecked(!Settings::getInstance().getForceTCP());
    bodyUI->proxyAddr->setText(Settings::getInstance().getProxyAddr());
    int port = Settings::getInstance().getProxyPort();
    if (port != -1)
        bodyUI->proxyPort->setValue(port);

    bodyUI->proxyType->setCurrentIndex(static_cast<int>(Settings::getInstance().getProxyType()));
    onUseProxyUpdated();

    //general
    connect(bodyUI->checkUpdates, &QCheckBox::stateChanged, this, &GeneralForm::onCheckUpdateChanged);
    connect(bodyUI->transComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onTranslationUpdated()));
    connect(bodyUI->cbAutorun, &QCheckBox::stateChanged, this, &GeneralForm::onAutorunUpdated);
    connect(bodyUI->lightTrayIcon, &QCheckBox::stateChanged, this, &GeneralForm::onSetLightTrayIcon);
    connect(bodyUI->showSystemTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetShowSystemTray);
    connect(bodyUI->startInTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetAutostartInTray);
    connect(bodyUI->closeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetCloseToTray);
    connect(bodyUI->minimizeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetMinimizeToTray);
    connect(bodyUI->statusChanges, &QCheckBox::stateChanged, this, &GeneralForm::onSetStatusChange);
    connect(bodyUI->autoAwaySpinBox, SIGNAL(editingFinished()), this, SLOT(onAutoAwayChanged()));
    connect(bodyUI->showWindow, &QCheckBox::stateChanged, this, &GeneralForm::onShowWindowChanged);
    connect(bodyUI->showInFront, &QCheckBox::stateChanged, this, &GeneralForm::onSetShowInFront);
    connect(bodyUI->notifySound, &QCheckBox::stateChanged, this, &GeneralForm::onSetNotifySound);
    connect(bodyUI->groupAlwaysNotify, &QCheckBox::stateChanged, this, &GeneralForm::onSetGroupAlwaysNotify);
    connect(bodyUI->autoacceptFiles, &QCheckBox::stateChanged, this, &GeneralForm::onAutoAcceptFileChange);
    connect(bodyUI->autoSaveFilesDir, SIGNAL(clicked()), this, SLOT(onAutoSaveDirChange()));
    //theme
    connect(bodyUI->useEmoticons, &QCheckBox::stateChanged, this, &GeneralForm::onUseEmoticonsChange);
    connect(bodyUI->smileyPackBrowser, SIGNAL(currentIndexChanged(int)), this, SLOT(onSmileyBrowserIndexChanged(int)));
    connect(bodyUI->styleBrowser, SIGNAL(currentTextChanged(QString)), this, SLOT(onStyleSelected(QString)));
    connect(bodyUI->themeColorCBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onThemeColorChanged(int)));
    connect(bodyUI->emoticonSize, SIGNAL(editingFinished()), this, SLOT(onEmoticonSizeChanged()));
    connect(bodyUI->timestamp, SIGNAL(currentIndexChanged(int)), this, SLOT(onTimestampSelected(int)));
    connect(bodyUI->dateFormats, SIGNAL(currentIndexChanged(int)), this, SLOT(onDateFormatSelected(int)));
    //connection
    connect(bodyUI->cbEnableIPv6, &QCheckBox::stateChanged, this, &GeneralForm::onEnableIPv6Updated);
    connect(bodyUI->cbEnableUDP, &QCheckBox::stateChanged, this, &GeneralForm::onUDPUpdated);
    connect(bodyUI->proxyType, SIGNAL(currentIndexChanged(int)), this, SLOT(onUseProxyUpdated()));
    connect(bodyUI->proxyAddr, &QLineEdit::editingFinished, this, &GeneralForm::onProxyAddrEdited);
    connect(bodyUI->proxyPort, SIGNAL(valueChanged(int)), this, SLOT(onProxyPortEdited(int)));
    connect(bodyUI->reconnectButton, &QPushButton::clicked, this, &GeneralForm::onReconnectClicked);
    connect(bodyUI->cbFauxOfflineMessaging, &QCheckBox::stateChanged, this, &GeneralForm::onFauxOfflineMessaging);
    connect(bodyUI->cbCompactLayout, &QCheckBox::stateChanged, this, &GeneralForm::onCompactLayout);
    connect(bodyUI->cbSeparateWindow, &QCheckBox::stateChanged, this, &GeneralForm::onSeparateWindowChanged);
    connect(bodyUI->cbDontGroupWindows, &QCheckBox::stateChanged, this, &GeneralForm::onDontGroupWindowsChanged);
    connect(bodyUI->cbGroupchatPosition, &QCheckBox::stateChanged, this, &GeneralForm::onGroupchatPositionChanged);

    // prevent stealing mouse whell scroll
    // scrolling event won't be transmitted to comboboxes or qspinboxes when scrolling
    // you can scroll through general settings without accidentially chaning theme/skin/icons etc.
    // @see GeneralForm::eventFilter(QObject *o, QEvent *e) at the bottom of this file for more
    for (QComboBox* cb : findChildren<QComboBox*>())
    {
            cb->installEventFilter(this);
            cb->setFocusPolicy(Qt::StrongFocus);
    }

    for (QSpinBox* sp : findChildren<QSpinBox*>())
    {
            sp->installEventFilter(this);
            sp->setFocusPolicy(Qt::WheelFocus);
    }

#ifndef QTOX_PLATFORM_EXT
    bodyUI->autoAwayLabel->setEnabled(false);   // these don't seem to change the appearance of the widgets,
    bodyUI->autoAwaySpinBox->setEnabled(false); // though they are unusable
#endif

    Translator::registerHandler(std::bind(&GeneralForm::retranslateUi, this), this);
}
开发者ID:Zer0-One,项目名称:qTox,代码行数:101,代码来源:generalform.cpp


示例4: COALESCE

enum SetResponse creditMemoItem::set(const ParameterList &pParams)
{
  XSqlQuery creditet;
  XDialog::set(pParams);
  QVariant param;
  bool     valid;
  bool     vrestrict = FALSE;

  param = pParams.value("cmhead_id", &valid);
  if (valid)
  {
    _cmheadid = param.toInt();
    creditet.prepare("SELECT cmhead_cust_id, cmhead_shipto_id, "
			  "       cmhead_number, COALESCE(cmhead_invcnumber, '-1') AS cmhead_invcnumber, "
			  "       cmhead_docdate, cmhead_curr_id, "
			  "       cmhead_taxzone_id, cmhead_rsncode_id "
              "FROM cmhead "
              "WHERE (cmhead_id=:cmhead_id);");
    creditet.bindValue(":cmhead_id", _cmheadid);
    creditet.exec();
    if (creditet.first())
    {
      _custid = creditet.value("cmhead_cust_id").toInt();
      _shiptoid = creditet.value("cmhead_shipto_id").toInt();
      _orderNumber->setText(creditet.value("cmhead_number").toString());
	  _invoiceNumber = creditet.value("cmhead_invcnumber").toInt();
	  if ( (_invoiceNumber != -1) && (_metrics->boolean("RestrictCreditMemos")) )
        vrestrict = TRUE;
      _taxzoneid = creditet.value("cmhead_taxzone_id").toInt();
      _tax->setId(creditet.value("cmhead_curr_id").toInt());
      _tax->setEffective(creditet.value("cmhead_docdate").toDate());
      _netUnitPrice->setId(creditet.value("cmhead_curr_id").toInt());
      _netUnitPrice->setEffective(creditet.value("cmhead_docdate").toDate());
      _rsnCode->setId(creditet.value("cmhead_rsncode_id").toInt());
    }
    else if (creditet.lastError().type() != QSqlError::NoError)
    {
      systemError(this, creditet.lastError().databaseText(), __FILE__, __LINE__);
      return UndefinedError;
    }
  }

  param = pParams.value("cmitem_id", &valid);
  if (valid)
  {
    _cmitemid = param.toInt();
    populate();
  }

  param = pParams.value("mode", &valid);
  if (valid)
  {
    if (param.toString() == "new")
    {
      _mode = cNew;

      creditet.prepare( "SELECT (COALESCE(MAX(cmitem_linenumber), 0) + 1) AS n_linenumber "
                 "FROM cmitem "
                 "WHERE (cmitem_cmhead_id=:cmhead_id);" );
      creditet.bindValue(":cmhead_id", _cmheadid);
      creditet.exec();
      if (creditet.first())
        _lineNumber->setText(creditet.value("n_linenumber").toString());
      else if (creditet.lastError().type() == QSqlError::NoError)
      {
	      systemError(this, creditet.lastError().databaseText(), __FILE__, __LINE__);
	      return UndefinedError;
      }

      connect(_discountFromSale, SIGNAL(editingFinished()), this, SLOT(sCalculateFromDiscount()));
      connect(_item, SIGNAL(valid(bool)), _listPrices, SLOT(setEnabled(bool)));
    }
    else if (param.toString() == "edit")
    {
      _mode = cEdit;

      _item->setReadOnly(TRUE);
      _warehouse->setEnabled(FALSE);

      connect(_discountFromSale, SIGNAL(editingFinished()), this, SLOT(sCalculateFromDiscount()));
      connect(_item, SIGNAL(valid(bool)), _listPrices, SLOT(setEnabled(bool)));
    }
    else if (param.toString() == "view")
    {
      _mode = cView;

      _item->setReadOnly(TRUE);
      _warehouse->setEnabled(FALSE);
      _qtyReturned->setEnabled(FALSE);
      _qtyToCredit->setEnabled(FALSE);
      _netUnitPrice->setEnabled(FALSE);
      _discountFromSale->setEnabled(FALSE);
      _comments->setReadOnly(TRUE);
      _taxType->setEnabled(FALSE);
      _rsnCode->setEnabled(FALSE);

      _save->hide();
      _close->setText(tr("&Close"));
    }
  }
//.........这里部分代码省略.........
开发者ID:nguyenvansutt,项目名称:qt-client,代码行数:101,代码来源:creditMemoItem.cpp


示例5: connect

void CMainFrame::_connectWidgets()
{
	connect(ui.actionOuvrir, SIGNAL(triggered()), this, SLOT(OpenFile()));
	connect(ui.actionFermer, SIGNAL(triggered()), this, SLOT(CloseFile()));
	connect(ui.actionFusionner, SIGNAL(triggered()), this, SLOT(MergeFile()));
	connect(ui.actionPlein_cran, SIGNAL(triggered(bool)), this, SLOT(SwitchFullscreen(bool)));
	connect(ui.actionStop, SIGNAL(triggered()), this, SLOT(Stop()));
	connect(ui.actionJouer, SIGNAL(triggered(bool)), this, SLOT(Play(bool)));
	connect(ui.action_propos, SIGNAL(triggered()), this, SLOT(About()));
	connect(ui.actionQt, SIGNAL(triggered()), this, SLOT(AboutQt()));
	connect(ui.actionGrille, SIGNAL(triggered(bool)), this, SLOT(ShowGrid(bool)));
	connect(ui.actionModel_3D, SIGNAL(triggered(bool)), m_modelViewer, SLOT(ShowModel3D(bool)));
	connect(ui.actionEnregistrer, SIGNAL(triggered()), this, SLOT(SaveFile()));
	connect(ui.actionEnregistrer_sous, SIGNAL(triggered()), this, SLOT(SaveFileAs()));
	connect(ui.actionCouleur_du_fond, SIGNAL(triggered()), this, SLOT(SetBackgroundColor()));
	connect(m_languageActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(SetLanguage(QAction*)));

	connect(m_timeline, SIGNAL(CurrentFrameChanged(int)), m_modelViewer, SLOT(SetFrame(int)));
	connect(m_timeline, SIGNAL(SelectionChanged(int, int)), this, SLOT(EditKey(int, int)));
	connect(m_timeline, SIGNAL(KeyModified(int, int, bool)), this, SLOT(EditKeyModified(int, int, bool)));
	connect(ui.listParts, SIGNAL(currentRowChanged(int)), this, SLOT(ListPartChanged(int)));

	connect(ui.actionAjouter_une_partie, SIGNAL(triggered()), this, SLOT(AddPart()));
	connect(ui.actionSupprimer_la_partie, SIGNAL(triggered()), this, SLOT(RemovePart()));
	connect(ui.btnRemovePart, SIGNAL(clicked()), this, SLOT(RemovePart()));
	connect(ui.btnAddPart, SIGNAL(clicked()), this, SLOT(AddPart()));

	connect(ui.editKeyPosX, SIGNAL(valueChanged(double)), this, SLOT(EditKeyPosX(double)));
	connect(ui.editKeyPosY, SIGNAL(valueChanged(double)), this, SLOT(EditKeyPosY(double)));
	connect(ui.editKeyPosZ, SIGNAL(valueChanged(double)), this, SLOT(EditKeyPosZ(double)));
	connect(ui.editKeyPosRotX, SIGNAL(valueChanged(double)), this, SLOT(EditKeyPosRotX(double)));
	connect(ui.editKeyPosRotY, SIGNAL(valueChanged(double)), this, SLOT(EditKeyPosRotY(double)));
	connect(ui.editKeyPosRotZ, SIGNAL(valueChanged(double)), this, SLOT(EditKeyPosRotZ(double)));
	connect(ui.editKeyRotX, SIGNAL(valueChanged(double)), this, SLOT(EditKeyRotX(double)));
	connect(ui.editKeyRotY, SIGNAL(valueChanged(double)), this, SLOT(EditKeyRotY(double)));
	connect(ui.editKeyRotZ, SIGNAL(valueChanged(double)), this, SLOT(EditKeyRotZ(double)));
	connect(ui.editKeyScaleX, SIGNAL(valueChanged(double)), this, SLOT(EditKeyScaleX(double)));
	connect(ui.editKeyScaleY, SIGNAL(valueChanged(double)), this, SLOT(EditKeyScaleY(double)));
	connect(ui.editKeyScaleZ, SIGNAL(valueChanged(double)), this, SLOT(EditKeyScaleZ(double)));
	connect(ui.editKeyAlpha, SIGNAL(valueChanged(int)), this, SLOT(EditKeyAlpha(int)));

	connect(ui.editPartName, SIGNAL(textEdited(const QString&)), this, SLOT(EditPartName(const QString&)));
	connect(ui.editPartVisible, SIGNAL(toggled(bool)), this, SLOT(EditPartVisible(bool)));
	connect(ui.editPartBill, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(EditPartBill(const QString&)));
	connect(ui.editPartBlend, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(EditPartAlpha(const QString&)));
	connect(ui.editPartTexture, SIGNAL(editingFinished()), this, SLOT(EditPartTextureName()));
	connect(ui.btnSetPartTexture, SIGNAL(clicked()), this, SLOT(EditPartTexture()));
	connect(ui.editPartTexFrame, SIGNAL(valueChanged(int)), this, SLOT(EditPartTexFrame(int)));
	connect(ui.editPartTexLoop, SIGNAL(valueChanged(int)), this, SLOT(EditPartTexLoop(int)));
	connect(ui.editCustomMeshPointCount, SIGNAL(valueChanged(int)), this, SLOT(EditPartPointCount(int)));
	connect(ui.editParticleCreate, SIGNAL(valueChanged(int)), this, SLOT(EditPartParticleCreate(int)));
	connect(ui.editParticleCreateNum, SIGNAL(valueChanged(int)), this, SLOT(EditPartParticleCreateNum(int)));
	connect(ui.editParticleFrameAppear, SIGNAL(valueChanged(int)), this, SLOT(EditPartParticleFrameAppear(int)));
	connect(ui.editParticleFrameKeep, SIGNAL(valueChanged(int)), this, SLOT(EditPartParticleFrameKeep(int)));
	connect(ui.editParticleFrameDisappear, SIGNAL(valueChanged(int)), this, SLOT(EditPartParticleFrameDisappear(int)));
	connect(ui.editParticleStartPosVar, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleStartPosVar(double)));
	connect(ui.editParticleStartPosVarY, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleStartPosVarY(double)));
	connect(ui.editParticleYLow, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleYLow(double)));
	connect(ui.editParticleYHigh, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleYHigh(double)));
	connect(ui.editParticleXZLow, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleXZLow(double)));
	connect(ui.editParticleXZHigh, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleXZHigh(double)));
	connect(ui.editParticleAccelX, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleAccelX(double)));
	connect(ui.editParticleAccelY, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleAccelY(double)));
	connect(ui.editParticleAccelZ, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleAccelZ(double)));
	connect(ui.editParticleScaleX, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScaleX(double)));
	connect(ui.editParticleScaleY, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScaleY(double)));
	connect(ui.editParticleScaleZ, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScaleZ(double)));
	connect(ui.editParticleRotationLowX, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleRotationLowX(double)));
	connect(ui.editParticleRotationLowY, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleRotationLowY(double)));
	connect(ui.editParticleRotationLowZ, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleRotationLowZ(double)));
	connect(ui.editParticleRotationHighX, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleRotationHighX(double)));
	connect(ui.editParticleRotationHighY, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleRotationHighY(double)));
	connect(ui.editParticleRotationHighZ, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleRotationHighZ(double)));
	connect(ui.editParticleScalSpeedXLow, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScalSpeedXLow(double)));
	connect(ui.editParticleScalSpeedYLow, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScalSpeedYLow(double)));
	connect(ui.editParticleScalSpeedZLow, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScalSpeedZLow(double)));
	connect(ui.editParticleScalSpeedXHigh, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScalSpeedXHigh(double)));
	connect(ui.editParticleScalSpeedYHigh, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScalSpeedYHigh(double)));
	connect(ui.editParticleScalSpeedZHigh, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScalSpeedZHigh(double)));
	connect(ui.editParticleRepeatScale, SIGNAL(toggled(bool)), this, SLOT(EditPartParticleRepeatScale(bool)));
	connect(ui.editParticleRepeat, SIGNAL(toggled(bool)), this, SLOT(EditPartParticleRepeat(bool)));
	connect(ui.editParticleScaleEndX, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScaleEndX(double)));
	connect(ui.editParticleScaleEndY, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScaleEndY(double)));
	connect(ui.editParticleScaleEndZ, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScaleEndZ(double)));
	connect(ui.editParticleScaleSpeedX, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScaleSpeedX(double)));
	connect(ui.editParticleScaleSpeedY, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScaleSpeedY(double)));
	connect(ui.editParticleScaleSpeedZ, SIGNAL(valueChanged(double)), this, SLOT(EditPartParticleScaleSpeedZ(double)));
}
开发者ID:Aishiro,项目名称:ATools,代码行数:88,代码来源:MainFrame.cpp


示例6: setupUi

Mount::Mount()
{
    setupUi(this);
    new MountAdaptor(this);
    QDBusConnection::sessionBus().registerObject("/KStars/Ekos/Mount",  this);

    currentTelescope = NULL;

    stopB->setIcon(QIcon::fromTheme("process-stop"));
    northB->setIcon(QIcon::fromTheme("go-up"));
    westB->setIcon(QIcon::fromTheme("go-previous"));
    eastB->setIcon(QIcon::fromTheme("go-next"));
    southB->setIcon(QIcon::fromTheme("go-down"));

    abortDispatch = -1;

    minAltLimit->setValue(Options::minimumAltLimit());
    maxAltLimit->setValue(Options::maximumAltLimit());


    QFile tempFile;

    if (KSUtils::openDataFile( tempFile, "go-nw.png" ) )
    {
        northwestB->setIcon(QIcon(tempFile.fileName()));
        tempFile.close();
    }

    if (KSUtils::openDataFile( tempFile, "go-ne.png" ) )
    {
        northeastB->setIcon(QIcon(tempFile.fileName()));
        tempFile.close();
    }

    if (KSUtils::openDataFile( tempFile, "go-sw.png" ) )
    {
        southwestB->setIcon(QIcon(tempFile.fileName()));
        tempFile.close();
    }

    if (KSUtils::openDataFile( tempFile, "go-se.png" ) )
    {
        southeastB->setIcon(QIcon(tempFile.fileName()));
        tempFile.close();
    }

    connect(northB, SIGNAL(pressed()), this, SLOT(move()));
    connect(northB, SIGNAL(released()), this, SLOT(stop()));
    connect(westB, SIGNAL(pressed()), this, SLOT(move()));
    connect(westB, SIGNAL(released()), this, SLOT(stop()));
    connect(southB, SIGNAL(pressed()), this, SLOT(move()));
    connect(southB, SIGNAL(released()), this, SLOT(stop()));
    connect(eastB, SIGNAL(pressed()), this, SLOT(move()));
    connect(eastB, SIGNAL(released()), this, SLOT(stop()));
    connect(northeastB, SIGNAL(pressed()), this, SLOT(move()));
    connect(northeastB, SIGNAL(released()), this, SLOT(stop()));
    connect(northwestB, SIGNAL(pressed()), this, SLOT(move()));
    connect(northwestB, SIGNAL(released()), this, SLOT(stop()));
    connect(southeastB, SIGNAL(pressed()), this, SLOT(move()));
    connect(southeastB, SIGNAL(released()), this, SLOT(stop()));
    connect(southwestB, SIGNAL(pressed()), this, SLOT(move()));
    connect(southwestB, SIGNAL(released()), this, SLOT(stop()));
    connect(stopB, SIGNAL(clicked()), this, SLOT(stop()));
    connect(saveB, SIGNAL(clicked()), this, SLOT(save()));

    connect(minAltLimit, SIGNAL(editingFinished()), this, SLOT(saveLimits()));
    connect(maxAltLimit, SIGNAL(editingFinished()), this, SLOT(saveLimits()));

    connect(enableLimitsCheck, SIGNAL(toggled(bool)), this, SLOT(enableAltitudeLimits(bool)));
    enableLimitsCheck->setChecked(Options::enableAltitudeLimits());
    altLimitEnabled = enableLimitsCheck->isChecked();
}
开发者ID:cardinot,项目名称:kstars,代码行数:72,代码来源:mount.cpp


示例7: VESPERSScanConfigurationView

VESPERS2DScanConfigurationView::VESPERS2DScanConfigurationView(VESPERS2DScanConfiguration *config, QWidget *parent)
	: VESPERSScanConfigurationView(parent)
{
	configuration_ = config;
	AMTopFrame *frame = new AMTopFrame("VESPERS 2D Map Configuration");

	// Setup the group box for setting the start and end points.
	QGroupBox *positionsBox = new QGroupBox("Positions");

	hStart_ = createPositionDoubleSpinBox("H: ", " mm", configuration_->scanAxisAt(0)->regionAt(0)->regionStart(), 3);
	connect(hStart_, SIGNAL(editingFinished()), this, SLOT(onXStartChanged()));
	connect(configuration_->scanAxisAt(0)->regionAt(0), SIGNAL(regionStartChanged(AMNumber)), this, SLOT(setXAxisStart(AMNumber)));

	vStart_ = createPositionDoubleSpinBox("V: ", " mm", configuration_->scanAxisAt(1)->regionAt(0)->regionStart(), 3);
	connect(vStart_, SIGNAL(editingFinished()), this, SLOT(onYStartChanged()));
	connect(configuration_->scanAxisAt(1)->regionAt(0), SIGNAL(regionStartChanged(AMNumber)), this, SLOT(setYAxisStart(AMNumber)));

	QPushButton *startUseCurrentButton = new QPushButton("Use Current");
	connect(startUseCurrentButton, SIGNAL(clicked()), this, SLOT(onSetStartPosition()));

	QHBoxLayout *startPointLayout = new QHBoxLayout;
	startPointLayout->addWidget(new QLabel("Start:"));
	startPointLayout->addWidget(hStart_);
	startPointLayout->addWidget(vStart_);
	startPointLayout->addWidget(startUseCurrentButton);

	hEnd_ = createPositionDoubleSpinBox("H: ", " mm", configuration_->scanAxisAt(0)->regionAt(0)->regionEnd(), 3);
	connect(hEnd_, SIGNAL(editingFinished()), this, SLOT(onXEndChanged()));
	connect(configuration_->scanAxisAt(0)->regionAt(0), SIGNAL(regionEndChanged(AMNumber)), this, SLOT(setXAxisEnd(AMNumber)));

	vEnd_ = createPositionDoubleSpinBox("V: ", " mm", configuration_->scanAxisAt(1)->regionAt(0)->regionEnd(), 3);
	connect(vEnd_, SIGNAL(editingFinished()), this, SLOT(onYEndChanged()));
	connect(configuration_->scanAxisAt(1)->regionAt(0), SIGNAL(regionEndChanged(AMNumber)), this, SLOT(setYAxisEnd(AMNumber)));

	QPushButton *endUseCurrentButton = new QPushButton("Use Current");
	connect(endUseCurrentButton, SIGNAL(clicked()), this, SLOT(onSetEndPosition()));

	QHBoxLayout *endPointLayout = new QHBoxLayout;
	endPointLayout->addWidget(new QLabel("End:"));
	endPointLayout->addWidget(hEnd_);
	endPointLayout->addWidget(vEnd_);
	endPointLayout->addWidget(endUseCurrentButton);

	hStep_ = createPositionDoubleSpinBox("H: ", QString(" %1").arg(QString::fromUtf8("µm")), double(configuration_->scanAxisAt(0)->regionAt(0)->regionStep())*1000, 1);	// xStep needs to be in mm.
	connect(hStep_, SIGNAL(editingFinished()), this, SLOT(onXStepChanged()));
	connect(configuration_->scanAxisAt(0)->regionAt(0), SIGNAL(regionStepChanged(AMNumber)), this, SLOT(setXAxisStep(AMNumber)));

	vStep_ = createPositionDoubleSpinBox("V: ", QString(" %1").arg(QString::fromUtf8("µm")), double(configuration_->scanAxisAt(1)->regionAt(0)->regionStep())*1000, 1);	// yStep needs to be in mm.
	connect(vStep_, SIGNAL(editingFinished()), this, SLOT(onYStepChanged()));
	connect(configuration_->scanAxisAt(1)->regionAt(0), SIGNAL(regionStepChanged(AMNumber)), this, SLOT(setYAxisStep(AMNumber)));

	QHBoxLayout *stepSizeLayout = new QHBoxLayout;
	stepSizeLayout->addWidget(new QLabel("Step Size:"));
	stepSizeLayout->addWidget(hStep_);
	stepSizeLayout->addWidget(vStep_);
	stepSizeLayout->addStretch();

	normalPosition_ = createPositionDoubleSpinBox("N: ", " mm", configuration_->normalPosition(), 3);
	connect(normalPosition_, SIGNAL(editingFinished()), this, SLOT(onNormalPositionChanged()));
	connect(configuration_->dbObject(), SIGNAL(normalPositionChanged(double)), normalPosition_, SLOT(setValue(double)));

	QPushButton *updateNormalPosition = new QPushButton("Set Normal");
	connect(updateNormalPosition, SIGNAL(clicked()), this, SLOT(onSetNormalPosition()));

	QHBoxLayout *normalLayout = new QHBoxLayout;
	normalLayout->addWidget(new QLabel("Focus Position:"));
	normalLayout->addWidget(normalPosition_);
	normalLayout->addWidget(updateNormalPosition);

	mapInfo_ = new QLabel;
	updateMapInfo();

	QVBoxLayout *positionsLayout = new QVBoxLayout;
	positionsLayout->addLayout(startPointLayout);
	positionsLayout->addLayout(endPointLayout);
	positionsLayout->addLayout(stepSizeLayout);
	positionsLayout->addLayout(normalLayout);
	positionsLayout->addWidget(mapInfo_);

	positionsBox->setLayout(positionsLayout);

	// Dwell time.
	dwellTime_ = createDwellTimeSpinBox(configuration_->scanAxisAt(0)->regionAt(0)->regionTime());
	connect(dwellTime_, SIGNAL(editingFinished()), this, SLOT(onDwellTimeChanged()));
	connect(configuration_->scanAxisAt(0)->regionAt(0), SIGNAL(regionTimeChanged(AMNumber)), this, SLOT(setDwellTime(AMNumber)));
	connect(configuration_->scanAxisAt(0)->regionAt(0), SIGNAL(regionTimeChanged(AMNumber)), configuration_->scanAxisAt(1)->regionAt(0), SLOT(setRegionTime(AMNumber)));

	QHBoxLayout *timeLayout = new QHBoxLayout;
	timeLayout->addWidget(new QLabel("Dwell Time:"));
	timeLayout->addWidget(dwellTime_);

	// The estimated scan time.
	estimatedTime_ = new QLabel;
	connect(configuration_, SIGNAL(totalTimeChanged(double)), this, SLOT(onEstimatedTimeChanged()));
	onEstimatedTimeChanged();

	QVBoxLayout *timeBoxLayout = new QVBoxLayout;
	timeBoxLayout->addLayout(timeLayout);
	timeBoxLayout->addWidget(estimatedTime_);

//.........这里部分代码省略.........
开发者ID:acquaman,项目名称:acquaman,代码行数:101,代码来源:VESPERS2DScanConfigurationView.cpp


示例8: m_r

MeshifyPopup::MeshifyPopup()
	: DVGui::Dialog(TApp::instance()->getMainWindow(), true, false, "MeshifyPopup"), m_r(-1), m_c(-1)
{
	setWindowTitle(tr("Create Mesh"));
	setLabelWidth(0);
	setModal(false);

	setTopMargin(0);
	setTopSpacing(0);

	beginVLayout();

	QSplitter *splitter = new QSplitter(Qt::Vertical);
	splitter->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
	addWidget(splitter);

	endVLayout();

	//------------------------- Top Layout --------------------------

	QScrollArea *scrollArea = new QScrollArea(splitter);
	scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	scrollArea->setWidgetResizable(true);
	scrollArea->setMinimumWidth(450);
	splitter->addWidget(scrollArea);
	splitter->setStretchFactor(0, 1);

	QFrame *topWidget = new QFrame(scrollArea);
	scrollArea->setWidget(topWidget);

	QGridLayout *topLayout = new QGridLayout(topWidget); // Needed to justify at top
	topWidget->setLayout(topLayout);

	//------------------------- Parameters --------------------------

	int row = 0;

	QLabel *edgesLengthLabel = new QLabel(tr("Mesh Edges Length:"));
	topLayout->addWidget(edgesLengthLabel, row, 0, Qt::AlignRight | Qt::AlignVCenter);

	m_edgesLength = new DVGui::MeasuredDoubleField;
	m_edgesLength->setMeasure("length.x");
	m_edgesLength->setRange(0.0, 1.0); // In inches (standard unit)
	m_edgesLength->setValue(0.2);

	topLayout->addWidget(m_edgesLength, row++, 1);

	QLabel *rasterizationDpiLabel = new QLabel(tr("Rasterization DPI:"));
	topLayout->addWidget(rasterizationDpiLabel, row, 0, Qt::AlignRight | Qt::AlignVCenter);

	m_rasterizationDpi = new DVGui::DoubleLineEdit;
	m_rasterizationDpi->setRange(1.0, (std::numeric_limits<double>::max)());
	m_rasterizationDpi->setValue(300.0);

	topLayout->addWidget(m_rasterizationDpi, row++, 1);

	QLabel *shapeMarginLabel = new QLabel(tr("Mesh Margin (pixels):"));
	topLayout->addWidget(shapeMarginLabel, row, 0, Qt::AlignRight | Qt::AlignVCenter);

	m_margin = new DVGui::IntLineEdit;
	m_margin->setRange(2, (std::numeric_limits<int>::max)());
	m_margin->setValue(5);

	topLayout->addWidget(m_margin, row++, 1);

	connect(m_edgesLength, SIGNAL(valueChanged(bool)), this, SLOT(onParamsChanged(bool)));
	connect(m_rasterizationDpi, SIGNAL(editingFinished()), this, SLOT(onParamsChanged()));
	connect(m_margin, SIGNAL(editingFinished()), this, SLOT(onParamsChanged()));

	topLayout->setRowStretch(row, 1);

	//------------------------- View Widget -------------------------

	// NOTE: It's IMPORTANT that parent widget is supplied. It's somewhat
	// used by QSplitter to decide the initial widget sizes...

	m_viewer = new Swatch(splitter);
	m_viewer->setMinimumHeight(150);
	m_viewer->setFocusPolicy(Qt::WheelFocus);

	splitter->addWidget(m_viewer);

	//--------------------------- Buttons ---------------------------

	m_okBtn = new QPushButton(tr("Apply"));
	addButtonBarWidget(m_okBtn);

	connect(m_okBtn, SIGNAL(clicked()), this, SLOT(apply()));

	// Finally, acquire current selection
	onCellSwitched();

	m_viewer->resize(0, 350);
	resize(600, 700);
}
开发者ID:JosefMeixner,项目名称:opentoonz,代码行数:95,代码来源:meshifypopup.cpp


示例9: QWidget

PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f)
{
	ui.setupUi(this);

	QSettings s;
	QStringList rebreater_modes;
	s.beginGroup("Planner");
	prefs.last_stop = s.value("last_stop", prefs.last_stop).toBool();
	prefs.verbatim_plan = s.value("verbatim_plan", prefs.verbatim_plan).toBool();
	prefs.display_duration = s.value("display_duration", prefs.display_duration).toBool();
	prefs.display_runtime = s.value("display_runtime", prefs.display_runtime).toBool();
	prefs.display_transitions = s.value("display_transitions", prefs.display_transitions).toBool();
	prefs.deco_mode = deco_mode(s.value("deco_mode", prefs.deco_mode).toInt());
	prefs.safetystop = s.value("safetystop", prefs.safetystop).toBool();
	prefs.reserve_gas = s.value("reserve_gas", prefs.reserve_gas).toInt();
	prefs.ascrate75 = s.value("ascrate75", prefs.ascrate75).toInt();
	prefs.ascrate50 = s.value("ascrate50", prefs.ascrate50).toInt();
	prefs.ascratestops = s.value("ascratestops", prefs.ascratestops).toInt();
	prefs.ascratelast6m = s.value("ascratelast6m", prefs.ascratelast6m).toInt();
	prefs.descrate = s.value("descrate", prefs.descrate).toInt();
	prefs.bottompo2 = s.value("bottompo2", prefs.bottompo2).toInt();
	prefs.decopo2 = s.value("decopo2", prefs.decopo2).toInt();
	prefs.doo2breaks = s.value("doo2breaks", prefs.doo2breaks).toBool();
	prefs.switch_at_req_stop = s.value("switch_at_req_stop", prefs.switch_at_req_stop).toBool();
	prefs.min_switch_duration = s.value("min_switch_duration", prefs.min_switch_duration).toInt();
	prefs.drop_stone_mode = s.value("drop_stone_mode", prefs.drop_stone_mode).toBool();
	prefs.bottomsac = s.value("bottomsac", prefs.bottomsac).toInt();
	prefs.decosac = s.value("decosac", prefs.decosac).toInt();
	plannerModel->getDiveplan().bottomsac = prefs.bottomsac;
	plannerModel->getDiveplan().decosac = prefs.decosac;
	s.endGroup();

	updateUnitsUI();
	ui.lastStop->setChecked(prefs.last_stop);
	ui.verbatim_plan->setChecked(prefs.verbatim_plan);
	ui.display_duration->setChecked(prefs.display_duration);
	ui.display_runtime->setChecked(prefs.display_runtime);
	ui.display_transitions->setChecked(prefs.display_transitions);
	ui.safetystop->setChecked(prefs.safetystop);
	ui.reserve_gas->setValue(prefs.reserve_gas / 1000);
	ui.bottompo2->setValue(prefs.bottompo2 / 1000.0);
	ui.decopo2->setValue(prefs.decopo2 / 1000.0);
	ui.backgasBreaks->setChecked(prefs.doo2breaks);
	ui.drop_stone_mode->setChecked(prefs.drop_stone_mode);
	ui.switch_at_req_stop->setChecked(prefs.switch_at_req_stop);
	ui.min_switch_duration->setValue(prefs.min_switch_duration / 60);
	ui.recreational_deco->setChecked(prefs.deco_mode == RECREATIONAL);
	ui.buehlmann_deco->setChecked(prefs.deco_mode == BUEHLMANN);
	ui.vpmb_deco->setChecked(prefs.deco_mode == VPMB);

	// should be the same order as in dive_comp_type!
	rebreater_modes << tr("Open circuit") << tr("CCR") << tr("pSCR");
	ui.rebreathermode->insertItems(0, rebreater_modes);

	modeMapper = new QSignalMapper(this);
	connect(modeMapper, SIGNAL(mapped(int)) , plannerModel, SLOT(setDecoMode(int)));
	modeMapper->setMapping(ui.recreational_deco, int(RECREATIONAL));
	modeMapper->setMapping(ui.buehlmann_deco, int(BUEHLMANN));
	modeMapper->setMapping(ui.vpmb_deco, int(VPMB));
	
	connect(ui.recreational_deco, SIGNAL(clicked()), modeMapper, SLOT(map()));
	connect(ui.buehlmann_deco, SIGNAL(clicked()), modeMapper, SLOT(map()));
	connect(ui.vpmb_deco, SIGNAL(clicked()), modeMapper, SLOT(map()));
	
	connect(ui.lastStop, SIGNAL(toggled(bool)), plannerModel, SLOT(setLastStop6m(bool)));
	connect(ui.verbatim_plan, SIGNAL(toggled(bool)), plannerModel, SLOT(setVerbatim(bool)));
	connect(ui.display_duration, SIGNAL(toggled(bool)), plannerModel, SLOT(setDisplayDuration(bool)));
	connect(ui.display_runtime, SIGNAL(toggled(bool)), plannerModel, SLOT(setDisplayRuntime(bool)));
	connect(ui.display_transitions, SIGNAL(toggled(bool)), plannerModel, SLOT(setDisplayTransitions(bool)));
	connect(ui.safetystop, SIGNAL(toggled(bool)), plannerModel, SLOT(setSafetyStop(bool)));
	connect(ui.reserve_gas, SIGNAL(valueChanged(int)), plannerModel, SLOT(setReserveGas(int)));
	connect(ui.ascRate75, SIGNAL(valueChanged(int)), this, SLOT(setAscRate75(int)));
	connect(ui.ascRate75, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged()));
	connect(ui.ascRate50, SIGNAL(valueChanged(int)), this, SLOT(setAscRate50(int)));
	connect(ui.ascRate50, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged()));
	connect(ui.ascRateStops, SIGNAL(valueChanged(int)), this, SLOT(setAscRateStops(int)));
	connect(ui.ascRateStops, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged()));
	connect(ui.ascRateLast6m, SIGNAL(valueChanged(int)), this, SLOT(setAscRateLast6m(int)));
	connect(ui.ascRateLast6m, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged()));
	connect(ui.descRate, SIGNAL(valueChanged(int)), this, SLOT(setDescRate(int)));
	connect(ui.descRate, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged()));
	connect(ui.bottompo2, SIGNAL(valueChanged(double)), this, SLOT(setBottomPo2(double)));
	connect(ui.decopo2, SIGNAL(valueChanged(double)), this, SLOT(setDecoPo2(double)));
	connect(ui.drop_stone_mode, SIGNAL(toggled(bool)), plannerModel, SLOT(setDropStoneMode(bool)));
	connect(ui.bottomSAC, SIGNAL(valueChanged(double)), this, SLOT(bottomSacChanged(double)));
	connect(ui.decoStopSAC, SIGNAL(valueChanged(double)), this, SLOT(decoSacChanged(double)));
	connect(ui.gfhigh, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFHigh(int)));
	connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int)));
	connect(ui.gfhigh, SIGNAL(editingFinished()), plannerModel, SLOT(triggerGFHigh()));
	connect(ui.gflow, SIGNAL(editingFinished()), plannerModel, SLOT(triggerGFLow()));
	connect(ui.backgasBreaks, SIGNAL(toggled(bool)), this, SLOT(setBackgasBreaks(bool)));
	connect(ui.switch_at_req_stop, SIGNAL(toggled(bool)), plannerModel, SLOT(setSwitchAtReqStop(bool)));
	connect(ui.min_switch_duration, SIGNAL(valueChanged(int)), plannerModel, SLOT(setMinSwitchDuration(int)));
	connect(ui.rebreathermode, SIGNAL(currentIndexChanged(int)), plannerModel, SLOT(setRebreatherMode(int)));
	connect(plannerModel, SIGNAL(recreationChanged(bool)), this, SLOT(disableDecoElements(bool)));

	settingsChanged();
	ui.gflow->setValue(prefs.gflow);
	ui.gfhigh->setValue(prefs.gfhigh);

//.........这里部分代码省略.........
开发者ID:20150,项目名称:subsurface,代码行数:101,代码来源:diveplanner.cpp


示例10: setColor

void ColorLabel::mousePressEvent(QMouseEvent *e)
{
    setColor();
    emit editingFinished();
}
开发者ID:stf80,项目名称:Visualisierung-LU-WS-2010,代码行数:5,代码来源:colorlabel.cpp


示例11: GcChartWindow


//.........这里部分代码省略.........
    setChartLayout(mainLayout);

    HelpWhatsThis *help = new HelpWhatsThis(modelPlot);
    modelPlot->setWhatsThis(help->getWhatsThisText(HelpWhatsThis::ChartRides_3D));

    // preset Values
    presetLabel = new QLabel(tr("Analyse"), this);
    presetValues = new QComboBox;
    fillPresets(presetValues);
    presetValues->setCurrentIndex(1);
    cl->addRow(presetLabel, presetValues);

    // labels
    xLabel = new QLabel(tr("X-Axis:"), this);
    xSelector = new QComboBox;
    addStandardChannels(xSelector);
    xSelector->setCurrentIndex(0); // power
    cl->addRow(xLabel, xSelector);

    yLabel = new QLabel(tr("Y-Axis:"), this);
    ySelector = new QComboBox;
    addStandardChannels(ySelector);
    ySelector->setCurrentIndex(1); // cadence
    cl->addRow(yLabel, ySelector);

    zLabel = new QLabel(tr("Z-Axis:"), this);
    zSelector = new QComboBox;
    addStandardChannels(zSelector);
    zSelector->addItem(tr("Time at X&Y"), MODEL_XYTIME);
    zSelector->setCurrentIndex(12); // time at xy
    cl->addRow(zLabel, zSelector);

    colorLabel = new QLabel(tr("Color:"), this);
    colorSelector = new QComboBox;
    addStandardChannels(colorSelector);
    colorSelector->addItem(tr("Power Zone"), MODEL_POWERZONE);
    colorSelector->addItem(tr("Time at X&Y"), MODEL_XYTIME);
    colorSelector->setCurrentIndex(12); // power zone
    cl->addRow(colorLabel, colorSelector);

    binLabel = new QLabel(tr("Bin Width:"), this);
    binWidthLineEdit = new QLineEdit(this);
    binWidthLineEdit->setFixedWidth(30);
    binWidthLineEdit->setText("5");
    cl->addRow(binLabel, binWidthLineEdit);

    binWidthSlider = new QSlider(Qt::Horizontal);
    binWidthSlider->setTickPosition(QSlider::TicksBelow);
    binWidthSlider->setTickInterval(1);
    binWidthSlider->setMinimum(3);
    binWidthSlider->setMaximum(100);
    binWidthSlider->setValue(5);
    cl->addRow(binWidthSlider);

    // selectors
    styleSelector = new QComboBox;
    styleSelector->addItem(tr("Bar"));
    styleSelector->addItem(tr("Grid"));
    styleSelector->addItem(tr("Surface"));
    styleSelector->addItem(tr("Dots"));
    styleSelector->setCurrentIndex(0);
    cl->addRow(styleSelector);

    ignore = new QCheckBox(tr("Ignore Zero"));
    ignore->setChecked(true);
    cl->addRow(ignore);

    grid = new QCheckBox(tr("Show Grid"));
    grid->setChecked(true);
    cl->addRow(grid);

    frame = new QCheckBox(tr("Frame Intervals"));
    frame->setChecked(true);
    cl->addRow(frame);

    legend = new QCheckBox(tr("Legend"));
    legend->setChecked(true);
    cl->addRow(legend);

    // now connect up the widgets
    connect(this, SIGNAL(rideItemChanged(RideItem*)), this, SLOT(rideSelected()));
    connect(context, SIGNAL(intervalSelected()), this, SLOT(intervalSelected()));
    connect(presetValues, SIGNAL(currentIndexChanged(int)), this, SLOT(applyPreset(int)));
    connect(xSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(setDirty()));
    connect(ySelector, SIGNAL(currentIndexChanged(int)), this, SLOT(setDirty()));
    connect(zSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(setDirty()));
    connect(colorSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(setDirty()));
    connect(grid, SIGNAL(stateChanged(int)), this, SLOT(setGrid()));
    connect(legend, SIGNAL(stateChanged(int)), this, SLOT(setLegend()));
    connect(frame, SIGNAL(stateChanged(int)), this, SLOT(setFrame()));
    connect(styleSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(styleSelected(int)));
    connect(ignore, SIGNAL(stateChanged(int)), this, SLOT(setDirty()));
    connect(binWidthSlider, SIGNAL(valueChanged(int)), this, SLOT(setBinWidthFromSlider()));
    connect(binWidthLineEdit, SIGNAL(editingFinished()), this, SLOT(setBinWidthFromLineEdit()));
    connect(zpane, SIGNAL(valueChanged(int)), this, SLOT(setZPane(int)));
    connect(context, SIGNAL(configChanged(qint32)), this, SLOT(configChanged(qint32)));

    // set colors on first run
    configChanged(CONFIG_APPEARANCE);
}
开发者ID:27sparks,项目名称:GoldenCheetah,代码行数:101,代码来源:ModelWindow.cpp


示例12: QMainWindow


//.........这里部分代码省略.........
    ui->statusLabel->setEditable(true);

    // delay setting username and message until Core inits
    //ui->nameLabel->setText(core->getUsername());
    ui->nameLabel->setStyleSheet("QLabel { color : white; font-size: 11pt; font-weight:bold;}");
    //ui->statusLabel->setText(core->getStatusMessage());
    ui->statusLabel->setStyleSheet("QLabel { color : white; font-size: 8pt;}");

    ui->statusButton->setStyleSheet(Style::get(":/ui/statusButton/statusButton.css"));

    QMenu *statusButtonMenu = new QMenu(ui->statusButton);
    QAction* setStatusOnline = statusButtonMenu->addAction(Widget::tr("Online","Button to set your status to 'Online'"));
    setStatusOnline->setIcon(QIcon(":ui/statusButton/dot_online.png"));
    QAction* setStatusAway = statusButtonMenu->addAction(Widget::tr("Away","Button to set your status to 'Away'"));
    setStatusAway->setIcon(QIcon(":ui/statusButton/dot_idle.png"));
    QAction* setStatusBusy = statusButtonMenu->addAction(Widget::tr("Busy","Button to set your status to 'Busy'"));
    setStatusBusy->setIcon(QIcon(":ui/statusButton/dot_busy.png"));
    ui->statusButton->setMenu(statusButtonMenu);

    ui->titleBar->setMouseTracking(true);
    ui->LTitle->setMouseTracking(true);
    ui->tbMenu->setMouseTracking(true);
    ui->pbMin->setMouseTracking(true);
    ui->pbMax->setMouseTracking(true);
    ui->pbClose->setMouseTracking(true);
    ui->statusHead->setMouseTracking(true);

    //ui->friendList->viewport()->installEventFilter(this);

    // disable proportional scaling
    ui->mainSplitter->setStretchFactor(0,0);
    ui->mainSplitter->setStretchFactor(1,1);

    ui->statusButton->setObjectName("offline");
    ui->stat 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ editor函数代码示例发布时间:2022-05-30
下一篇:
C++ edit_uint64函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap