Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
ignorelist.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 "ignorelist.hpp"
12 #include "ui_ignorelist.h"
13 
14 using namespace Huggle;
15 
16 IgnoreList::IgnoreList(QWidget *parent) : QDialog(parent), ui(new Ui::IgnoreList)
17 {
18  ui->setupUi(this);
19  model = new QStandardItemModel(Configuration::LocalConfig_Ignores.count(), 1, this);
20  ui->listView->setModel(model);
21  int it = 0;
22  while (it < Configuration::LocalConfig_Ignores.count())
23  {
24  model->setItem(it, new QStandardItem(Configuration::LocalConfig_Ignores.at(it)));
25  it++;
26  }
27 }
28 
29 IgnoreList::~IgnoreList()
30 {
31  delete model;
32  delete ui;
33 }
34 
35 void IgnoreList::on_pushButton_clicked()
36 {
37  this->close();
38 }
A window that contains ignore list.
Definition: ignorelist.hpp:26