AskColorDialog::AskColorDialog(QColor initial, QWidget *parent) : QColorDialog(initial, parent) { hexcode = new QLineEdit( this); hexcode->setMaxLength(9); QLayout *layout = this->layout(); // find a nice spot in the layout... for (int k=0; k<2; k++) if (layout) { for (int i=2; i>=0; i--) { QLayoutItem *test = layout->itemAt(i); if (test) if (test->layout()) { layout = test->layout(); //qDebug("ok %d (%d)",i,k); break; } } } if (layout) layout->addWidget(hexcode); connect(hexcode,SIGNAL(textEdited(QString)),this,SLOT(setHex())); connect(this,SIGNAL(currentColorChanged(QColor)),this,SLOT(updateHex())); setOption(ShowAlphaChannel, true); updateHex(); setHex(); }
bool Save(const ARGUMENTSINFO & value) override { setString("module", value.mod); setHex("start", value.start); setHex("end", value.end); setHex("icount", value.instructioncount); setBool("manual", value.manual); return true; }
int ByteConverter::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: decChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 1: hexChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 2: binChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 3: setDec((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 4: setHex((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 5: setBin((*reinterpret_cast< const QString(*)>(_a[1]))); break; default: ; } _id -= 6; } return _id; }