コード例 #1
0
ファイル: DialogProxy.cpp プロジェクト: norulz/zyGrib
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()));
}
コード例 #2
0
//===========================================================================
// DialogMeteotableOptions
//===========================================================================
DialogMeteotableOptions::DialogMeteotableOptions()
{
	setupUi(this);
	initInterface();
    
    connect(btCancel, SIGNAL(clicked()), this, SLOT(slotBtCancel()));
    connect(btOK, SIGNAL(clicked()), this, SLOT(slotBtOK()));
    
    connect(btAddVisibleItem,    SIGNAL(clicked()), this, SLOT(slotChangeVisibleItems()));
    connect(btRemoveVisibleItem, SIGNAL(clicked()), this, SLOT(slotChangeVisibleItems()));
}
コード例 #3
0
ファイル: DialogSelectMetar.cpp プロジェクト: Don42/zyGrib
//-------------------------------------------------------------------------------
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()));
}
コード例 #4
0
ファイル: DialogFonts.cpp プロジェクト: prohan91/zyGrib
//==============================================================================
//==============================================================================
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()));
}
コード例 #5
0
ファイル: DialogLoadMBLUE.cpp プロジェクト: prohan91/zyGrib
//-------------------------------------------------------------------------------
DialogLoadMBLUE::DialogLoadMBLUE (MeteoblueZone zone, 
								  QNetworkAccessManager *manager, QWidget *parent) 
	: DialogBoxBase (parent)
{
    loadmblue = NULL;
	networkManager = manager;
	meteoblueZone = zone;
	savedFileName = "";
    oldcursor = cursor();
    
    setWindowTitle(tr("Download - Meteoblue - Swiss area")); 
    loadInProgress = false;
    QFrame * frameButtonsZone = createFrameButtonsZone(this);

    rain  = true;
    cloud = true;
    pressure = true;
    wind  = true;
    temp  = true;
    humid = true;
    isotherm0 = true;
    tempMin = true;
    tempMax = true;
    snowDepth = true;
    snowCateg = true;
    CAPEsfc = true;
    GUSTsfc = true;

    QGridLayout  *lay = new QGridLayout(this);
    assert(lay);
    lay->addWidget( frameButtonsZone,1,0, Qt::AlignLeft);

    connect(btCancel, SIGNAL(clicked()), this, SLOT(slotBtCancel()));
    connect(btOK, SIGNAL(clicked()), this, SLOT(slotBtOK()));
    connect(btServerStatus, SIGNAL(clicked()), this, SLOT(slotBtServerStatus()));
    connect(btProxy, SIGNAL(clicked()), this, SLOT(slotBtProxy()));

    //------------------------------------------------------
    connect(sbNorth, SIGNAL(valueChanged(double)),
            this,  SLOT(slotParameterUpdated()));
    connect(sbSouth, SIGNAL(valueChanged(double)),
            this,  SLOT(slotParameterUpdated()));
    connect(sbWest, SIGNAL(valueChanged(double)),
            this,  SLOT(slotParameterUpdated()));
    connect(sbEast, SIGNAL(valueChanged(double)),
            this,  SLOT(slotParameterUpdated()));
            
    connect(cbResolution, SIGNAL(activated(int)),
            this,  SLOT(slotParameterUpdated()));
    connect(cbInterval, SIGNAL(activated(int)),
            this,  SLOT(slotParameterUpdated()));
    connect(cbDays, SIGNAL(activated(int)),
            this,  SLOT(slotParameterUpdated()));
    
    connect(chkWind, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkPressure, SIGNAL(stateChanged(int)), this,  SLOT(slotParameterUpdated()));
    connect(chkRain, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkCloud, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkTemp, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkHumid, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkIsotherm0, SIGNAL(stateChanged(int)), this,  SLOT(slotParameterUpdated()));
                
    connect(chkTempMin, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkTempMax, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkSnowCateg, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkFrzRainCateg, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkSnowDepth, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkCAPEsfc, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkGUSTsfc, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
	
    connect(chkAltitude200, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkAltitude300, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkAltitude500, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkAltitude700, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkAltitude850, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkAltitudeAll, SIGNAL(stateChanged(int)), 	this,  SLOT(slotAltitudeAll()));
}
コード例 #6
0
ファイル: DialogLoadGRIB.cpp プロジェクト: prohan91/zyGrib
//-------------------------------------------------------------------------------
DialogLoadGRIB::DialogLoadGRIB (QNetworkAccessManager *manager, QWidget *parent)
	: DialogBoxBase (parent)
{
    oldcursor = cursor();
    loadgrib = NULL;
	networkManager = manager;
	savedFileName = "";
	
    setWindowTitle(tr("Download - GRIB"));
    loadInProgress = false;
    QFrame * frameButtonsZone = createFrameButtonsZone(this);

    rain  = true;
    cloud = true;
    pressure = true;
    wind  = true;
    temp  = true;
    humid = true;
    isotherm0 = true;
    tempMin = true;
    tempMax = true;
    snowDepth = true;
    snowCateg = true;
    CAPEsfc = true;
    GUSTsfc = true;
    SUNSDsfc = false;

    QGridLayout  *lay = new QGridLayout(this);
    assert(lay);
    lay->addWidget( frameButtonsZone,1,0, Qt::AlignLeft);
	
    connect(this, SIGNAL(finished(int)), this, SLOT(slotFinished(int)));

    connect(btCancel, SIGNAL(clicked()), this, SLOT(slotBtCancel()));
    connect(btOK, SIGNAL(clicked()), this, SLOT(slotBtOK()));
    connect(btServerStatus, SIGNAL(clicked()), this, SLOT(slotBtServerStatus()));
    connect(btProxy, SIGNAL(clicked()), this, SLOT(slotBtProxy()));

    //------------------------------------------------------
    connect(sbNorth, SIGNAL(valueChanged(double)),
            this,  SLOT(slotParameterUpdated()));
    connect(sbSouth, SIGNAL(valueChanged(double)),
            this,  SLOT(slotParameterUpdated()));
    connect(sbWest, SIGNAL(valueChanged(double)),
            this,  SLOT(slotParameterUpdated()));
    connect(sbEast, SIGNAL(valueChanged(double)),
            this,  SLOT(slotParameterUpdated()));
            
    connect(cbResolution, SIGNAL(activated(int)),
            this,  SLOT(slotParameterUpdated()));
    connect(cbInterval, SIGNAL(activated(int)),
            this,  SLOT(slotParameterUpdated()));
    connect(cbDays, SIGNAL(activated(int)),
            this,  SLOT(slotParameterUpdated()));
    
    connect(chkWind, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkPressure, SIGNAL(stateChanged(int)), this,  SLOT(slotParameterUpdated()));
    connect(chkRain, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkCloud, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
//     connect(chkCloudLayers, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkTemp, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkHumid, SIGNAL(stateChanged(int)), 	this,  SLOT(slotParameterUpdated()));
    connect(chkIsotherm0, SIGNAL(stateChanged(int)), this,  SLOT(slotParameterUpdated()));
                
    connect(chkTempMin, SIGNAL(stateChanged(int)), 	this, SLOT(slotParameterUpdated()));
    connect(chkTempMax, SIGNAL(stateChanged(int)), 	this, SLOT(slotParameterUpdated()));
    connect(chkSnowCateg, SIGNAL(stateChanged(int)), 	this, SLOT(slotParameterUpdated()));
    connect(chkFrzRainCateg, SIGNAL(stateChanged(int)), this, SLOT(slotParameterUpdated()));
    connect(chkSnowDepth, SIGNAL(stateChanged(int)), 	this, SLOT(slotParameterUpdated()));
    connect(chkCAPEsfc, SIGNAL(stateChanged(int)), 	this, SLOT(slotParameterUpdated()));
    connect(chkGUSTsfc, SIGNAL(stateChanged(int)), 	this, SLOT(slotParameterUpdated()));
    connect(chkSUNSDsfc, SIGNAL(stateChanged(int)), this, SLOT(slotParameterUpdated()));
	
    connect(chkAltitude_All, SIGNAL(stateChanged(int)), this, SLOT(slotAltitude_All()));
    connect(chkAltitude200, SIGNAL(stateChanged(int)), this, SLOT(slotParameterUpdated()));
    connect(chkAltitude300, SIGNAL(stateChanged(int)), this, SLOT(slotParameterUpdated()));
    connect(chkAltitude500, SIGNAL(stateChanged(int)), this, SLOT(slotParameterUpdated()));
    connect(chkAltitude700, SIGNAL(stateChanged(int)), this, SLOT(slotParameterUpdated()));
    connect(chkAltitude850, SIGNAL(stateChanged(int)), this, SLOT(slotParameterUpdated()));
    connect(chkAltitude925, SIGNAL(stateChanged(int)), this, SLOT(slotParameterUpdated()));
	
	connect(chkFnmocWW3_All, SIGNAL(stateChanged(int)), this, SLOT(slotFnmocWW3_All()));
    connect(chkFnmocWW3_sig, SIGNAL(stateChanged(int)),this, SLOT(slotParameterUpdated()));
    connect(chkFnmocWW3_max, SIGNAL(stateChanged(int)),this, SLOT(slotParameterUpdated()));
    connect(chkFnmocWW3_swl, SIGNAL(stateChanged(int)),this, SLOT(slotParameterUpdated()));
    connect(chkFnmocWW3_wnd, SIGNAL(stateChanged(int)),this, SLOT(slotParameterUpdated()));
    connect(chkFnmocWW3_prim, SIGNAL(stateChanged(int)),this, SLOT(slotParameterUpdated()));
    connect(chkFnmocWW3_scdy, SIGNAL(stateChanged(int)),this, SLOT(slotParameterUpdated()));
    connect(chkFnmocWW3_wcap, SIGNAL(stateChanged(int)),this, SLOT(slotParameterUpdated()));
	
    connect(bt_FNMOC_WW3_GLB, SIGNAL(clicked()),this, SLOT(slotParameterUpdated()));
    connect(bt_FNMOC_WW3_MED, SIGNAL(clicked()),this, SLOT(slotParameterUpdated()));
}