forked from qt-creator/qt-creator
Move progress indicators out of mode bar.
This both allows the mode bar to be hidden optionally, and can give the progress information a bit more room (e.g. for titles). Progress information can either be shown in "pop up" windows in the lower left corner of the main window (hiding window contents below), or in a summary progress bar in the bottom right corner of the status bar. Hovering the summary progress bar temporarily pops up the detailed progress information. Keyboard can be used to switch between the two views. Change-Id: Ic6d6ab4fd43906e84b480c8ddf8eae5f5852e1f3 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <QFuture>
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QVBoxLayout;
|
||||
QT_END_NAMESPACE
|
||||
@@ -59,17 +60,37 @@ public:
|
||||
const QString &type,
|
||||
ProgressManager::ProgressFlags flags);
|
||||
|
||||
bool hasError() const;
|
||||
bool isFading() const;
|
||||
bool isEmpty() const;
|
||||
bool isHovered() const;
|
||||
|
||||
void setReferenceWidget(QWidget *widget);
|
||||
|
||||
protected:
|
||||
bool event(QEvent *event);
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
||||
signals:
|
||||
void hasErrorChanged();
|
||||
void fadeOfLastProgressStarted();
|
||||
void hoveredChanged(bool hovered);
|
||||
|
||||
private slots:
|
||||
void slotRemoveTask();
|
||||
void checkForLastProgressFading();
|
||||
|
||||
private:
|
||||
void removeOldTasks(const QString &type, bool keepOne = false);
|
||||
void removeOneOldTask();
|
||||
void removeTask(FutureProgress *task);
|
||||
void deleteTask(FutureProgress *task);
|
||||
void reposition();
|
||||
|
||||
QVBoxLayout *m_layout;
|
||||
QList<FutureProgress *> m_taskList;
|
||||
QWidget *m_referenceWidget;
|
||||
bool m_hovered;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user