annotate ui/mainwindow.h @ 1380:77c9e35657ab

(issue83) Remove testversion note
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 15 Jan 2015 15:28:40 +0100
parents 00fcb9c4d16b
children
rev   line source
404
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 389
diff changeset
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 389
diff changeset
2 * Software engineering by Intevation GmbH
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 389
diff changeset
3 *
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 389
diff changeset
4 * This file is Free Software under the GNU GPL (v>=2)
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 389
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY!
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 389
diff changeset
6 * See LICENSE.txt for details.
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 389
diff changeset
7 */
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
8 #ifndef MAINWINDOW_H
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
9 #define MAINWINDOW_H
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
10
71
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
11 /**
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
12 * @file mainwindow.h
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
13 * @brief Main UI controller
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
14 */
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
15
153
252ffe6e27fd Changed type of MainWindow from QDialog to QMainWindow.
Raimund Renkert <rrenkert@intevation.de>
parents: 71
diff changeset
16 #include <QMainWindow>
16
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
17 #include <QSettings>
155
c0fdb8d336cf Added menubar/menu and method stubs to mainwindow.
Raimund Renkert <rrenkert@intevation.de>
parents: 153
diff changeset
18 #include <QMenuBar>
189
5f0d45ca9de4 Show certificates in the list view and details in the textfield.
Raimund Renkert <rrenkert@intevation.de>
parents: 187
diff changeset
19 #include <QListWidget>
5f0d45ca9de4 Show certificates in the list view and details in the textfield.
Raimund Renkert <rrenkert@intevation.de>
parents: 187
diff changeset
20 #include <QTextEdit>
271
1ae15ea73850 Some GUI desing and layout changes.
Raimund Renkert <rrenkert@intevation.de>
parents: 212
diff changeset
21 #include <QPushButton>
432
16b5cd858571 Updated layout and certificate details in trustbridge installer.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
22 #include <QLabel>
16b5cd858571 Updated layout and certificate details in trustbridge installer.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
23 #include <QCheckBox>
584
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
24 #include <QScrollArea>
1252
9a482182f80f (issue54) Monitor update installation and restart afterwards on Linux
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1231
diff changeset
25 #include <QProcess>
1371
23df332b2a4c (issue179) Read install signature timestamp from config
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1339
diff changeset
26 #include <QDateTime>
16
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
27
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
28 #include "downloader.h"
71
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
29 #include "certificatelist.h"
584
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
30 #include "certificatelistwidget.h"
722
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 718
diff changeset
31 #include "textoverlaybutton.h"
871
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 754
diff changeset
32 #include "trayicon.h"
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
33 class QMenu;
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
34 class QAction;
19
9af6198deb8e Add timed trigger for the message
Andre Heinecke <aheinecke@intevation.de>
parents: 17
diff changeset
35 class QTimer;
693
0fc1a20adaff (Issue 27) Change Quit button text depending on changes or no changes.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 690
diff changeset
36 class QPushButton;
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
37
432
16b5cd858571 Updated layout and certificate details in trustbridge installer.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
38
1255
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
39 /** @brief Main UI controller
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
40 *
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
41 * The MainWindow controls the logic of the Application
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
42 * it is the central piece that controls the state and starts
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
43 * updates / certificate installation.
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
44 * It also controls the UI widgets for the various certificate lists.
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
45 */
153
252ffe6e27fd Changed type of MainWindow from QDialog to QMainWindow.
Raimund Renkert <rrenkert@intevation.de>
parents: 71
diff changeset
46 class MainWindow : public QMainWindow
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
47 {
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
48 Q_OBJECT
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
49
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
50 public:
365
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
51 /**@brief create a new Main Window object
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
52 *
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
53 * In tray mode this window is not shown and only shows
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
54 * notification messages if there is some actionable state
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
55 * reached. If tray mode is true it also exits after
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
56 * an update check.
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
57 *
1371
23df332b2a4c (issue179) Read install signature timestamp from config
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1339
diff changeset
58 * The sigDt parameter is used to determine if a software
23df332b2a4c (issue179) Read install signature timestamp from config
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1339
diff changeset
59 * update should be installed.
23df332b2a4c (issue179) Read install signature timestamp from config
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1339
diff changeset
60 *
365
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
61 * @param[in] trayMode set the tray mode
1371
23df332b2a4c (issue179) Read install signature timestamp from config
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1339
diff changeset
62 * @param[in] sigDt the datetime when the binary was signed.
365
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
63 * */
1371
23df332b2a4c (issue179) Read install signature timestamp from config
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1339
diff changeset
64 MainWindow(bool trayMode, const QDateTime& sigDt = QDateTime());
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
65
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
66 /**@brief set the current message to be shown
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
67 *
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
68 * The message will be shown at intervals in the system tray
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
69 * or as a messagebox if no stystemtray is available.
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
70 *
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
71 * @param [in] message The message to show.
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
72 */
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
73 void setMessage(const QString message) {mCurMessage = message;}
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
74 /**@brief accessor for the current message.
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
75 *
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
76 * @returns the currently shown message.*/
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
77 QString getMessage() {return mCurMessage;}
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
78
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
79 /**
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
80 * @enum CurrentState
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
81 * @brief The internal state of the application
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
82 */
16
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
83 enum CurrentState {
1255
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
84 /*! A new certificate list is available. */
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
85 NewListAvailable,
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
86 /*! A new Software is avaialable. */
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
87 NewSoftwareAvailable,
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
88 /*! Download in progress. */
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
89 DownloadingSW,
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
90 /*! An error happened on the last connection. */
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
91 TransferError,
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
92 /*! Update was susccessfull but nothing new is available. */
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
93 NothingChanged
16
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
94 };
1227
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
95
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
96 /**
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
97 * @enum LongTimeErrors
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
98 * @brief Errors that should be stored and only shown after some time has elapsed.
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
99 */
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
100 enum LongTimeErrors {
1255
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
101 /*! The downloaded Software was invalid. */
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
102 lteInvalidSoftware,
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
103 /*! The SSL certificate of the download server was wrong. */
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
104 lteInvalidCertificate,
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
105 /*! The downloaded Certificate List was invalid. */
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
106 lteInvalidList,
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1252
diff changeset
107 /*! No connection to the server could be established. */
1227
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
108 lteNoConnection
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
109 };
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
110
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
111 /** @brief accessor for the current state. */
16
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
112 CurrentState getState() {return mCurState;}
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
113 /** @brief set the current state. */
16
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
114 void setState(CurrentState state) {mCurState = state;}
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
115
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
116 private slots:
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
117 /** @brief Shows the current message to the user. */
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
118 void showMessage();
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
119 /** @brief User has clicked on the message notification. */
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
120 void iconActivated(QSystemTrayIcon::ActivationReason reason);
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
121 /** @brief Check if new updates are available.
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
122 *
1373
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
123 * Wether the software should be downloaded or not is determined by
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
124 * the mDownloadSWAccepted value.
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
125 */
1373
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
126 void checkUpdates();
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
127 /**@brief parse a new certificate list and update the UI*/
16
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
128 void handleNewList(const QString& fileName, const QDateTime& modDate);
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
129 /**@brief handle a Software update, update state and inform the user */
16
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
130 void handleNewSW(const QString& fileName, const QDateTime& modDate);
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
131 /**@brief an error occured while downloading.*/
45
c6125d73faf4 Move SSLConnection into it's own class
Andre Heinecke <aheinecke@intevation.de>
parents: 19
diff changeset
132 void downloaderError(const QString &message, SSLConnection::ErrorCode error);
71
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
133 /** @brief Trigger the appropiate action depending on the state */
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
134 void messageClicked();
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
135 /** @brief An error occured during certificate installation .*/
365
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
136 void installerError(const QString& errMsg);
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
137 /** @brief Certificate installation was successful. */
389
3be838c3e4d8 Handle installation success. Save / load last installed list.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 375
diff changeset
138 void installerSuccess();
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
139 /** @brief Install the currently selected certificates */
365
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
140 void installCerts();
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
141 /** @brief Handle a toggle action in the manual certificate list */
640
626507197360 Updated mainwindow and handle certificate lists.
Raimund Renkert <rrenkert@intevation.de>
parents: 628
diff changeset
142 void toggleInManual(bool state, const Certificate &cert);
1228
206eb5006c56 Improve mainwindow documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1227
diff changeset
143 /** @brief Remove a certificate from the manual list. */
640
626507197360 Updated mainwindow and handle certificate lists.
Raimund Renkert <rrenkert@intevation.de>
parents: 628
diff changeset
144 void removeFromManual(bool state, const Certificate &cert);
1252
9a482182f80f (issue54) Monitor update installation and restart afterwards on Linux
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1231
diff changeset
145 /** @brief Restart the application */
9a482182f80f (issue54) Monitor update installation and restart afterwards on Linux
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1231
diff changeset
146 void updaterFinished(int exitCode, QProcess::ExitStatus status);
551
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
147
584
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
148 void togglePages(int button);
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
149 void toggleUpdatesNew();
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
150 void toggleUpdatesRemove();
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
151 void toggleUpdatesManual();
716
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
152
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
153 /** Reflect change list states in the UI
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
154 *
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
155 * This slot should be called each time the contents or selection
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
156 * state of one of the certificate lists change to update the
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
157 * UI elements accordingly.
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
158 *
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
159 * @param[in] selected unused. */
628
3a9c0f38bbad Made certificate lists member of mainwindow and added some temporary debug msgs.
Raimund Renkert <rrenkert@intevation.de>
parents: 584
diff changeset
160 void listChanged(int selected);
584
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
161
609
292c590ba9cb Add warning dialog for running firefox and tunderbird processes
Andre Heinecke <andre.heinecke@intevation.de>
parents: 594
diff changeset
162 /** @brief check for running software that needs to close before installing
292c590ba9cb Add warning dialog for running firefox and tunderbird processes
Andre Heinecke <andre.heinecke@intevation.de>
parents: 594
diff changeset
163 *
292c590ba9cb Add warning dialog for running firefox and tunderbird processes
Andre Heinecke <andre.heinecke@intevation.de>
parents: 594
diff changeset
164 * This function calls installCerts if no software is running otherwise
292c590ba9cb Add warning dialog for running firefox and tunderbird processes
Andre Heinecke <andre.heinecke@intevation.de>
parents: 594
diff changeset
165 * it informs the user about the software that still needs to be closed.
292c590ba9cb Add warning dialog for running firefox and tunderbird processes
Andre Heinecke <andre.heinecke@intevation.de>
parents: 594
diff changeset
166 */
292c590ba9cb Add warning dialog for running firefox and tunderbird processes
Andre Heinecke <andre.heinecke@intevation.de>
parents: 594
diff changeset
167 void checkAndInstallCerts();
292c590ba9cb Add warning dialog for running firefox and tunderbird processes
Andre Heinecke <andre.heinecke@intevation.de>
parents: 594
diff changeset
168
551
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
169 /** @brief get the last modified date on the download server for
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
170 * the current version.
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
171 *
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
172 * After the initial installation this function can be used to
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
173 * determine the DateTime that corresponds to the currently installed
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
174 * version on the download server.
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
175 *
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
176 * Calls setLastModifiedSWDate on success. Otherwise downloaderError
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
177 * is triggered. */
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
178 void getLastModForCurrentVersion();
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
179
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
180 /** @brief set the last modified software date/time
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
181 *
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
182 * The last modifiedSWDate is the corresponding last modified
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
183 * timestamp from the download server vor the currently installed version.
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
184 */
15121735805e Start implementation of software update installation
Andre Heinecke <aheinecke@intevation.de>
parents: 531
diff changeset
185 void setLastModifiedSWDate(const QDateTime &date);
486
fa56a9403939 Lookup the last modified date for software installer after first installation.
Raimund Renkert <rrenkert@intevation.de>
parents: 481
diff changeset
186
372
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
187 /** @brief saves the currently unselected certificates
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
188 *
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
189 * This creates / updates a qsettings section that
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
190 * [unselected] that contains the certificates that
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
191 * were unselected previously.
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
192 *
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
193 * Unselected are certificates that are unchecked
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
194 * in the certListWidget
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
195 *
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
196 * Returns false on error.
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
197 */
640
626507197360 Updated mainwindow and handle certificate lists.
Raimund Renkert <rrenkert@intevation.de>
parents: 628
diff changeset
198 bool saveUnselectedCertificates(QStringList unselected);
372
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
199
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
200 /** @brief loads previously unselected certificates from settings
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
201 *
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
202 * The certificates are strored in the list mPreviouslyUnselected.
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
203 *
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
204 * On error mPreviouslyUnselected is empty after this call.
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
205 */
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
206 void loadUnselectedCertificates();
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
207
708
bd48fae793b6 (Issue25) Log update check success, change header labels.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 693
diff changeset
208 /** @brief log / store a successful downloader run
bd48fae793b6 (Issue25) Log update check success, change header labels.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 693
diff changeset
209 *
bd48fae793b6 (Issue25) Log update check success, change header labels.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 693
diff changeset
210 * A downloader run is successful if the finished signal
bd48fae793b6 (Issue25) Log update check success, change header labels.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 693
diff changeset
211 * is emited and the state is not TransferError
bd48fae793b6 (Issue25) Log update check success, change header labels.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 693
diff changeset
212 */
bd48fae793b6 (Issue25) Log update check success, change header labels.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 693
diff changeset
213 void updateCheckSuccess();
bd48fae793b6 (Issue25) Log update check success, change header labels.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 693
diff changeset
214
940
7c89c5dc2200 (issue89) Add ui to open help in browser
Andre Heinecke <andre.heinecke@intevation.de>
parents: 871
diff changeset
215 /** @brief open the manual in an external browser window
7c89c5dc2200 (issue89) Add ui to open help in browser
Andre Heinecke <andre.heinecke@intevation.de>
parents: 871
diff changeset
216 */
7c89c5dc2200 (issue89) Add ui to open help in browser
Andre Heinecke <andre.heinecke@intevation.de>
parents: 871
diff changeset
217 void showHelp();
7c89c5dc2200 (issue89) Add ui to open help in browser
Andre Heinecke <andre.heinecke@intevation.de>
parents: 871
diff changeset
218
956
879a634d0a40 (issue41) Add proxy support
Andre Heinecke <andre.heinecke@intevation.de>
parents: 940
diff changeset
219 /** @brief open the proxy settings dialog */
879a634d0a40 (issue41) Add proxy support
Andre Heinecke <andre.heinecke@intevation.de>
parents: 940
diff changeset
220 void showProxySettings();
879a634d0a40 (issue41) Add proxy support
Andre Heinecke <andre.heinecke@intevation.de>
parents: 940
diff changeset
221
686
a2e94e88d304 (Issue27) Close the app on close event.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 654
diff changeset
222 protected:
690
e4abb41484a0 (issue 27)Only close if no new list is available
Andre Heinecke <andre.heinecke@intevation.de>
parents: 686
diff changeset
223 virtual void closeEvent(QCloseEvent *event);
686
a2e94e88d304 (Issue27) Close the app on close event.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 654
diff changeset
224
559
dd8a295d5b4d Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents: 551
diff changeset
225 protected slots:
dd8a295d5b4d Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents: 551
diff changeset
226 /** @brief cleanup and close the main window
dd8a295d5b4d Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents: 551
diff changeset
227 *
dd8a295d5b4d Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents: 551
diff changeset
228 * Perform a clean exit (saving state etc.) and close
dd8a295d5b4d Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents: 551
diff changeset
229 * the application */
563
aee3eb10bbba Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents: 559
diff changeset
230 virtual void closeApp();
447
b1b14daf2116 Save the select state of certificate items when closing the app.
Raimund Renkert <rrenkert@intevation.de>
parents: 445
diff changeset
231
559
dd8a295d5b4d Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents: 551
diff changeset
232 /* @brief Execute the file fileName to install the softwareupdate.
dd8a295d5b4d Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents: 551
diff changeset
233 *
dd8a295d5b4d Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents: 551
diff changeset
234 * Once the installer process is started this function terminates
dd8a295d5b4d Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents: 551
diff changeset
235 * the application. */
dd8a295d5b4d Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents: 551
diff changeset
236 void installNewSW(const QString& fileName, const QDateTime& modDate);
dd8a295d5b4d Add framework for mainwindow testing
Andre Heinecke <aheinecke@intevation.de>
parents: 551
diff changeset
237
1061
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
238 /** @brief show an error message
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
239 *
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
240 * This is a wrapper around QMessageBox to allow for central
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
241 * styling of error messages.
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
242 */
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
243 void showErrorMessage(const QString &msg);
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
244
722
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 718
diff changeset
245 signals:
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 718
diff changeset
246 /** @brief emits the changecount as a string when it changes */
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 718
diff changeset
247 void changesChanged(const QString& cnt);
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 718
diff changeset
248
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
249 private:
1227
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
250 /** @brief Get a installer file name that can be shown to a user.
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
251 *
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
252 * This copys the real file to a temporary location with a user
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
253 * visible localized file name. Does error Handling.
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
254 *
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
255 * @param [in] realFileName The original file name.
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
256 *
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
257 * @returns a null string in case on errors. The new filename
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
258 * otherwise.
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
259 */
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
260 QString getPrettyInstallerName(QString realFileName);
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
261
716
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
262 /** @brief the combined number of changes made in all lists */
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
263 int changeCount();
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
264
722
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 718
diff changeset
265 /** @brief use this to set the change count */
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 718
diff changeset
266 void setChangeCount(int cnt);
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 718
diff changeset
267
587
02a89710a7cd Split up list and software verification and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 563
diff changeset
268 /** @brief check the integrity of available certificate lists.
71
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
269 *
594
c944de9900de Add installation parameters with correct quoting
Andre Heinecke <aheinecke@intevation.de>
parents: 587
diff changeset
270 * Note: Do not use this as a local trust check as this only works on
71
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
271 * FileNames where the underlying files can change. This
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
272 * is just meant to check if the downloaded data was somehow
389
3be838c3e4d8 Handle installation success. Save / load last installed list.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 375
diff changeset
273 * removed or corrupted. It also initializes mListToInstall
3be838c3e4d8 Handle installation success. Save / load last installed list.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 375
diff changeset
274 * and mInstalledList.
71
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
275 */
587
02a89710a7cd Split up list and software verification and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 563
diff changeset
276 void verifyListData();
02a89710a7cd Split up list and software verification and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 563
diff changeset
277
02a89710a7cd Split up list and software verification and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 563
diff changeset
278 /** @brief check the integrity of available software updates.
02a89710a7cd Split up list and software verification and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 563
diff changeset
279 *
594
c944de9900de Add installation parameters with correct quoting
Andre Heinecke <aheinecke@intevation.de>
parents: 587
diff changeset
280 * Note: Do not use this as a local trust check as this only works on
587
02a89710a7cd Split up list and software verification and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 563
diff changeset
281 * FileNames where the underlying files can change. This
02a89710a7cd Split up list and software verification and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 563
diff changeset
282 * is just meant to check if the downloaded data was somehow
02a89710a7cd Split up list and software verification and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 563
diff changeset
283 * removed or corrupted.
02a89710a7cd Split up list and software verification and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 563
diff changeset
284 */
02a89710a7cd Split up list and software verification and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 563
diff changeset
285 void verifySWData();
02a89710a7cd Split up list and software verification and use it
Andre Heinecke <aheinecke@intevation.de>
parents: 563
diff changeset
286
1227
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
287 /** @brief note an long time error in the settings and show a message.
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
288 *
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
289 * Saves a software verify error in the settings and notifies the
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
290 * user if necessary.
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
291 *
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
292 * @param [in] lte The error to handle.
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
293 * @param [in] reset weather or not the error count should be reset.
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
294 *
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
295 **/
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
296 void handleLTE(LongTimeErrors lte, bool reset = false);
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
297
1373
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
298 /** @brief schedule an update check retry or close the application.
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
299 *
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
300 * An update check retry is scheduled base on getNextUpdateInterval.
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
301 * If getNextUpdateInterval returns a negative value the application
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
302 * is closed if the parameter close is true.
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
303 *
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
304 * This function also increases the failed connection count.
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
305 */
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
306 void scheduleFailureRetryOrClose(bool close);
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
307
1227
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
308 /** @brief note a verify error in the settings and show a message
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
309 *
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
310 * Saves a software verify error in the settings and notifies the
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
311 * user if necessary.*/
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
312 void swVerifyError();
a1e990947172 (issue38) Add long time error handling.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1109
diff changeset
313
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
314 void createTrayIcon();
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
315 void createActions();
743
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
316 void loadCertificateList();
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
317
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
318 /** @brief UI setup */
739
5f0fca113ff4 Factor out Info Panel creation.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 722
diff changeset
319 void setupGUI();
743
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
320
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
321 /** @brief create and set up the info widget (accessible via button panel) */
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
322 QWidget *createInfoWidget();
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
323 /** @brief create and set up the updates widget (accessible via button panel) */
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
324 QWidget *createUpdatesWidget();
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
325 /** @brief create and set up the certifcates to install widget
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
326 * (accessible via button panel) */
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
327 QWidget *createInstallWidget();
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
328 /** @brief create and set up the certifcates to remove widget
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
329 * (accessible via button panel) */
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
330 QWidget *createRemoveWidget();
2
cf88cc432b9d Add quit action
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
331
1061
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
332 /** @brief true if the software is running in tray mode*/
365
75f7288ad67b Switch from listupdatedialog to installwrapper. Minor UI improvements
Andre Heinecke <aheinecke@intevation.de>
parents: 271
diff changeset
333 const bool mTrayMode;
1061
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
334
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
335 /** @brief The currently shown message */
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
336 QString mCurMessage;
1061
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
337 /** @brief The version the Software thinks is installed */
16
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
338 QString mInstalledSWVersion;
1061
db831a204a6b (issue38) Show error message as messagebox if the window is visible
Andre Heinecke <andre.heinecke@intevation.de>
parents: 956
diff changeset
339 /** @brief The certificate list the Software thinks is installed */
16
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
340 QString mInstalledListVersion;
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
341
17
c12825a651ed Read out content-length and use this to skip existing files
Andre Heinecke <aheinecke@intevation.de>
parents: 16
diff changeset
342 QSettings mSettings;
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
343
871
4efd6378c001 (issue51) Add fallback in case systemtray is unavailable.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 754
diff changeset
344 TrayIcon *mTrayIcon;
19
9af6198deb8e Add timed trigger for the message
Andre Heinecke <aheinecke@intevation.de>
parents: 17
diff changeset
345 QTimer *mMessageTimer;
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
346 QMenu *mTrayMenu;
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
347 QAction *mCheckUpdates;
2
cf88cc432b9d Add quit action
Andre Heinecke <aheinecke@intevation.de>
parents: 0
diff changeset
348 QAction *mQuitAction;
16
225a5ec20dad Use QSettings and manage downloader from mainwindow.
Andre Heinecke <aheinecke@intevation.de>
parents: 2
diff changeset
349 CurrentState mCurState;
155
c0fdb8d336cf Added menubar/menu and method stubs to mainwindow.
Raimund Renkert <rrenkert@intevation.de>
parents: 153
diff changeset
350 QMenuBar *mMenuBar;
693
0fc1a20adaff (Issue 27) Change Quit button text depending on changes or no changes.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 690
diff changeset
351 QPushButton *mQuitButton;
71
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
352
372
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
353 /* The current list that should be installed */
71
f22a99f7cb69 Add certificatelist to install as member. Look for updates on startup
Andre Heinecke <aheinecke@intevation.de>
parents: 45
diff changeset
354 CertificateList mListToInstall;
389
3be838c3e4d8 Handle installation success. Save / load last installed list.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 375
diff changeset
355 /* The last list that we installed */
3be838c3e4d8 Handle installation success. Save / load last installed list.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 375
diff changeset
356 CertificateList mInstalledList;
372
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
357 /* Previously made "unselect" choices in the form of
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
358 * base64lines with I:/R: prefix */
6cc124e79066 Add save/load unselected and add role enumerator
Andre Heinecke <andre.heinecke@intevation.de>
parents: 365
diff changeset
359 QStringList mPreviouslyUnselected;
189
5f0d45ca9de4 Show certificates in the list view and details in the textfield.
Raimund Renkert <rrenkert@intevation.de>
parents: 187
diff changeset
360
456
37a97621b466 Added label for current and updated list date.
Raimund Renkert <rrenkert@intevation.de>
parents: 447
diff changeset
361 QLabel *mCurrentListDate;
37a97621b466 Added label for current and updated list date.
Raimund Renkert <rrenkert@intevation.de>
parents: 447
diff changeset
362 QLabel *mNewListDate;
37a97621b466 Added label for current and updated list date.
Raimund Renkert <rrenkert@intevation.de>
parents: 447
diff changeset
363
584
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
364 QButtonGroup *mButtonGroup;
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
365 QWidget *mUpdatesWidget;
743
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
366 QWidget *mInstallWidget;
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
367 QWidget *mRemoveWidget;
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
368 QWidget *mInfoWidget;
584
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
369
628
3a9c0f38bbad Made certificate lists member of mainwindow and added some temporary debug msgs.
Raimund Renkert <rrenkert@intevation.de>
parents: 584
diff changeset
370 QLabel *mUpdatesHeader;
1098
75a5bfe0525e (issue111) Rework Updates ui
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1061
diff changeset
371 QLabel *mUpdatesDetailsHeader;
75a5bfe0525e (issue111) Rework Updates ui
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1061
diff changeset
372 QLabel *mCertListVersion;
75a5bfe0525e (issue111) Rework Updates ui
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1061
diff changeset
373 QLabel *mCertListVersionContents;
708
bd48fae793b6 (Issue25) Log update check success, change header labels.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 693
diff changeset
374 QLabel *mLastUpdateCheck;
754
27043d74dc90 (Issue25) Align header contents in their own column.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 743
diff changeset
375 QLabel *mLastUpdateCheckContents;
628
3a9c0f38bbad Made certificate lists member of mainwindow and added some temporary debug msgs.
Raimund Renkert <rrenkert@intevation.de>
parents: 584
diff changeset
376 QLabel *mUpdatesNewCertificates;
3a9c0f38bbad Made certificate lists member of mainwindow and added some temporary debug msgs.
Raimund Renkert <rrenkert@intevation.de>
parents: 584
diff changeset
377 QLabel *mUpdatesRemoveCertificates;
3a9c0f38bbad Made certificate lists member of mainwindow and added some temporary debug msgs.
Raimund Renkert <rrenkert@intevation.de>
parents: 584
diff changeset
378 QLabel *mUpdatesManualCertificates;
718
e7a070e64b80 (Issue26) Make updates tip and install button depend on changes
Andre Heinecke <andre.heinecke@intevation.de>
parents: 716
diff changeset
379 QLabel *mUpdatesTip;
628
3a9c0f38bbad Made certificate lists member of mainwindow and added some temporary debug msgs.
Raimund Renkert <rrenkert@intevation.de>
parents: 584
diff changeset
380
743
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
381 /* These are a bit of a pattern break, they should
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
382 * be accessed over the according page widgets.
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
383 *
a467204a35f5 Rework User Interface.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 739
diff changeset
384 * They are initialized in the create*widget functions.*/
584
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
385 CertificateListWidget *mUpdatesNew;
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
386 CertificateListWidget *mUpdatesRemove;
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
387 CertificateListWidget *mUpdatesManual;
ebfe1128ee97 Started trustbridge mainwindow refactoring.
Raimund Renkert <rrenkert@intevation.de>
parents: 563
diff changeset
388 CertificateListWidget *mInstallList;
628
3a9c0f38bbad Made certificate lists member of mainwindow and added some temporary debug msgs.
Raimund Renkert <rrenkert@intevation.de>
parents: 584
diff changeset
389 CertificateListWidget *mRemoveList;
652
f65503c1833b Updated mainwindow layout and removed obsolete code.
Raimund Renkert <rrenkert@intevation.de>
parents: 641
diff changeset
390
f65503c1833b Updated mainwindow layout and removed obsolete code.
Raimund Renkert <rrenkert@intevation.de>
parents: 641
diff changeset
391 QPushButton *mUpdatesDetailsNew;
f65503c1833b Updated mainwindow layout and removed obsolete code.
Raimund Renkert <rrenkert@intevation.de>
parents: 641
diff changeset
392 QPushButton *mUpdatesDetailsRemove;
f65503c1833b Updated mainwindow layout and removed obsolete code.
Raimund Renkert <rrenkert@intevation.de>
parents: 641
diff changeset
393 QPushButton *mUpdatesDetailsManual;
716
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
394
718
e7a070e64b80 (Issue26) Make updates tip and install button depend on changes
Andre Heinecke <andre.heinecke@intevation.de>
parents: 716
diff changeset
395 QPushButton *mInstallButton;
716
929c3db85eb7 Add central place to obtain current change count.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 708
diff changeset
396 int mChangeCount;
1109
6594e8e63a25 (issue115) Add tooltips and fix manual changes handling
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1098
diff changeset
397 bool mManualDetailsShown;
1339
64f812a63de6 (issue170) Keep checking for updates in intervals
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1255
diff changeset
398 int mFailedConnections;
1371
23df332b2a4c (issue179) Read install signature timestamp from config
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1339
diff changeset
399 QDateTime mSigDt;
1373
00fcb9c4d16b (issue179) Handle SW verify failures and try to redownload the update
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1371
diff changeset
400 bool mDownloadSWAccepted;
0
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
401 };
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
402
cb0cde2c5eb9 Initial commit. Basically a Hello World with a Tray Icon.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
403 #endif // MAINWINDOW_H

http://wald.intevation.org/projects/trustbridge/