void TimgFilterLogoaway::Tplane::process(const TlogoawaySettings *cfg)
{
    createBorder(cfg,TlogoawaySettings::NORTH,cfg->bordn_mode);
    createBorder(cfg,TlogoawaySettings::EAST ,cfg->borde_mode);
    createBorder(cfg,TlogoawaySettings::SOUTH,cfg->bords_mode);
    createBorder(cfg,TlogoawaySettings::WEST ,cfg->bordw_mode);

    saveLogoBorder(TlogoawaySettings::NORTH);
    saveLogoBorder(TlogoawaySettings::SOUTH);
    saveLogoBorder(TlogoawaySettings::EAST );
    saveLogoBorder(TlogoawaySettings::WEST );

    switch (cfg->mode) {
        case TlogoawaySettings::MODE_XY:
            setAverageVH(cfg);
            for (int i=1; i<=cfg->blur; i++) {
                blurLogotemp(false);
            }
            break;
        case TlogoawaySettings::MODE_UGLARM:
            uwe(cfg);
            break;
        case TlogoawaySettings::MODE_SOLIDFILL:
            setSolid(cfg);
            break;
        case TlogoawaySettings::MODE_SHAPEXY:
            if (parambitmapdata) {
                renderShapeXY(cfg);
                for (int i=1; i<=cfg->blur; i++) {
                    blurLogotemp(true);
                }
                break;
            } else {
                return;
            }
        case TlogoawaySettings::MODE_SHAPEUGLARM:
            if (parambitmapdata) {
                renderShapeUwe(cfg);
                for (int i=1; i<=cfg->blur; i++) {
                    blurLogotemp(true);
                }
                break;
            } else {
                return;
            }
    }

    loadLogo(cfg,
             cfg->bordn_mode==TlogoawaySettings::BM_INTERPOLATE,
             cfg->borde_mode==TlogoawaySettings::BM_INTERPOLATE,
             cfg->bords_mode==TlogoawaySettings::BM_INTERPOLATE,
             cfg->bordw_mode==TlogoawaySettings::BM_INTERPOLATE);
}
Esempio n. 2
0
MainWindow::MainWindow(QWidget *parent)
    : QWidget(parent)
{
    currentScreen = "title";
    dataSent = false;

    //Application Logo
    QLabel *title = new QLabel;
    title->setAlignment(Qt::AlignHCenter);
    title->setPixmap(loadLogo());
    title->setScaledContents(true);

    //Screens
    screenTitle         = new ScreenTitle(this);
    industryElectricity = new IndustryElectricity(this);    industryElectricity->hide();
    industryHeat        = new IndustryHeat(this);           industryHeat->hide();
    industrySteam       = new IndustrySteam(this);          industrySteam->hide();
    homeElectricity     = new HomeElectricity(this);        homeElectricity->hide();
    homeHeat            = new HomeHeat(this);               homeHeat->hide();
    homePV              = new HomePV(this);                 homePV->hide();
    homeHabitat         = new HomeHabitat(this);            homeHabitat->hide();
    finalScreen         = new FinalScreen(this);            finalScreen->hide();

    //Previous & Next
    prev = new QPushButton(tr("Quit"));
    next = new QPushButton(tr("Next >"));

    //Grid Layout
    layoutMainWindow.addWidget(title,               0, 0, 1, 2);
    layoutMainWindow.addWidget(screenTitle,         1, 0, 1, 2);
    layoutMainWindow.addWidget(industryElectricity, 1, 0, 1, 2);
    layoutMainWindow.addWidget(industryHeat,        1, 0, 1, 2);
    layoutMainWindow.addWidget(industrySteam  ,     1, 0, 1, 2);
    layoutMainWindow.addWidget(homeElectricity,     1, 0, 1, 2);
    layoutMainWindow.addWidget(homeHeat,            1, 0, 1, 2);
    layoutMainWindow.addWidget(homePV,              1, 0, 1, 2);
    layoutMainWindow.addWidget(homeHabitat,         1, 0, 1, 2);
    layoutMainWindow.addWidget(finalScreen,         1, 0, 1, 2);
    layoutMainWindow.addWidget(prev,                2, 0, 1, 1);
    layoutMainWindow.addWidget(next,                2, 1, 1, 1);
    layoutMainWindow.setRowStretch(0, 0);
    layoutMainWindow.setRowStretch(1, 1);
    layoutMainWindow.setRowStretch(2, 0);
    setLayout(&layoutMainWindow);

    connect(prev, SIGNAL(clicked()), this, SLOT(previousScreen()));
    connect(next, SIGNAL(clicked()), this, SLOT(nextScreen()));
}