AlbumShaper  1.0a3
statusWidget.h
Go to the documentation of this file.
1 //Added by qt3to4:
2 #include <Q3Frame>
3 #include <Q3GridLayout>
4 #include <QLabel>
5 //==============================================
6 // copyright : (C) 2003-2005 by Will Stokes
7 //==============================================
8 // This program is free software; you can redistribute it
9 // and/or modify it under the terms of the GNU General
10 // Public License as published by the Free Software
11 // Foundation; either version 2 of the License, or
12 // (at your option) any later version.
13 //==============================================
14 
15 #ifndef GUI_STATUSWIDGET_H
16 #define GUI_STATUSWIDGET_H
17 
18 //--------------------
19 //forward declarations
20 class Q3GridLayout;
21 class QLabel;
22 class Q3Frame;
23 class Q3ProgressBar;
24 class QTimer;
25 class ClickableLabel;
26 //--------------------
27 
28 #include <qwidget.h>
29 #include <q3http.h>
30 
31 //=====================================
32 class StatusWidget : public QWidget
33 {
34 Q_OBJECT
35 //----------------------
36 public:
38  StatusWidget(QWidget *parent=0, const char* name=0);
39 
41  ~StatusWidget();
42 
44  void showProgressBar(QString message, int numSteps);
45 
47  void updateProgress(int progress,
48  QString newMessage=QString::null);
49 
51  int currentProgress();
52 
54  void incrementProgress();
55 
57  void setStatus( QString message );
58 
60  void checkForUpdates();
61 
63  void removeUpdatesIcon();
64 
65  //grab user input
66  void grabInput();
67 
68  //release user input
69  void releaseInput();
70 //----------------------
71 private slots:
73  void fileFetched(bool error);
74 
76  void removeStatus();
77 //----------------------
78 private:
80  Q3GridLayout* grid;
81 
83  Q3ProgressBar* progressBar;
84  int curStep;
85 
86  QTimer* timer;
87 //----------------------
89 Q3Http http;
90 
93 //----------------------
94 
95 };
96 //======================
97 
98 #endif //GUI_STATUSWIDGET_H
void fileFetched(bool error)
called once a file is fetched from the network
void incrementProgress()
Updates the progress bar by one step.
void removeUpdatesIcon()
Remove program updates icon.
void showProgressBar(QString message, int numSteps)
Initializes the progress bar.
QLabel * message
Definition: statusWidget.h:82
~StatusWidget()
Deletes all objects.
Q3GridLayout * grid
Layout widgets placed in.
Definition: statusWidget.h:80
void setStatus(QString message)
Update message.
A clickable label.
void releaseInput()
Q3Http http
http object for fetching releases file, used to check to see if installed copy is up to date ...
Definition: statusWidget.h:89
void removeStatus()
Unset message.
int currentProgress()
Returns current progress in steps.
QTimer * timer
Definition: statusWidget.h:86
StatusWidget(QWidget *parent=0, const char *name=0)
Creates layout.
ClickableLabel * updateAvailable
Update available label.
Definition: statusWidget.h:92
void checkForUpdates()
Check for updates.
void updateProgress(int progress, QString newMessage=QString::null)
Updates the progress bar.
Q3ProgressBar * progressBar
Definition: statusWidget.h:83