Vidalia 0.3.1
UpdatesAvailableDialog.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 UpdatesAvailableDialog.h
13** \brief Displays a list of available updates and details, such as release
14** notes. The user can choose to either install the updates now or later, or
15** skip the updates entirely.
16*/
17
18#ifndef _UpdatesAvailableDialog_H
19#define _UpdatesAvailableDialog_H
20
21#include "ui_UpdatesAvailableDialog.h"
22#include "PackageInfo.h"
23
24#include <QDialog>
25#include <QShowEvent>
26#include <QTreeWidgetItem>
27
28
29class UpdatesAvailableDialog : public QDialog
30{
31 Q_OBJECT
32
33public:
37 };
38
39 /** Constructor. */
40 UpdatesAvailableDialog(const PackageList &packageList, QWidget *parent = 0);
41
42protected:
43 /** Called when the dialog receives a QShowEvent. This simply adjusts
44 * the column widths to something close to sane and forwards the event
45 * to the parent.
46 */
47 virtual void showEvent(QShowEvent *e);
48
49private slots:
50 /** Called when the user selects a different package in the list. The widget
51 * displaying details on the selected package will be updated.
52 */
53 void currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
54
55 /** Called when the user opts to install the displayed software updates
56 * immediately.
57 */
58 void installUpdatesNow();
59
60 /** Called when the user opts to install the display software updates at
61 * a later time.
62 */
64
65private:
66 /** Populates the table of available updates with package information
67 * from <b>packageList</b>.
68 */
69 void loadPackagesTable(const PackageList &packageList);
70
71 Ui::UpdatesAvailableDialog ui; /**< Qt Designer generated object. */
72};
73
74#endif
75
QList< PackageInfo > PackageList
Definition: PackageInfo.h:93
UpdatesAvailableDialog(const PackageList &packageList, QWidget *parent=0)
void currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous)
void loadPackagesTable(const PackageList &packageList)
Ui::UpdatesAvailableDialog ui
virtual void showEvent(QShowEvent *e)