caLabel::caLabel(QWidget *parent) : ESimpleLabel(parent) { setFontScaleMode(WidthAndHeight); thisBackColor = Qt::gray; thisForeColor = Qt::black; thisBackColorOld = Qt::black; thisForeColorOld = Qt::black; thisColorMode=Static; oldColorMode =Static; setColorMode(Static); thisVisibility = StaticV; }
caBitnames::caBitnames(QWidget *parent) : EFlag(parent) { setNumColumns(1); thisStartBit=0; thisEndBit = 15; setStartBit(0); setEndBit(15); thisString = ""; setTrueColor(Qt::blue); setFalseColor(Qt::gray); numRows = 16; thisAlignment = EFlag::left; setFontScaleMode(ESimpleLabel::WidthAndHeight); setEnumStrings("1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16"); setValue(0); }
int ESimpleLabel::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QLabel::qt_metacall(_c, _id, _a); if (_id < 0) return _id; #ifndef QT_NO_PROPERTIES if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< bool*>(_v) = fontScaleEnabled(); break; case 1: *reinterpret_cast< double*>(_v) = botTopBorderWidth(); break; case 2: *reinterpret_cast< double*>(_v) = lateralBorderWidth(); break; case 3: *reinterpret_cast< double*>(_v) = fontScaleFactor(); break; case 4: *reinterpret_cast< ScaleMode*>(_v) = fontScaleMode(); break; } _id -= 5; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 1: setBotTopBorderWidth(*reinterpret_cast< double*>(_v)); break; case 2: setLateralBorderWidth(*reinterpret_cast< double*>(_v)); break; case 3: setFontScaleFactor(*reinterpret_cast< double*>(_v)); break; case 4: setFontScaleMode(*reinterpret_cast< ScaleMode*>(_v)); break; } _id -= 5; } else if (_c == QMetaObject::ResetProperty) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyDesignable) { bool *_b = reinterpret_cast<bool*>(_a[0]); switch (_id) { case 1: *_b = fontScaleEnabled(); break; case 2: *_b = fontScaleEnabled(); break; } _id -= 5; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 5; } #endif // QT_NO_PROPERTIES return _id; }
caCalc::caCalc( QWidget *parent ) : ESimpleLabel(parent) { thisChannelA=""; thisChannelB=""; thisChannelC=""; thisChannelD=""; thisVariable=""; thisValue = 0.0; keepText=""; setFontScaleMode(WidthAndHeight); setForeAndBackground(Qt::black, Qt::lightGray); setPrecision(2); thisEventSignal = Never; eventFired = false; }
caToggleButton::caToggleButton(QWidget *parent) : QCheckBox(parent), FontScalingWidget(this) { setCheckable(true); setTristate(true); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); thisPalette = palette(); thisBackColor = defaultBackColor = QColor(200,200,200,0); thisForeColor = defaultForeColor = Qt::black; thisColorMode=Static; setBackground(defaultBackColor); setForeground(defaultForeColor); installEventFilter(this); connect(this, SIGNAL(clicked()), this, SLOT(buttonToggled()) ); setTrueValue("1"); setFalseValue("0"); setAccessW(true); setFontScaleMode(WidthAndHeight); }
caCalc::caCalc( QWidget *parent ) : ESimpleLabel(parent) { // to start with, clear the stylesheet, so that playing around // is not possible. setStyleSheet(""); thisChannelA=""; thisChannelB=""; thisChannelC=""; thisChannelD=""; thisVariable=""; thisValue = 0.0; thisPV=QStringList(); keepText=""; setVariableType(scalar); setFontScaleMode(WidthAndHeight); setForeAndBackground(Qt::black, Qt::lightGray); setPrecision(2); thisEventSignal = Never; eventFired = false; }