Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
historyform.cpp
1 //This program is free software: you can redistribute it and/or modify
2 //it under the terms of the GNU General Public License as published by
3 //the Free Software Foundation, either version 3 of the License, or
4 //(at your option) any later version.
5 
6 //This program is distributed in the hope that it will be useful,
7 //but WITHOUT ANY WARRANTY; without even the implied warranty of
8 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 //GNU General Public License for more details.
10 
11 #include "historyform.hpp"
12 #include "ui_historyform.h"
13 
14 using namespace Huggle;
15 
16 HistoryForm::HistoryForm(QWidget *parent) : QDockWidget(parent), ui(new Ui::HistoryForm)
17 {
18  ui->setupUi(this);
19  ui->pushButton->setEnabled(false);
20  /// \todo LOCALIZE ME
21  ui->pushButton->setText("No edit info");
22 }
23 
24 HistoryForm::~HistoryForm()
25 {
26  delete ui;
27 }
28 
30 {
31  if (edit == NULL)
32  {
33  throw new Exception("WikiEdit edit must not be NULL", "void HistoryForm::Update(WikiEdit *edit)");
34  }
35  this->CurrentEdit = edit;
36  /// \todo LOCALIZE ME
37  this->ui->pushButton->setText("Retrieve history");
38  this->ui->pushButton->setEnabled(true);
39 }
40 
42 {
43  /// \todo LOCALIZE ME
44  ui->pushButton->setText("Retrieving history");
45  ui->pushButton->setEnabled(false);
46 }
Every exception raised by huggle is defined by this class.
Definition: exception.hpp:20
Wiki edit.
Definition: wikiedit.hpp:67
void Update(WikiEdit *edit)
Definition: historyform.cpp:29
HistoryForm(QWidget *parent=0)
Definition: historyform.cpp:16
void on_pushButton_clicked()
Definition: historyform.cpp:41
It can be used to retrieve a history of currently displayed page.
Definition: historyform.hpp:29