Skip to content
Newer
Older
100755 157 lines (148 sloc) 4.62 KB
d1f700f Initial checkin
Matt Barringer authored
1 /*
2 * Copyright (c) 2011 Novell, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, contact Novell, Inc.
16 *
17 * To contact Novell about this file by physical or electronic mail,
18 * you may find current contact information at www.novell.com
19 *
20 * Author: Matt Barringer <mbarringer@suse.de>
987a78b Adding David's Author line
Matt Barringer authored
21 * Author: David Williams <redache@googlemail.com>
d1f700f Initial checkin
Matt Barringer authored
22 *
23 */
24
25 #ifndef MAINWINDOW_H
26 #define MAINWINDOW_H
27
28 #include <QMainWindow>
29 #include <QMap>
30 #include <QThread>
31 #include <QSystemTrayIcon>
f2b5157 - If favicon.ico is 404, download the HTML and parse it looking
Matt Barringer authored
32 #include <QSslError>
ef1e0ee Merging in the tabbedinterface branch
Matt Barringer authored
33 #include <QTableView>
34
d1f700f Initial checkin
Matt Barringer authored
35 namespace Ui {
36 class MainWindow;
37 }
38
39 class QListWidgetItem;
40 class QModelIndex;
41 class QMovie;
f2b5157 - If favicon.ico is 404, download the HTML and parse it looking
Matt Barringer authored
42 class QNetworkReply;
d1f700f Initial checkin
Matt Barringer authored
43 class QLabel;
44 class QNetworkAccessManager;
45 class QSpacerItem;
46 class QProgressDialog;
47 class QTimer;
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
48 class SearchTab;
bed63a8 Committing version 0.4 New features:
Matt Barringer authored
49 class QSqlDatabase;
d1f700f Initial checkin
Matt Barringer authored
50 class Backend;
51 class Autodetector;
52 class SqlBugModel;
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
53 class BackendUI;
54 class ToDoListView;
d1f700f Initial checkin
Matt Barringer authored
55
56 class MainWindow : public QMainWindow {
57 Q_OBJECT
58 public:
59 MainWindow(QWidget *parent = 0);
60 ~MainWindow();
61 void closeEvent(QCloseEvent *event);
62
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
63 signals:
64 void reloadFromDatabase();
65 void setShowOptions(bool showMyBugs,
66 bool showMyReports,
67 bool showMyCCs,
68 bool showMonitored);
d1f700f Initial checkin
Matt Barringer authored
69 public slots:
70 void quitEvent();
5d3c9b5 Bugzilla 4.0 is working now
Matt Barringer authored
71 void updateCheckResponse();
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
72 void fieldsChecked();
259c6a2 Continuing work getting 1.0 finished.
Matt Barringer authored
73 void versionChecked(const QString &version, const QString &message);
f2b5157 - If favicon.ico is 404, download the HTML and parse it looking
Matt Barringer authored
74 void handleSslErrors(QNetworkReply *reply,
75 const QList<QSslError> &errors);
d1f700f Initial checkin
Matt Barringer authored
76 void trayActivated(QSystemTrayIcon::ActivationReason reason);
77 void addTrackerTriggered();
fee78ae The changelog is working now
Matt Barringer authored
78 void toggleButtons();
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
79 void showMenu(int tabIndex);
d1f700f Initial checkin
Matt Barringer authored
80 void prefsTriggered();
81 void websiteTriggered();
82 void aboutTriggered();
83 void showActionTriggered();
bed63a8 Committing version 0.4 New features:
Matt Barringer authored
84 void changelogTriggered();
d1f700f Initial checkin
Matt Barringer authored
85 void workOfflineTriggered();
48b7460 Starting to add component tracking
Matt Barringer authored
86 void showEditMonitoredComponents();
d1f700f Initial checkin
Matt Barringer authored
87 void iconDownloaded();
f2b5157 - If favicon.ico is 404, download the HTML and parse it looking
Matt Barringer authored
88 void htmlIconDownloaded();
d1f700f Initial checkin
Matt Barringer authored
89 void bugsUpdated();
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
90 void filterTable();
d1f700f Initial checkin
Matt Barringer authored
91 void finishedDetecting(QMap<QString, QString> data);
92 void resync();
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
93 void showTodoList();
d1f700f Initial checkin
Matt Barringer authored
94 void upload();
95 void backendError(const QString &message);
f4c62c4 Added Shorcuts for Uploading, switching focus back to the search pane
David Williams authored
96 void searchFocusTriggered();
294c010 Adding a "log all XMLRPC responses" capability triggered by Ctrl-0
Matt Barringer authored
97 void toggleXmlRpcLogging();
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
98 void openSearchedBug(const QString &trackerName,
99 const QString &bugId);
d1f700f Initial checkin
Matt Barringer authored
100 protected:
101 void changeEvent(QEvent *e);
7324ecf Display the # of updated bugs in OS X's dock icon
Matt Barringer authored
102 void showEvent(QShowEvent *e);
d1f700f Initial checkin
Matt Barringer authored
103 private:
5d3c9b5 Bugzilla 4.0 is working now
Matt Barringer authored
104 void checkForUpdates();
32fabe2 Fixing compilation problems and isses with non-English languages
Matt Barringer authored
105 QString cleanupUrl(QString &url);
ef1e0ee Merging in the tabbedinterface branch
Matt Barringer authored
106 void populateStats();
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
107 int compareTabName(QString compareItem);
d1f700f Initial checkin
Matt Barringer authored
108 void setupDB();
bed63a8 Committing version 0.4 New features:
Matt Barringer authored
109 void checkDatabaseVersion();
d1f700f Initial checkin
Matt Barringer authored
110 void deleteTracker(const QString &id);
111 void updateTracker(const QString &id, QMap<QString, QString> data);
112 void setupTracker(Backend *newBug, QMap<QString, QString> info);
113 void syncTracker(Backend *tracker);
114 void setupTrayIcon();
115 void notifyUser();
259c6a2 Continuing work getting 1.0 finished.
Matt Barringer authored
116 void checkVersion(Backend *b);
d1f700f Initial checkin
Matt Barringer authored
117 void startAnimation();
118 void stopAnimation();
119 void loadTrackers();
120 void addTracker(QMap<QString, QString> info);
cecc020 Finishing up Launchpad support
Matt Barringer authored
121 void addTrackerToList(Backend *newTracker, bool sync = false);
d1f700f Initial checkin
Matt Barringer authored
122 void fetchIcon(const QString &url, const QString &savePath);
f2b5157 - If favicon.ico is 404, download the HTML and parse it looking
Matt Barringer authored
123 void fetchHTMLIcon(const QString &url, const QString &savePath);
d1f700f Initial checkin
Matt Barringer authored
124 bool isOnline();
3304b89 Component monitoring now works with Trac
Matt Barringer authored
125 int trackerNameExists(const QString &name);
d1f700f Initial checkin
Matt Barringer authored
126 void setTimer();
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
127
d1f700f Initial checkin
Matt Barringer authored
128 QString getChangelog();
bed63a8 Committing version 0.4 New features:
Matt Barringer authored
129 QString autodetectTracker(const QString &url);
cecc020 Finishing up Launchpad support
Matt Barringer authored
130 void syncNextTracker();
d1f700f Initial checkin
Matt Barringer authored
131 int mSyncRequests;
cecc020 Finishing up Launchpad support
Matt Barringer authored
132 int mSyncPosition;
133 bool mUploading;
d1f700f Initial checkin
Matt Barringer authored
134 QMap<QString, Backend*> mBackendMap;
cecc020 Finishing up Launchpad support
Matt Barringer authored
135 QList<Backend *> mBackendList;
bed63a8 Committing version 0.4 New features:
Matt Barringer authored
136 QString mDbPath;
824a223 Fixing bug #2 - Database wipe on upgrade
Matt Barringer authored
137 bool mDbUpdated;
d1f700f Initial checkin
Matt Barringer authored
138 Backend *pActiveBackend;
259c6a2 Continuing work getting 1.0 finished.
Matt Barringer authored
139 Backend *pNewTracker;
d1f700f Initial checkin
Matt Barringer authored
140 QString mActiveBugId, mActivePriority, mActiveStatus, mActiveSeverity;
141 bool mLoadingDetails;
142 QMovie *pSpinnerMovie;
143 QLabel *pStatusIcon, *pStatusMessage;
144 QNetworkAccessManager *pManager;
145 QProgressDialog *pDetectorProgress;
146 QSpacerItem *pCommentSpacer;
147 QTimer *pUpdateTimer;
148 QSystemTrayIcon *pTrayIcon;
149 QMenu *pTrayIconMenu;
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
150 SearchTab *pSearchTab;
151 ToDoListView *pTodoListView;
d1f700f Initial checkin
Matt Barringer authored
152 Ui::MainWindow *ui;
8230c49 Merging the 1.0 feature branch *for real this time*
Matt Barringer authored
153 QList<BackendUI*> trackerTabsList;
d1f700f Initial checkin
Matt Barringer authored
154 };
155
156 #endif // MAINWINDOW_H
Something went wrong with that request. Please try again.