comparison ui/mainwindow.h @ 389:3be838c3e4d8

Handle installation success. Save / load last installed list. This also adds a feature that you can specifiy the download resource when release build is not set so that you can update a list without modifying the server data.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 15 Apr 2014 19:05:49 +0200
parents 9e38a4bcd44e
children 17e1c8f37d72
comparison
equal deleted inserted replaced
388:a507e5f1b999 389:3be838c3e4d8
41 41
42 enum CurrentState { 42 enum CurrentState {
43 BeforeDownload, 43 BeforeDownload,
44 NewListAvailable, 44 NewListAvailable,
45 NewSoftwareAvailable, 45 NewSoftwareAvailable,
46 TransferError 46 TransferError,
47 NothingChanged
47 }; 48 };
48 CurrentState getState() {return mCurState;} 49 CurrentState getState() {return mCurState;}
49 void setState(CurrentState state) {mCurState = state;} 50 void setState(CurrentState state) {mCurState = state;}
50 51
51 private slots: 52 private slots:
62 void showHelp(); 63 void showHelp();
63 void showAbout(); 64 void showAbout();
64 void showDetails(QListWidgetItem*); 65 void showDetails(QListWidgetItem*);
65 void resizeButtons(); 66 void resizeButtons();
66 void installerError(const QString& errMsg); 67 void installerError(const QString& errMsg);
68 void installerSuccess();
67 void installCerts(); 69 void installCerts();
68 70
69 /** @brief saves the currently unselected certificates 71 /** @brief saves the currently unselected certificates
70 * 72 *
71 * This creates / updates a qsettings section that 73 * This creates / updates a qsettings section that
91 /** @brief check the integrity of available files. 93 /** @brief check the integrity of available files.
92 * 94 *
93 * Do not use this as a trust check as this only works on 95 * Do not use this as a trust check as this only works on
94 * FileNames where the underlying files can change. This 96 * FileNames where the underlying files can change. This
95 * is just meant to check if the downloaded data was somehow 97 * is just meant to check if the downloaded data was somehow
96 * removed or corrupted. 98 * removed or corrupted. It also initializes mListToInstall
97 * 99 * and mInstalledList.
98 */ 100 */
99 void verifyAvailableData(); 101 void verifyAvailableData();
100 void createTrayIcon(); 102 void createTrayIcon();
101 void createActions(); 103 void createActions();
102 void createMenuBar(); 104 void createMenuBar();
120 CurrentState mCurState; 122 CurrentState mCurState;
121 QMenuBar *mMenuBar; 123 QMenuBar *mMenuBar;
122 124
123 /* The current list that should be installed */ 125 /* The current list that should be installed */
124 CertificateList mListToInstall; 126 CertificateList mListToInstall;
127 /* The last list that we installed */
128 CertificateList mInstalledList;
125 /* Previously made "unselect" choices in the form of 129 /* Previously made "unselect" choices in the form of
126 * base64lines with I:/R: prefix */ 130 * base64lines with I:/R: prefix */
127 QStringList mPreviouslyUnselected; 131 QStringList mPreviouslyUnselected;
128 132
129 QListWidget *mCertListWidget; 133 QListWidget *mCertListWidget;

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