source: trunk/qt/PrefsDialog.h @ 14561

Last change on this file since 14561 was 14561, checked in by mikedld, 7 years ago

Remove context help button from dialogs on Windows

We don't currently (if ever) provide context help, so the button is
useless. Moreover, on Windows 10 it's even larger than before and
sometimes title text doesn't fit because of it.

  • Property svn:keywords set to Date Rev Author Id
File size: 2.2 KB
Line 
1/*
2 * This file Copyright (C) 2009-2015 Mnemosyne LLC
3 *
4 * It may be used under the GNU GPL versions 2 or 3
5 * or any future license endorsed by Mnemosyne LLC.
6 *
7 * $Id: PrefsDialog.h 14561 2015-09-01 20:19:26Z mikedld $
8 */
9
10#ifndef QTR_PREFS_DIALOG_H
11#define QTR_PREFS_DIALOG_H
12
13#include <QMap>
14#include <QSet>
15
16#include "BaseDialog.h"
17#include "Prefs.h"
18
19#include "ui_PrefsDialog.h"
20
21class QHttp;
22class QMessageBox;
23class QString;
24
25class Prefs;
26class Session;
27
28class PrefsDialog: public BaseDialog
29{
30    Q_OBJECT
31
32  public:
33    PrefsDialog (Session&, Prefs&, QWidget * parent = nullptr);
34    virtual ~PrefsDialog ();
35
36  private:
37    typedef QMap<int, QWidget*> key2widget_t;
38
39  private:
40    bool updateWidgetValue (QWidget * widget, int prefKey);
41    void linkWidgetToPref (QWidget * widget, int prefKey);
42    void updateBlocklistLabel ();
43
44    void setPref (int key, const QVariant& v);
45
46    void initDownloadingTab ();
47    void initSeedingTab ();
48    void initSpeedTab ();
49    void initPrivacyTab ();
50    void initNetworkTab ();
51    void initDesktopTab ();
52    void initRemoteTab ();
53
54  private slots:
55    void checkBoxToggled (bool checked);
56    void spinBoxEditingFinished ();
57    void timeEditingFinished ();
58    void lineEditingFinished ();
59    void pathChanged (const QString& path);
60    void refreshPref (int key);
61    void encryptionEdited (int);
62    void altSpeedDaysEdited (int);
63    void sessionUpdated ();
64    void onPortTested (bool);
65    void onPortTest ();
66    void onIdleLimitChanged ();
67    void onQueueStalledMinutesChanged ();
68
69    void onUpdateBlocklistClicked ();
70    void onUpdateBlocklistCancelled ();
71    void onBlocklistDialogDestroyed (QObject *);
72    void onBlocklistUpdated (int n);
73
74  private:
75    Session& mySession;
76    Prefs& myPrefs;
77
78    Ui::PrefsDialog ui;
79
80    key2widget_t myWidgets;
81    const bool myIsServer;
82    QWidgetList myWebWidgets;
83    QWidgetList myWebAuthWidgets;
84    QWidgetList myWebWhitelistWidgets;
85    QWidgetList myProxyWidgets;
86    QWidgetList myProxyAuthWidgets;
87    QWidgetList mySchedWidgets;
88    QWidgetList myBlockWidgets;
89    QWidgetList myUnsupportedWhenRemote;
90
91    int myBlocklistHttpTag;
92    QHttp * myBlocklistHttp;
93    QMessageBox * myBlocklistDialog;
94};
95
96#endif // QTR_PREFS_DIALOG_H
Note: See TracBrowser for help on using the repository browser.