DialogProxy::DialogProxy (QWidget *parent) : DialogBoxBase (parent) { QLabel *label; QFrame *ftmp; frameGui = createFrameGui(this); layout = new QGridLayout(this); int lig=0; //------------------------- lig ++; QFont font; font.setBold(true); label = new QLabel(tr("Type of internet connection"), this); label->setFont(font); layout->addWidget( label, lig,0, 1,-1, Qt::AlignCenter); lig ++; ftmp = new QFrame(this); ftmp->setFrameShape(QFrame::HLine); layout->addWidget( ftmp, lig,0, 1, -1); //------------------------- lig ++; layout->addWidget( frameGui, lig,0, 1, 2); //------------------------- lig ++; ftmp = new QFrame(this); ftmp->setFrameShape(QFrame::HLine); layout->addWidget( ftmp, lig,0, 1, -1); //------------------------- lig ++; btOK = new QPushButton(tr("Ok"), this); btCancel = new QPushButton(tr("Cancel"), this); layout->addWidget( btOK, lig,0); layout->addWidget( btCancel, lig,1); //=============================================================== lineProxyHostname->setText (Util::decode(Util::getSetting("httpProxyHostname", "").toString())); lineProxyPort->setText (Util::getSetting("httpProxyPort", "").toString()); lineProxyUserName->setText (Util::decode(Util::getSetting("httpProxyUsername", "").toString())); lineProxyUserPassword->setText (Util::decode(Util::getSetting("httpProxyUserPassword", "").toString())); bool usep = Util::getSetting ("httpUseProxy", false).toBool(); btUseProxy->setChecked (usep); btDontUseProxy->setChecked (!usep); slotUseProxyChanged (); // lineZygribForumUserName->setText (Util::decode(Util::getSetting("zyGribForumUserName", "").toString())); // lineZygribForumUserPassword->setText (Util::decode(Util::getSetting("zyGribForumUserPassword", "").toString())); // usep = Util::getSetting ("strictHttpDownload", false).toBool(); // btStrictHttpDownload->setChecked (usep); // btStandardDownload->setChecked (!usep); // slotTrueHttpDownloadChanged (); //=============================================================== connect(btUseProxy, SIGNAL(clicked()), this, SLOT(slotUseProxyChanged())); connect(btDontUseProxy, SIGNAL(clicked()), this, SLOT(slotUseProxyChanged())); // connect(btStandardDownload, SIGNAL(clicked()), this, SLOT(slotTrueHttpDownloadChanged())); // connect(btStrictHttpDownload, SIGNAL(clicked()), this, SLOT(slotTrueHttpDownloadChanged())); connect(btCancel, SIGNAL(clicked()), this, SLOT(slotBtCancel())); connect(btOK, SIGNAL(clicked()), this, SLOT(slotBtOK())); }
//------------------------------------------------------------------------------- DialogSelectMetar::DialogSelectMetar (QWidget *parent) : DialogBoxBase (parent) { setWindowTitle (tr("METAR stations")); QFrame *ftmp; QLabel *label; frameGui = createFrameGui(this); layout = new QGridLayout(this); int lig=0; //------------------------- lig ++; QFont font; font.setBold(true); label = new QLabel(tr("METAR stations"), this); label->setFont(font); layout->addWidget( label, lig,0, 1,-1, Qt::AlignCenter); lig ++; ftmp = new QFrame(this); ftmp->setFrameShape(QFrame::HLine); layout->addWidget( ftmp, lig,0, 1, -1); //------------------------- lig ++; layout->addWidget( frameGui, lig,0, 1, 2); //------------------------- lig ++; ftmp = new QFrame(this); ftmp->setFrameShape(QFrame::HLine); layout->addWidget( ftmp, lig,0, 1, -1); //------------------------- lig ++; btOK = new QPushButton(tr("Ok"), this); layout->addWidget( btOK, lig,0); //---------------------------------------------------------- connect(btOK, SIGNAL(clicked()), this, SLOT(slotBtOK())); //---------------------------------------------------------- int treeoffset = Util::getSetting ("metar_tree_offset", 0).toInt(); treeWidget->verticalScrollBar()->setSliderPosition (treeoffset); QDesktopWidget *wscr = QApplication::desktop (); QRect r = wscr->availableGeometry(); this->setMinimumWidth (qMin(400,r.width())); this->setMinimumHeight (qMin(800,r.height())); }
//============================================================================== //============================================================================== DialogFonts::DialogFonts (QWidget *parent) : DialogBoxBase (parent) { setWindowTitle(tr("Fonts")); QFrame *ftmp; QLabel *label; frameGui = createFrameGui(this); layout = new QGridLayout(this); int lig=0; //------------------------- lig ++; QFont font; font.setBold(true); label = new QLabel(tr("Chgoice of fonts"), this); label->setFont(font); layout->addWidget( label, lig,0, 1,-1, Qt::AlignCenter); lig ++; ftmp = new QFrame(this); ftmp->setFrameShape(QFrame::HLine); layout->addWidget( ftmp, lig,0, 1, -1); lig ++; layout->addWidget( frameGui, lig,0, 1,-1, Qt::AlignCenter); //------------------------- lig ++; ftmp = new QFrame(this); ftmp->setFrameShape(QFrame::HLine); layout->addWidget( ftmp, lig,0, 1, -1); lig ++; btOK = new QPushButton(tr("Ok"), this); btCancel = new QPushButton(tr("Cancel"), this); layout->addWidget( btOK, lig,0); layout->addWidget( btCancel, lig,1); //=============================================================== connect(btCancel, SIGNAL(clicked()), this, SLOT(slotBtCancel())); connect(btOK, SIGNAL(clicked()), this, SLOT(slotBtOK())); }