Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
speedyform.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 "speedyform.hpp"
12 #include "ui_speedyform.h"
13 
14 using namespace Huggle;
15 
16 SpeedyForm::SpeedyForm(QWidget *parent) : QDialog(parent), ui(new Ui::SpeedyForm)
17 {
18  this->Page = NULL;
19  this->User = NULL;
20  ui->setupUi(this);
21  int i=0;
22  while (i < Configuration::LocalConfig_DeletionTemplates.count())
23  {
24  QString item = Configuration::LocalConfig_DeletionTemplates.at(i);
25  // now we need to get first 2 items
26  QStringList vals = item.split(";");
27  if (vals.count() < 4)
28  {
29  Core::DebugLog("Invalid csd: " + item);
30  i++;
31  continue;
32  }
33  ui->comboBox->addItem(vals.at(0) + ": " + vals.at(1));
34  i++;
35  }
36 }
37 
38 void SpeedyForm::on_pushButton_clicked()
39 {
40  ui->pushButton->setEnabled(false);
41 }
42 
43 void SpeedyForm::on_pushButton_2_clicked()
44 {
45  this->close();
46 }
47 
48 SpeedyForm::~SpeedyForm()
49 {
50  delete ui;
51 }
52 
53 void SpeedyForm::Init(WikiUser *user, WikiPage *page)
54 {
55  this->User = user;
56  this->ui->label_2->setText(page->PageName);
57  this->Page = page;
58 }
The window that is used to report a page for deletion.
Definition: speedyform.hpp:34
Mediawiki page.
Definition: wikipage.hpp:43
static void DebugLog(QString Message, unsigned int Verbosity=1)
This log is only shown if verbosity is same or larger than requested verbosity.
Definition: core.cpp:641
QString PageName
Name of page.
Definition: wikipage.hpp:48