Added icon
[urpo] / src / settingsdialog.h
1 /**************************************************************************
2
3     URPO
4
5     Unix Remote Printing Operation
6     Copyright (c) Arto Hyvättinen 2010
7
8     This file is part of URPO.
9
10     URPO is free software: you can redistribute it and/or modify
11     it under the terms of the GNU General Public License as published by
12     the Free Software Foundation, either version 3 of the License, or
13     (at your option) any later version.
14
15     URPO is distributed in the hope that it will be useful,
16     but WITHOUT ANY WARRANTY; without even the implied warranty of
17     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18     GNU General Public License for more details.
19
20
21 **************************************************************************/
22
23 #ifndef SETTINGSDIALOG_H
24 #define SETTINGSDIALOG_H
25
26 #include <QDialog>
27 #include <QTextBrowser>
28 class QLineEdit;
29 class QPushButton;
30 class UrpoConnectionSettings;
31
32 /*! GUI dialog for Urpo Setting
33
34    @author Arto Hyvättinen
35    @date 2010-06-13
36    @version 0.1
37
38    Dialog for settings. Remember to set setSettings() and setHelp().
39    Designed for modeless use (in modal can't show help
40
41   */
42 class SettingsDialog : public QDialog
43 {
44     Q_OBJECT
45 public:
46     explicit SettingsDialog(QWidget *parent = 0);
47     /*! Set UrpoConnection having connection settings */
48     void setSettings(UrpoConnectionSettings* settings);
49     /*! Set QTextBrowser showing help */
50     void setHelp(QTextBrowser* helpWidget);
51 signals:
52
53 public slots:
54     void okay();
55     void serverChanged(const QString& text);
56     void browse();
57     void showHelp();
58
59 private:
60     QLineEdit*  serverEdit;
61     QLineEdit*  userEdit;
62     QLineEdit*  identityEdit;
63     QPushButton*    browseButton;
64     QPushButton*    okButton;
65     QPushButton*    helpButton;
66     UrpoConnectionSettings* settings_;
67     QTextBrowser*    helpWidget_;
68
69 };
70
71 #endif // SETTINGSDIALOG_H