KstSettingsDlgI::KstSettingsDlgI(QWidget* parent, const char *name, WFlags fl) : KstSettingsDlg(parent, name, fl)
{
  fillAxesSettings();
  updateCurveColorSettings();
  setSettings(KstSettings::globalSettings());
  setClean();
  updateAxesButtons();
  updateAxesSettings();
  updateEMailSettings();
  _source->insertStringList(KstDataSource::pluginList());
  if (_source->count() > 0) {
    sourceChanged(_source->text(0));
  } else {
    _configureSource->setEnabled(false);
  }

  QString hours = i18n(" hours");
  QLineEdit* edit = dynamic_cast<QLineEdit*>(_valueOffset->child("qt_spinbox_edit"));
  if (edit) {
    edit->setMaxLength(5 + hours.length());
  }
  _valueOffset->setRange(-24.0, 24.0, 0.50, false);
  _valueOffset->setSuffix(i18n(" hours"));
  _colorPalette->_label->setText(i18n("Curve color sequence: "));

  connect(_spinBoxLineWidth, SIGNAL(valueChanged(int)), this, SLOT(setDirty()));
  connect(_spinBoxLineWidth->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty()));
  connect(_valueOffset->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(updateTimezone(const QString&)));
  connect(_timer->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty()));
  connect(_kIntSpinBoxEMailPort->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty()));
  connect(_colorPalette->_palette, SIGNAL(activated(int)), this, SLOT(setDirty()));
  connect(_fontSize->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty()));
  connect(_fontMinSize->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty()));
}
Beispiel #2
0
KstSettingsDlg::KstSettingsDlg(QWidget* parent, const char *name, Qt::WindowFlags fl) : QDialog(parent, fl) {
  QString hours = QObject::tr(" hours");
  QLineEdit* edit;

  setupUi(this);
printf("-1\n");
  fillAxesSettings();
  updateCurveColorSettings();
  setSettings(KstSettings::globalSettings());
  setClean();
  updateAxesButtons();
  updateAxesSettings();
  updateEMailSettings();
  updateUTCOffset();
printf("0\n");
  _source->insertItems(0, KstDataSource::pluginList());
  if (_source->count() > 0) {
    sourceChanged(_source->itemText(0));
  } else {
    _configureSource->setEnabled(false);
  }

  edit = _valueOffset->findChild<QLineEdit*>();
  if (edit) {
    edit->setMaxLength(5 + hours.length());
  }
printf("2\n");
  _valueOffset->setRange(-24.0, 24.0);
  _valueOffset->setSingleStep(0.50);
  _valueOffset->setSuffix(QObject::tr(" hours"));
// xxx  _colorPalette->_label->setText(QObject::tr("Curve color sequence: "));

  connect(_spinBoxLineWidth, SIGNAL(valueChanged(int)), this, SLOT(setDirty()));
  connect(_spinBoxLineWidth->findChild<QLineEdit*>(), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty()));
  connect(_valueOffset->findChild<QLineEdit*>(), SIGNAL(textChanged(const QString&)), this, SLOT(updateTimezone(const QString&)));
  connect(_timer->findChild<QLineEdit*>(), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty()));
  connect(_kIntSpinBoxEMailPort->findChild<QLineEdit*>(), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty()));
  connect(_colorPalette->_palette, SIGNAL(activated(int)), this, SLOT(setDirty()));
  connect(_fontSize->findChild<QLineEdit*>(), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty()));
  connect(_fontMinSize->findChild<QLineEdit*>(), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty()));

  connect(_cancel, SIGNAL(clicked()), this, SLOT(close()));
  connect(_timer, SIGNAL(valueChanged(int)), this, SLOT(setDirty()));
  connect(_defaults, SIGNAL(clicked()), this, SLOT(defaults()));
  connect(_ok, SIGNAL(clicked()), this, SLOT(save()));
  connect(_ok, SIGNAL(clicked()), this, SLOT(close()));
  connect(_colors, SIGNAL(bgChanged(QColor)), this, SLOT(setDirty()));
  connect(_colors, SIGNAL(bgChanged(QColor)), this, SLOT(setDirty()));
  connect(_xMajorGrid, SIGNAL(clicked()), this, SLOT(updateAxesButtons()));
  connect(_xMinorGrid, SIGNAL(clicked()), this, SLOT(updateAxesButtons()));
  connect(_yMajorGrid, SIGNAL(clicked()), this, SLOT(updateAxesButtons()));
  connect(_yMinorGrid, SIGNAL(clicked()), this, SLOT(updateAxesButtons()));
  connect(_checkBoxDefaultMajorGridColor, SIGNAL(clicked()), this, SLOT(updateAxesButtons()));
  connect(_checkBoxDefaultMinorGridColor, SIGNAL(clicked()), this, SLOT(updateAxesButtons()));
  connect(_checkBoxXInterpret, SIGNAL(toggled(bool)), _comboBoxXInterpret, SLOT(setEnabled(bool)));
  connect(_checkBoxXInterpret, SIGNAL(toggled(bool)), _comboBoxXDisplay, SLOT(setEnabled(bool)));
  connect(_configureSource, SIGNAL(clicked()), this, SLOT(configureSource()));
  connect(_source, SIGNAL(clicked(QString)), this, SLOT(sourceChanged(QString)));
  connect(_xMajorGrid, SIGNAL(clicked()), this, SLOT(setDirty()));
  connect(_xMinorGrid, SIGNAL(clicked()), this, SLOT(setDirty()));
  connect(_yMajorGrid, SIGNAL(clicked()), this, SLOT(setDirty()));
  connect(_yMinorGrid, SIGNAL(clicked()), this, SLOT(setDirty()));
  connect(_majorGridColor, SIGNAL(changed(QColor)), this, SLOT(setDirty()));
  connect(_minorGridColor, SIGNAL(changed(QColor)), this, SLOT(setDirty()));
  connect(_checkBoxDefaultMajorGridColor, SIGNAL(clicked()), this, SLOT(setDirty()));
  connect(_checkBoxDefaultMinorGridColor, SIGNAL(clicked()), this, SLOT(setDirty()));
  connect(_comboBoxXDisplay, SIGNAL(activated(int)), this, SLOT(setDirty()));
  connect(_promptWindowClose, SIGNAL(clicked()), this, SLOT(setDirty()));
  connect(_showQuickStart, SIGNAL(clicked()), this, SLOT(setDirty()));
  connect(_tiedZoomGlobal, SIGNAL(clicked()), this, SLOT(setDirty()));
  connect(_lineEditSender, SIGNAL(textChanged(QString)), this, SLOT(setDirty()));
  connect(_lineEditHost, SIGNAL(textChanged(QString)), this, SLOT(setDirty()));
  connect(_lineEditLogin, SIGNAL(textChanged(QString)), this, SLOT(setDirty()));
  connect(_lineEditPassword, SIGNAL(textChanged(QString)), this, SLOT(setDirty()));
  connect(_checkBoxAuthentication, SIGNAL(clicked()), this, SLOT(setDirty()));
  connect(_buttonGroupEncryption, SIGNAL(clicked(int)), this, SLOT(setDirty()));
  connect(_buttonGroupAuthentication, SIGNAL(clicked(int)), this, SLOT(setDirty()));
  connect(_checkBoxXInterpret, SIGNAL(toggled(bool)), this, SLOT(setDirty()));
  connect(_checkBoxAuthentication, SIGNAL(clicked()), this, SLOT(updateEMailSettings()));
  connect(_comboBoxXInterpret, SIGNAL(activated(QString)), this, SLOT(setDirty()));
  connect(_fontSize, SIGNAL(valueChanged(int)), this, SLOT(setDirty()));
  connect(_valueOffset, SIGNAL(valueChanged(double)), this, SLOT(updateTimezone(double)));
  connect(_fontMinSize, SIGNAL(valueChanged(int)), this, SLOT(setDirty()));
printf("3\n");
}