Vidalia  0.2.21
NetworkPage.h
Go to the documentation of this file.
1 /*
2 ** This file is part of Vidalia, and is subject to the license terms in the
3 ** LICENSE file, found in the top level directory of this distribution. If you
4 ** did not receive the LICENSE file with this file, you may obtain it from the
5 ** Vidalia source package distributed by the Vidalia Project at
6 ** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7 ** including this file, may be copied, modified, propagated, or distributed
8 ** except according to the terms described in the LICENSE file.
9 */
10 
11 /*
12 ** \file NetworkPage.h
13 ** \brief Network and firewall configuration options
14 */
15 
16 #ifndef _NETWORKPAGE_H
17 #define _NETWORKPAGE_H
18 
19 #include "ui_NetworkPage.h"
20 #include "ConfigPage.h"
21 #include "Vidalia.h"
22 
23 #include <QPoint>
24 
25 
26 class NetworkPage : public ConfigPage
27 {
28  Q_OBJECT
29 
30 public:
31  /** Default Constructor */
32  NetworkPage(QWidget *parent = 0);
33 
34  /** Saves the changes on this page */
35  bool save(QString &errmsg);
36  /** Loads the settings for this page */
37  void load();
38 
39  /** Applies the network configuration settings to Tor. Returns true if the
40  * settings were applied successfully. Otherwise, <b>errmsg</b> is set and
41  * false is returned. */
42  bool apply(QString &errmsg);
43  /** Reverts the server configuration settings to their values at the last
44  * time they were successfully applied to Tor. */
45  void revert();
46  /** Returns true if the user has changed their server settings since the
47  * last time they were applied to Tor. */
48  bool changedSinceLastApply();
49  /** Called when the user changes the UI translation. */
50  virtual void retranslateUi();
51 
52 private slots:
53  /** Adds a bridge to the bridge list box. */
54  void addBridge();
55  /** Removes one or more selected bridges from the bridge list box. */
56  void removeBridge();
57  /** Copies all selected bridges to the clipboard. */
59  /** Called when the user right-clicks on a bridge and displays a context
60  * menu. */
61  void bridgeContextMenuRequested(const QPoint &pos);
62  /** Called when the user changes which bridges they have selected. */
64  /** Called when a link in a label is clicked. <b>url</b> is the target of
65  * the clicked link.*/
66  void onLinkActivated(const QString &url);
67 
68  /** Disable proxy username and password fields when the user wants to use
69  * a SOCKS 4 proxy. */
70  void proxyTypeChanged(int selection);
71 
72 private:
73  /** Qt Designer generated object */
74  Ui::NetworkPage ui;
75 };
76 
77 #endif
78