Move from SLabel to ActiveLabel
[shopper.git] / src / ui / PreferencesDialog.h
blobbb3c5ec6cab664db52d9333fd8f071f8a8b1a22a
1 /* Shopper
2 * Copyright (C) 2008 David Greaves <david@dgreaves.com>
4 * This software is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public License
6 * as published by the Free Software Foundation; either version 2.1 of
7 * the License, or (at your option) any later version.
9 * This software is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this software; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
17 * 02110-1301 USA
20 #ifndef SHOPPER_UI_PREFERENCESDIALOG_H
21 #define SHOPPER_UI_PREFERENCESDIALOG_H
22 #include "shopperList.h"
23 #include <QDialog>
24 #include <QString>
25 #include <QSignalMapper>
26 #include "CatListModel.h"
28 class QCheckBox;
29 class QGridLayout;
30 class QTabWidget;
31 class QDialogButtonBox;
32 class QWidget;
34 namespace Shopper
36 // private base for adding/editing an Item
37 class PreferencesDialog : public QDialog
39 Q_OBJECT;
40 public:
41 PreferencesDialog(QWidget *parent = 0);
43 public slots:
44 void toggleSetting(const QString setting);
46 private:
47 QCheckBox* addPref(const QString setting, bool defaultVal, QString label, QGridLayout *layout, int row);
49 // GUI
50 QTabWidget *tabWidget;
51 QDialogButtonBox *buttonBox;
52 QWidget *uiPane; // Show hide elements, columns etc
53 QWidget *dataPane; // Save on exit?
54 QSignalMapper signalMapper;
57 #endif