Use NUtil 'info' and 'ask' instead
[nomnom.git] / src / log / nlogdialog.h
blob33313c7c5ca4d23bd01c91df9da47df4c104dfac
1 /* NomNom
2 * Copyright (C) 2011 Toni Gundogdu <legatvs@gmail.com>
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef nlogdialog_h
19 #define nlogdialog_h
21 #include <QDialog>
23 class QTreeWidget;
24 class QToolBox;
26 namespace nn
29 class NLogDialog : public QDialog
31 Q_OBJECT
32 public:
33 NLogDialog(QWidget *parent=NULL);
34 public:
35 QString selected() const;
36 protected:
37 void done(int);
38 private:
39 void foreachWidget();
40 private slots:
41 void selected(QString);
42 private:
43 QToolBox *_toolbox;
44 QString _selected;
47 class NLogWidget : public QWidget
49 Q_OBJECT
50 public:
51 NLogWidget(QWidget *parent);
52 protected:
53 virtual void init() = 0;
54 #ifdef _1
55 virtual void read() = 0;
56 #endif
57 // Friends
58 friend class NLogDialog;
61 class NLogRecent : public NLogWidget
63 Q_OBJECT
64 public:
65 NLogRecent(QWidget *parent=NULL);
66 signals:
67 void selected(QString);
68 private slots:
69 void selected();
70 void reset();
71 protected:
72 virtual void init();
73 #ifdef _1
74 virtual void read();
75 #endif
76 private:
77 QTreeWidget *_treew;
80 } // namespace nn
82 #endif
84 /* vim: set ts=2 sw=2 tw=72 expandtab: */