//--------------------------------------- void POI_Editor::updateInterface() { inputName->setText (poi->name); inputStyle->setFont (poi->labelFont); inputStyle->setTextColor (poi->labelTextColor); QColor bgColor; // read correct bg-color of POI, not the one used to mark a selected POI, TH20110103 if (poi->labelBgColorMarkedPOI.isValid()) { bgColor = poi->labelBgColorMarkedPOI; } else { bgColor = poi->labelBgColor; } bgColor.setAlpha(255); // no transparency in color editor inputStyle->setBgColor (bgColor); inputPosition->setPosition (poi->lat, poi->lon); //printf ("markColor: %s\n", qPrintable(poi->markColor.name()) ); inputMarkColor->setColor (poi->markColor); inputMarkColor->setDefaultColor (Qt::red); cbIsMovable->setChecked (poi->isMovable); cbShowLabel->setChecked (poi->showLabel); connect(btValid, SIGNAL(clicked()), this, SLOT(btOkClicked())); connect(btCancel, SIGNAL(clicked()), this, SLOT(btCancelClicked())); connect(btDelete, SIGNAL(clicked()), this, SLOT(btDeleteClicked())); setModal(false); show(); }
SignatureDialog::SignatureDialog(QWidget *parent) : QDialog(parent), m_okClicked(false), m_isBlocking(false) { m_buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); m_dataLayout = new OptionLayout(); m_mainLayout = new QVBoxLayout(this); m_mainLayout->addLayout(m_dataLayout); m_mainLayout->addWidget(m_buttons); connect(m_buttons, SIGNAL(accepted()), this, SLOT(btOkClicked())); connect(m_buttons, SIGNAL(rejected()), this, SLOT(btCancelClicked())); }
//--------------------------------------- void POI_Editor::reject() { btCancelClicked(); }