1 /*
2  * optionsdlg.cpp
3  * Copyright (C) 2003-2009  Michail Pishchagin
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  */
20 
21 #ifndef OPTIONSDLGBASE_H
22 #define OPTIONSDLGBASE_H
23 
24 #include "ui_ui_options.h"
25 #include <QDialog>
26 
27 class OptionsTab;
28 class PsiCon;
29 
30 class OptionsDlgBase : public QDialog, public Ui::OptionsUI
31 {
32 	Q_OBJECT
33 public:
34 	OptionsDlgBase(PsiCon *, QWidget *parent = 0);
35 	~OptionsDlgBase();
36 
37 	PsiCon *psi() const;
38 	void openTab(const QString& id);
39 
40 protected:
41 	void setTabs(QList<OptionsTab*> tabs); /* can be called from constructor */
42 
43 signals:
44 	void applyOptions();
45 
46 private slots:
47 	void doOk();
48 	void doApply();
49 	void enableCommonControls(bool enable = true);
50 
51 public:
52 	class Private;
53 private:
54 	Private *d;
55 	friend class Private;
56 
57 	QPushButton* pb_apply;
58 };
59 
60 #endif
61