Vidalia 0.3.1
RouterInfoDialog.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 RouterInfoDialog.h
13** \brief Displays detailed information about a particular router
14*/
15
16
17#ifndef _ROUTERINFODIALOG_H
18#define _ROUTERINFODIALOG_H
19
20#include "ui_RouterInfoDialog.h"
21
22#include "RouterStatus.h"
23#include "RouterDescriptor.h"
24
25#include <QDialog>
26
27
28class RouterInfoDialog : public QDialog
29{
30 Q_OBJECT
31
32public:
33 /** Default constructor.
34 */
35 RouterInfoDialog(QWidget *parent = 0);
36
37 /** Populates the dialog's UI with information parsed from the router
38 * descriptor <b>desc</b> and the router status information in
39 * <b>status</b>.
40 */
41 void setRouterInfo(const QStringList &desc, const RouterStatus &status);
42
43 /** Sets the geographic location information displayed in the dialog to
44 * <b>location</b>.
45 */
46 void setLocation(const QString &location);
47
48private:
49 /** Adjusts <b>uptime</b> to be the greater of either <b>published</b> or
50 * <b>uptime</b> plus the number of seconds elapsed since <b>published</b>.
51 */
52 quint64 adjustUptime(quint64 uptime, const QDateTime &published);
53
54 Ui::RouterInfoDialog ui;
55};
56
57#endif
58
RouterInfoDialog(QWidget *parent=0)
Ui::RouterInfoDialog ui
void setLocation(const QString &location)
void setRouterInfo(const QStringList &desc, const RouterStatus &status)
quint64 adjustUptime(quint64 uptime, const QDateTime &published)