~ubuntu-branches/ubuntu/raring/quassel/raring-proposed

« back to all changes in this revision

Viewing changes to src/qtui/settingsdlg.h

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2008-06-27 19:21:30 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20080627192130-kjsrutd8w40x5okn
Tags: upstream-0.2.0~rc1
ImportĀ upstreamĀ versionĀ 0.2.0~rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
class SettingsDlg : public QDialog {
30
30
  Q_OBJECT
31
 
  public:
32
 
    SettingsDlg(QWidget *parent = 0);
33
 
    void registerSettingsPage(SettingsPage *);
34
 
    void unregisterSettingsPage(SettingsPage *);
35
 
 
36
 
    SettingsPage *currentPage() const;
37
 
 
38
 
    //QSize sizeHint() const;
39
 
 
40
 
  public slots:
41
 
    void selectPage(const QString &category, const QString &title);
42
 
 
43
 
  private slots:
44
 
    void itemSelected();
45
 
    void buttonClicked(QAbstractButton *);
46
 
    bool applyChanges();
47
 
    void undoChanges();
48
 
    void reload();
49
 
    void loadDefaults();
50
 
    void setButtonStates();
51
 
 
52
 
  private:
53
 
    Ui::SettingsDlg ui;
54
 
 
55
 
    SettingsPage *_currentPage;
56
 
    QHash<QString, SettingsPage *> pages;
57
 
    QHash<SettingsPage *, QTreeWidgetItem *> treeItems;
58
 
    QHash<SettingsPage *, bool> pageIsLoaded;
59
 
 
60
 
    //QSize recommendedSize;
 
31
 
 
32
public:
 
33
  SettingsDlg(QWidget *parent = 0);
 
34
  void registerSettingsPage(SettingsPage *);
 
35
  void unregisterSettingsPage(SettingsPage *);
 
36
 
 
37
  inline SettingsPage *currentPage() const { return _currentPage; }
 
38
 
 
39
public slots:
 
40
  void selectPage(SettingsPage *sp); // const QString &category, const QString &title);
 
41
 
 
42
private slots:
 
43
  void itemSelected();
 
44
  void buttonClicked(QAbstractButton *);
 
45
  bool applyChanges();
 
46
  void undoChanges();
 
47
  void reload();
 
48
  void loadDefaults();
 
49
  void setButtonStates();
 
50
  
 
51
private:
 
52
  Ui::SettingsDlg ui;
 
53
  
 
54
  SettingsPage *_currentPage;
 
55
  QHash<SettingsPage *, bool> pageIsLoaded;
 
56
 
 
57
  enum {
 
58
    SettingsPageRole = Qt::UserRole
 
59
  };
61
60
};
62
61
 
63
62