~jakuje/wallpaper-changer/qt4-compat

« back to all changes in this revision

Viewing changes to src/gui/potd_viewer.cpp

  • Committer: Alex Solanos
  • Date: 2015-08-23 16:51:21 UTC
  • Revision ID: alexsol.developer@gmail.com-20150823165121-wogzh1zpn26z2sbe
Remove numix theme
Add Le Point image to fetch from the interwebz
Make TryHard class to help keep the code DRY between le point and potd
preview code
Some general code cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
    ui->save_progressBar->hide();
43
43
    ui->dateEdit->setDate(selectedDate_);
44
 
    if(gv.currentTheme=="numix"){
45
 
        QFile file(":/themes/numix.css");
46
 
        if(!file.open(QIODevice::ReadOnly)){
47
 
            Global::error("Could not load the numix theme file.");
48
 
            return;
49
 
        }
50
44
 
51
 
        ui->potdDescription->document()->setDefaultStyleSheet(file.readAll());
52
 
        file.close();
53
 
    }
54
45
    (void) new QShortcut(Qt::Key_Right, this, SLOT(on_nextButton_clicked()));
55
46
    (void) new QShortcut(Qt::Key_Left, this, SLOT(on_previousButton_clicked()));
56
47
}
109
100
    {
110
101
        url_ = "https://en.wikipedia.org/wiki/Template:POTD/"+selectedDate_.toString("yyyy-MM-dd");
111
102
    }
112
 
    qDebug() << url_;
113
103
    // schedule the request
114
104
    startRequest(url_);
115
105
}
158
148
    reply_->deleteLater();
159
149
    reply_ = NULL;
160
150
 
161
 
    qDebug() << "ftanw";
162
 
 
163
151
    if(!skipStepsAfterThree_)
164
152
    {
165
153
        /*