Vidalia 0.3.1
ControlPasswordInputDialog.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 ControlPasswordInputDialog.h
13** \brief Prompts the user to enter their control port password, and gives
14** them the option to save or attempt to reset it.
15*/
16
17#ifndef _CONTROLPASSWORDINPUTDIALOG_H
18#define _CONTROLPASSWORDINPUTDIALOG_H
19
20#include "ui_ControlPasswordInputDialog.h"
21
22#include <QDialog>
23#include <QString>
24
25
26class ControlPasswordInputDialog : public QDialog
27{
28 Q_OBJECT
29
30public:
31 /** Default constructor.
32 */
33 ControlPasswordInputDialog(QWidget *parent = 0);
34
35 /** If <b>enabled</b> is true, then the "Reset" button will be visible on
36 * the password input dialog. Otherwise, the "Reset" button will be hidden.
37 */
38 void setResetEnabled(bool enabled);
39
40signals:
41 /** Emitted when the user clicks on the "Help" dialog button.
42 */
43 void helpRequested(const QString &topic);
44
45protected slots:
46 /** Called when one of the QDialogButtonBox's buttons is clicked. The dialog
47 * is closed if <b>button</b> is the "Ok", "Cancel", or "Reset" button, and
48 * the clicked button's QDialogButtonBox::StandardButton enum value is
49 * returned as the dialog's result code.
50 */
51 void clicked(QAbstractButton *button);
52
53protected:
54 /** Adjusts the size of the input dialog when it is displayed. */
55 virtual void setVisible(bool visible);
56
57private:
58 Ui::ControlPasswordInputDialog ui; /**< Qt Designer generated object. */
59};
60
61#endif
62
void helpRequested(const QString &topic)
Ui::ControlPasswordInputDialog ui
void clicked(QAbstractButton *button)
virtual void setVisible(bool visible)