File indexing completed on 2025-07-06 04:09:26
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2007 The University of Toronto * 0004 * netterfield@astro.utoronto.ca * 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published by * 0008 * the Free Software Foundation; either version 2 of the License, or * 0009 * (at your option) any later version. * 0010 * * 0011 ***************************************************************************/ 0012 0013 #include "axistab.h" 0014 #include "plotdefines.h" 0015 #include "ksttimezone.h" 0016 0017 namespace Kst { 0018 0019 AxisTab::AxisTab(QWidget *parent) 0020 : DialogTab(parent) { 0021 0022 setupUi(this); 0023 setTabTitle(tr("Axis")); 0024 0025 _axisMajorTickSpacing->addItem(tr("Coarse"), 2); 0026 _axisMajorTickSpacing->addItem(tr("Normal"), 5); 0027 _axisMajorTickSpacing->addItem(tr("Fine"), 10); 0028 _axisMajorTickSpacing->addItem(tr("VeryFine"), 15); 0029 setAxisMajorTickSpacing(TicksNormal); 0030 0031 _axisMajorLineStyle->addItem(tr("Solid Line", "Pen type"), (int)Qt::SolidLine); 0032 _axisMajorLineStyle->addItem(tr("Dash Line", "Pen type"), (int)Qt::DashLine); 0033 _axisMajorLineStyle->addItem(tr("Dot Line", "Pen type"), (int)Qt::DotLine); 0034 _axisMajorLineStyle->addItem(tr("Dash Dot Line", "Pen type"), (int)Qt::DashDotLine); 0035 _axisMajorLineStyle->addItem(tr("Dash Dot Dot Line", "Pen type"), (int)Qt::DashDotDotLine); 0036 _axisMajorLineStyle->addItem(tr("Custom Dash Line", "Pen type"), (int)Qt::CustomDashLine); 0037 setAxisMajorGridLineStyle(Qt::DashLine); 0038 0039 _axisMinorLineStyle->addItem(tr("Solid Line", "Pen type"), (int)Qt::SolidLine); 0040 _axisMinorLineStyle->addItem(tr("Dash Line", "Pen type"), (int)Qt::DashLine); 0041 _axisMinorLineStyle->addItem(tr("Dot Line", "Pen type"), (int)Qt::DotLine); 0042 _axisMinorLineStyle->addItem(tr("Dash Dot Line", "Pen type"), (int)Qt::DashDotLine); 0043 _axisMinorLineStyle->addItem(tr("Dash Dot Dot Line", "Pen type"), (int)Qt::DashDotDotLine); 0044 _axisMinorLineStyle->addItem(tr("Custom Dash Line", "Pen type"), (int)Qt::CustomDashLine); 0045 setAxisMinorGridLineStyle(Qt::DashLine); 0046 0047 setAxisMajorGridLineColor(Qt::gray); 0048 setAxisMinorGridLineColor(Qt::gray); 0049 0050 for (uint i = 0; i < numAxisDisplays; i++) { 0051 _scaleDisplayType->addItem(tr(AxisDisplays[i].label), QVariant(AxisDisplays[i].type)); 0052 } 0053 0054 for (uint i = 0; i < numAxisInterpretations; i++) { 0055 _scaleInterpretType->addItem(tr(AxisInterpretations[i].label), QVariant(AxisInterpretations[i].type)); 0056 } 0057 0058 connect(_drawAxisMajorTicks, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0059 connect(_drawAxisMajorGridLines, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0060 connect(_drawAxisMinorGridLines, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0061 connect(_drawAxisMinorTicks, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0062 connect(_axisMajorTickSpacing, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified())); 0063 connect(_axisMajorLineStyle, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified())); 0064 connect(_axisMinorLineStyle, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified())); 0065 connect(_axisMajorLineColor, SIGNAL(changed(QColor)), this, SIGNAL(modified())); 0066 connect(_axisMinorLineColor, SIGNAL(changed(QColor)), this, SIGNAL(modified())); 0067 connect(_axisMajorLineWidth, SIGNAL(valueChanged(double)), this, SIGNAL(modified())); 0068 connect(_axisMinorLineWidth, SIGNAL(valueChanged(double)), this, SIGNAL(modified())); 0069 connect(_autoMinorTicks, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0070 connect(_autoMinorTicks, SIGNAL(stateChanged(int)), this, SLOT(updateButtons())); 0071 0072 connect(_hideBottomLeft, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0073 connect(_hideTopRight, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0074 0075 connect(_scaleInterpret, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0076 connect(_scaleInterpret, SIGNAL(stateChanged(int)), this, SLOT(updateButtons())); 0077 connect(_scaleLog, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0078 connect(_scaleReverse, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0079 connect(_scaleDisplayType, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified())); 0080 connect(_scaleDisplayType, SIGNAL(currentIndexChanged(int)), this, SLOT(updateFormatString())); 0081 connect(_scaleDisplayFormatString, SIGNAL(textChanged(QString)), this, SIGNAL(modified())); 0082 connect(_scaleInterpretType, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified())); 0083 connect(_timeZone, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified())); 0084 0085 connect(_axisMinorTickCount, SIGNAL(valueChanged(int)), this, SIGNAL(modified())); 0086 0087 connect(_scaleAutoBaseOffset, SIGNAL(clicked()), this, SLOT(offsetAutoPressed())); 0088 connect(_scaleBaseOffset, SIGNAL(clicked()), this, SLOT(offsetOnPressed())); 0089 connect(_baseOffsetOff, SIGNAL(clicked()), this, SLOT(offsetOffPressed())); 0090 0091 connect(_scaleAutoBaseOffset, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0092 connect(_scaleBaseOffset, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0093 connect(_significantDigits, SIGNAL(valueChanged(int)), this, SIGNAL(modified())); 0094 connect(_forceOffsetMin, SIGNAL(stateChanged(int)), this, SIGNAL(modified())); 0095 0096 connect(_rotation, SIGNAL(valueChanged(int)), this, SIGNAL(modified())); 0097 0098 _timeZone->addItems(KstTimeZone::tzList()); 0099 0100 0101 } 0102 0103 0104 AxisTab::~AxisTab() { 0105 } 0106 0107 0108 MajorTickMode AxisTab::axisMajorTickSpacing() const { 0109 return MajorTickMode(_axisMajorTickSpacing->itemData(_axisMajorTickSpacing->currentIndex()).toInt()); 0110 } 0111 0112 0113 bool AxisTab::axisMajorTickSpacingDirty() const { 0114 return _axisMajorTickSpacing->currentIndex() != -1; 0115 } 0116 0117 0118 void AxisTab::setAxisMajorTickSpacing(MajorTickMode spacing) { 0119 _axisMajorTickSpacing->setCurrentIndex(_axisMajorTickSpacing->findData(QVariant(spacing))); 0120 } 0121 0122 0123 bool AxisTab::drawAxisMajorTicks() const { 0124 return _drawAxisMajorTicks->isChecked(); 0125 } 0126 0127 0128 bool AxisTab::drawAxisMajorTicksDirty() const { 0129 return _drawAxisMajorTicks->checkState() != Qt::PartiallyChecked; 0130 } 0131 0132 0133 void AxisTab::setDrawAxisMajorTicks(const bool enabled) { 0134 _drawAxisMajorTicks->setChecked(enabled); 0135 } 0136 0137 0138 bool AxisTab::drawAxisMajorGridLines() const { 0139 return _drawAxisMajorGridLines->isChecked(); 0140 } 0141 0142 0143 bool AxisTab::drawAxisMajorGridLinesDirty() const { 0144 return _drawAxisMajorGridLines->checkState() != Qt::PartiallyChecked; 0145 } 0146 0147 0148 void AxisTab::setDrawAxisMajorGridLines(const bool enabled) { 0149 _drawAxisMajorGridLines->setChecked(enabled); 0150 } 0151 0152 0153 bool AxisTab::drawAxisMinorTicks() const { 0154 return _drawAxisMinorTicks->isChecked(); 0155 } 0156 0157 0158 bool AxisTab::drawAxisMinorTicksDirty() const { 0159 return _drawAxisMinorTicks->checkState() != Qt::PartiallyChecked; 0160 } 0161 0162 0163 void AxisTab::setDrawAxisMinorTicks(const bool enabled) { 0164 _drawAxisMinorTicks->setChecked(enabled); 0165 } 0166 0167 0168 bool AxisTab::drawAxisMinorGridLines() const { 0169 return _drawAxisMinorGridLines->isChecked(); 0170 } 0171 0172 0173 bool AxisTab::drawAxisMinorGridLinesDirty() const { 0174 return _drawAxisMinorGridLines->checkState() != Qt::PartiallyChecked; 0175 } 0176 0177 0178 void AxisTab::setDrawAxisMinorGridLines(const bool enabled) { 0179 _drawAxisMinorGridLines->setChecked(enabled); 0180 } 0181 0182 0183 Qt::PenStyle AxisTab::axisMajorGridLineStyle() const { 0184 return Qt::PenStyle(_axisMajorLineStyle->itemData(_axisMajorLineStyle->currentIndex()).toInt()); 0185 } 0186 0187 0188 bool AxisTab::axisMajorGridLineStyleDirty() const { 0189 return _axisMajorLineStyle->currentIndex() != -1; 0190 } 0191 0192 0193 void AxisTab::setAxisMajorGridLineStyle(Qt::PenStyle style) { 0194 _axisMajorLineStyle->setCurrentIndex(_axisMajorLineStyle->findData(QVariant((int)style))); 0195 } 0196 0197 0198 QColor AxisTab::axisMajorGridLineColor() const { 0199 return _axisMajorLineColor->color(); 0200 } 0201 0202 0203 bool AxisTab::axisMajorGridLineColorDirty() const { 0204 return _axisMajorLineColor->colorDirty(); 0205 } 0206 0207 0208 void AxisTab::setAxisMajorGridLineColor(const QColor &color) { 0209 _axisMajorLineColor->setColor(color); 0210 } 0211 0212 0213 qreal AxisTab::axisMajorGridLineWidth() const { 0214 return _axisMajorLineWidth->value(); 0215 } 0216 0217 0218 bool AxisTab::axisMajorGridLineWidthDirty() const { 0219 return (!_axisMajorLineWidth->text().isEmpty()); 0220 } 0221 0222 0223 void AxisTab::setAxisMajorGridLineWidth(qreal width) { 0224 _axisMajorLineWidth->setValue(width); 0225 } 0226 0227 0228 Qt::PenStyle AxisTab::axisMinorGridLineStyle() const { 0229 return Qt::PenStyle(_axisMinorLineStyle->itemData(_axisMinorLineStyle->currentIndex()).toInt()); 0230 } 0231 0232 0233 bool AxisTab::axisMinorGridLineStyleDirty() const { 0234 return _axisMinorLineStyle->currentIndex() != -1; 0235 } 0236 0237 0238 void AxisTab::setAxisMinorGridLineStyle(Qt::PenStyle style) { 0239 _axisMinorLineStyle->setCurrentIndex(_axisMinorLineStyle->findData(QVariant((int)style))); 0240 } 0241 0242 0243 QColor AxisTab::axisMinorGridLineColor() const { 0244 return _axisMinorLineColor->color(); 0245 } 0246 0247 0248 bool AxisTab::axisMinorGridLineColorDirty() const { 0249 return _axisMinorLineColor->colorDirty(); 0250 } 0251 0252 0253 void AxisTab::setAxisMinorGridLineColor(const QColor &color) { 0254 _axisMinorLineColor->setColor(color); 0255 } 0256 0257 0258 qreal AxisTab::axisMinorGridLineWidth() const { 0259 return _axisMinorLineWidth->value(); 0260 } 0261 0262 0263 bool AxisTab::axisMinorGridLineWidthDirty() const { 0264 return (!_axisMinorLineWidth->text().isEmpty());} 0265 0266 0267 void AxisTab::setAxisMinorGridLineWidth(qreal width) { 0268 _axisMinorLineWidth->setValue(width); 0269 } 0270 0271 0272 int AxisTab::axisMinorTickCount() const { 0273 return _axisMinorTickCount->value(); 0274 } 0275 0276 0277 bool AxisTab::axisMinorTickCountDirty() const { 0278 return (!_axisMinorTickCount->text().isEmpty()); 0279 } 0280 0281 0282 void AxisTab::setAxisMinorTickCount(const int count) { 0283 _axisMinorTickCount->setValue(count); 0284 } 0285 0286 0287 bool AxisTab::isAutoMinorTickCount() const { 0288 return _autoMinorTicks->isChecked(); 0289 } 0290 0291 0292 bool AxisTab::isAutoMinorTickCountDirty() const { 0293 return _autoMinorTicks->checkState() != Qt::PartiallyChecked; 0294 } 0295 0296 0297 void AxisTab::setAutoMinorTickCount(const bool enabled) { 0298 _autoMinorTicks->setChecked(enabled); 0299 } 0300 0301 0302 int AxisTab::significantDigits() const { 0303 return _significantDigits->value(); 0304 } 0305 0306 0307 bool AxisTab::significantDigitsDirty() const { 0308 return (!_significantDigits->text().isEmpty()); 0309 } 0310 0311 0312 void AxisTab::setSignificantDigits(const int digits) { 0313 _significantDigits->setValue(digits); 0314 } 0315 0316 0317 bool AxisTab::isLog() const { 0318 return _scaleLog->isChecked(); 0319 } 0320 0321 0322 bool AxisTab::isLogDirty() const { 0323 return _scaleLog->checkState() != Qt::PartiallyChecked; 0324 } 0325 0326 0327 void AxisTab::setLog(const bool enabled) { 0328 _scaleLog->setChecked(enabled); 0329 } 0330 0331 0332 bool AxisTab::isAutoBaseOffset() const { 0333 return _scaleAutoBaseOffset->isChecked(); 0334 } 0335 0336 0337 bool AxisTab::isAutoBaseOffsetDirty() const { 0338 return _scaleAutoBaseOffset->checkState() != Qt::PartiallyChecked; 0339 } 0340 0341 0342 bool AxisTab::isBaseOffset() const { 0343 return _scaleBaseOffset->isChecked(); 0344 } 0345 0346 0347 bool AxisTab::isBaseOffsetDirty() const { 0348 return _scaleBaseOffset->checkState() != Qt::PartiallyChecked; 0349 } 0350 0351 0352 bool AxisTab::isForceOffsetMin() const { 0353 return _forceOffsetMin->isChecked(); 0354 } 0355 0356 0357 bool AxisTab::isForceOffsetMinDirty() const { 0358 return _forceOffsetMin->checkState() != Qt::PartiallyChecked; 0359 } 0360 0361 0362 void AxisTab::setForceOffsetMin(bool enabled) { 0363 _forceOffsetMin->setChecked(enabled); 0364 } 0365 0366 0367 void AxisTab::setBaseOffsetMode(bool auto_on, bool on) { 0368 if (auto_on) { 0369 _scaleAutoBaseOffset->setChecked(true); 0370 _scaleBaseOffset->setChecked(false); 0371 _baseOffsetOff->setChecked(false); 0372 } else if (on) { 0373 _scaleAutoBaseOffset->setChecked(false); 0374 _scaleBaseOffset->setChecked(true); 0375 _baseOffsetOff->setChecked(false); 0376 } else { 0377 _scaleAutoBaseOffset->setChecked(false); 0378 _scaleBaseOffset->setChecked(false); 0379 _baseOffsetOff->setChecked(true); 0380 } 0381 updateButtons(); 0382 } 0383 0384 0385 bool AxisTab::isReversed() const { 0386 return _scaleReverse->isChecked(); 0387 } 0388 0389 0390 bool AxisTab::isReversedDirty() const { 0391 return _scaleReverse->checkState() != Qt::PartiallyChecked; 0392 } 0393 0394 0395 void AxisTab::setReversed(const bool enabled) { 0396 _scaleReverse->setChecked(enabled); 0397 } 0398 0399 0400 bool AxisTab::isInterpret() const { 0401 return _scaleInterpret->isChecked(); 0402 } 0403 0404 0405 bool AxisTab::isInterpretDirty() const { 0406 return _scaleInterpret->checkState() != Qt::PartiallyChecked; 0407 } 0408 0409 0410 void AxisTab::setInterpret(const bool enabled) { 0411 _scaleInterpret->setChecked(enabled); 0412 } 0413 0414 0415 AxisDisplayType AxisTab::axisDisplay() const { 0416 return AxisDisplayType(_scaleDisplayType->itemData(_scaleDisplayType->currentIndex()).toInt()); 0417 } 0418 0419 bool AxisTab::axisDisplayDirty() const { 0420 return _scaleDisplayType->currentIndex() != -1; 0421 } 0422 0423 void AxisTab::setAxisDisplay(AxisDisplayType display) { 0424 _scaleDisplayType->setCurrentIndex(_scaleDisplayType->findData(QVariant(display))); 0425 } 0426 0427 QString AxisTab::axisDisplayFormatString() const { 0428 return _scaleDisplayFormatString->text(); 0429 } 0430 0431 bool AxisTab::axisDisplayFormatStringDirty() const { 0432 return !_scaleDisplayFormatString->text().isEmpty(); 0433 } 0434 0435 void AxisTab::setAxisDisplayFormatString(const QString& formatString) { 0436 _scaleDisplayFormatString->setText(formatString); 0437 } 0438 0439 0440 QString AxisTab::timezone() const { 0441 return _timeZone->currentText(); 0442 } 0443 0444 0445 bool AxisTab::timezoneDirty() const { 0446 return _timeZone->currentIndex() != -1; 0447 } 0448 0449 0450 void AxisTab::setTimezone(QString timezone) { 0451 _timeZone->setCurrentIndex(_timeZone->findText(timezone)); 0452 } 0453 0454 0455 AxisInterpretationType AxisTab::axisInterpretation() const { 0456 return AxisInterpretationType(_scaleInterpretType->itemData(_scaleInterpretType->currentIndex()).toInt()); 0457 } 0458 0459 0460 bool AxisTab::axisInterpretationDirty() const { 0461 return _scaleInterpretType->currentIndex() != -1; 0462 } 0463 0464 0465 void AxisTab::setAxisInterpretation(AxisInterpretationType interpret) { 0466 _scaleInterpretType->setCurrentIndex(_scaleInterpretType->findData(QVariant(interpret))); 0467 } 0468 0469 0470 int AxisTab::labelRotation() const { 0471 return _rotation->value(); 0472 } 0473 0474 0475 bool AxisTab::labelRotationDirty() const { 0476 return (!_rotation->text().isEmpty()); 0477 } 0478 0479 0480 void AxisTab::setLabelRotation(const int rotation) { 0481 _rotation->setValue(rotation); 0482 } 0483 0484 bool AxisTab::hideTopRight() const { 0485 return (_hideTopRight->isChecked()); 0486 } 0487 0488 bool AxisTab::hideTopRightDirty() const { 0489 return _hideTopRight->checkState() != Qt::PartiallyChecked; 0490 } 0491 0492 void AxisTab::setHideTopRight(bool hide) { 0493 _hideTopRight->setChecked(hide); 0494 } 0495 0496 bool AxisTab::hideBottomLeft() const { 0497 return (_hideBottomLeft->isChecked()); 0498 } 0499 0500 bool AxisTab::hideBottomLeftDirty() const { 0501 return _hideBottomLeft->checkState() != Qt::PartiallyChecked; 0502 } 0503 0504 void AxisTab::setHideBottomLeft(bool hide) { 0505 _hideBottomLeft->setChecked(hide); 0506 } 0507 0508 0509 void AxisTab::offsetAutoPressed() { 0510 if (_scaleAutoBaseOffset->checkState() == Qt::Checked) { 0511 _scaleBaseOffset->setChecked(false); 0512 _baseOffsetOff->setChecked(false); 0513 } else if (_scaleAutoBaseOffset->checkState() == Qt::Unchecked) { 0514 _scaleBaseOffset->setChecked(true); 0515 _baseOffsetOff->setChecked(false); 0516 } else if (_scaleAutoBaseOffset->checkState() == Qt::PartiallyChecked) { 0517 _scaleBaseOffset->setCheckState(Qt::PartiallyChecked); 0518 _baseOffsetOff->setCheckState(Qt::PartiallyChecked); 0519 } 0520 _forceOffsetMin->setEnabled(true); 0521 updateButtons(); 0522 } 0523 0524 void AxisTab::offsetOnPressed() { 0525 if (_scaleBaseOffset->checkState() == Qt::Checked) { 0526 _scaleAutoBaseOffset->setChecked(false); 0527 _baseOffsetOff->setChecked(false); 0528 } else if (_scaleBaseOffset->checkState() == Qt::Unchecked) { 0529 _scaleAutoBaseOffset->setChecked(true); 0530 _baseOffsetOff->setChecked(false); 0531 } else if (_scaleBaseOffset->checkState() == Qt::PartiallyChecked) { 0532 _scaleAutoBaseOffset->setCheckState(Qt::PartiallyChecked); 0533 _baseOffsetOff->setCheckState(Qt::PartiallyChecked); 0534 } 0535 updateButtons(); 0536 } 0537 0538 void AxisTab::offsetOffPressed() { 0539 if (_baseOffsetOff->checkState() == Qt::Checked) { 0540 _scaleBaseOffset->setChecked(false); 0541 _scaleAutoBaseOffset->setChecked(false); 0542 } else if (_baseOffsetOff->checkState() == Qt::Unchecked) { 0543 _scaleAutoBaseOffset->setChecked(true); 0544 _scaleBaseOffset->setChecked(false); 0545 } else if (_baseOffsetOff->checkState() == Qt::PartiallyChecked) { 0546 _scaleAutoBaseOffset->setCheckState(Qt::PartiallyChecked); 0547 _scaleBaseOffset->setCheckState(Qt::PartiallyChecked); 0548 } 0549 updateButtons(); 0550 } 0551 0552 void AxisTab::updateFormatString() { 0553 bool enable = (AxisDisplayType(_scaleDisplayType->itemData(_scaleDisplayType->currentIndex()).toInt()) 0554 == AXIS_DISPLAY_QTDATETIME_FORMAT); 0555 _scaleDisplayFormatString->setEnabled(enable); 0556 _timeFormatLabel->setEnabled(enable); 0557 _timeFormatHelp->setEnabled(enable); 0558 } 0559 0560 void AxisTab::updateButtons() { 0561 bool interpret = (_scaleInterpret->checkState() == Qt::Checked); 0562 bool interpret_unchecked = (_scaleInterpret->checkState() == Qt::Unchecked); 0563 bool base_on_unchecked = (_scaleBaseOffset->checkState() == Qt::Unchecked); 0564 bool auto_unchecked = (_scaleAutoBaseOffset->checkState() == Qt::Unchecked); 0565 0566 _scaleBaseOffset->setEnabled(!interpret); 0567 _scaleAutoBaseOffset->setEnabled(!interpret); 0568 _baseOffsetOff->setEnabled(!interpret); 0569 0570 _significantDigits->setEnabled((!auto_unchecked) && (!interpret)); 0571 _significantDigitsLabel->setEnabled((!auto_unchecked) && (!interpret)); 0572 _forceOffsetMin->setEnabled((!interpret_unchecked) || (!base_on_unchecked)); 0573 0574 _axisMinorTickCount->setEnabled(_autoMinorTicks->checkState() != Qt::Checked); 0575 } 0576 0577 0578 void AxisTab::enableSingleEditOptions(bool enabled) { 0579 if (enabled) { 0580 _scaleLog->setTristate(false); 0581 _scaleBaseOffset->setTristate(false); 0582 _scaleAutoBaseOffset->setTristate(false); 0583 _baseOffsetOff->setTristate(false); 0584 _scaleReverse->setTristate(false); 0585 _scaleInterpret->setTristate(false); 0586 _drawAxisMajorTicks->setTristate(false); 0587 _drawAxisMajorGridLines->setTristate(false); 0588 _drawAxisMinorTicks->setTristate(false); 0589 _drawAxisMinorGridLines->setTristate(false); 0590 _autoMinorTicks->setTristate(false); 0591 } 0592 } 0593 0594 0595 void AxisTab::clearTabValues() { 0596 _scaleLog->setCheckState(Qt::PartiallyChecked); 0597 _scaleAutoBaseOffset->setCheckState(Qt::PartiallyChecked); 0598 _scaleBaseOffset->setCheckState(Qt::PartiallyChecked); 0599 _baseOffsetOff->setCheckState(Qt::PartiallyChecked); 0600 _forceOffsetMin->setCheckState(Qt::PartiallyChecked); 0601 _scaleReverse->setCheckState(Qt::PartiallyChecked); 0602 _scaleInterpret->setCheckState(Qt::PartiallyChecked); 0603 _autoMinorTicks->setCheckState(Qt::PartiallyChecked); 0604 _significantDigits->clear(); 0605 _rotation->clear(); 0606 _scaleInterpretType->setCurrentIndex(-1); 0607 _scaleDisplayType->setCurrentIndex(-1); 0608 _scaleDisplayFormatString->setText("hh:mm:ss.zzz"); 0609 _timeZone->setCurrentIndex(-1); 0610 0611 _drawAxisMajorTicks->setCheckState(Qt::PartiallyChecked); 0612 _drawAxisMajorGridLines->setCheckState(Qt::PartiallyChecked); 0613 _drawAxisMinorTicks->setCheckState(Qt::PartiallyChecked); 0614 _drawAxisMinorGridLines->setCheckState(Qt::PartiallyChecked); 0615 0616 _axisMajorTickSpacing->setCurrentIndex(-1); 0617 _axisMajorLineStyle->setCurrentIndex(-1); 0618 _axisMinorLineStyle->setCurrentIndex(-1); 0619 _axisMajorLineColor->clearSelection(); 0620 _axisMinorLineColor->clearSelection(); 0621 _axisMinorTickCount->clear(); 0622 0623 _hideBottomLeft->setCheckState(Qt::PartiallyChecked); 0624 _hideTopRight->setCheckState(Qt::PartiallyChecked); 0625 } 0626 0627 void AxisTab::setAsYAxis() { 0628 _hideBottomLeft->setText(tr("Hide left")); 0629 _hideTopRight->setText(tr("Hide right")); 0630 } 0631 0632 } 0633 0634 // vim: ts=2 sw=2 et 0635