Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 5, 2016
1 parent 6d4392a commit ad71dc4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
3 changes: 3 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -2410,6 +2410,9 @@ void QgisApp::createStatusBar()
connect( mMapCanvas, SIGNAL( renderStarting() ), this, SLOT( canvasRefreshStarted() ) );
connect( mMapCanvas, SIGNAL( mapCanvasRefreshed() ), this, SLOT( canvasRefreshFinished() ) );

mTaskManagerWidget = new QgsTaskManagerStatusBarWidget( QgsTaskManager::instance(), statusBar() );
statusBar()->addPermanentWidget( mTaskManagerWidget, 0 );

// Bumped the font up one point size since 8 was too
// small on some platforms. A point size of 9 still provides
// plenty of display space on 1024x768 resolutions
Expand Down
47 changes: 27 additions & 20 deletions src/gui/qgstaskmanagerwidget.h
Expand Up @@ -26,11 +26,12 @@ class QgsTask;
class QTreeView;
class QProgressBar;

/** \ingroup gui
/**
* \ingroup gui
* \class QgsTaskManagerWidget
* A widget which displays tasks from a QgsTaskManager and allows for interaction with the manager
* A widget which displays tasks from a QgsTaskManager and allows for interaction with the manager.
* @see QgsTaskManager
* @note introduced in QGIS 2.16
* \note added in QGIS 3.0
*/
class GUI_EXPORT QgsTaskManagerWidget : public QWidget
{
Expand All @@ -49,11 +50,12 @@ class GUI_EXPORT QgsTaskManagerWidget : public QWidget
QTreeView* mTreeView;
};

/** \ingroup gui
/**
* \ingroup gui
* \class QgsTaskManagerFloatingWidget
* A widget which displays tasks from a QgsTaskManager and allows for interaction with the manager
* A widget which displays tasks from a QgsTaskManager and allows for interaction with the manager.
* @see QgsTaskManager
* @note introduced in QGIS 2.16
* \note added in QGIS 2.16
*/
class GUI_EXPORT QgsTaskManagerFloatingWidget : public QgsFloatingWidget
{
Expand All @@ -69,19 +71,21 @@ class GUI_EXPORT QgsTaskManagerFloatingWidget : public QgsFloatingWidget

};

/** \ingroup gui
* \class QgsTaskManagerFloatingWidget
* A widget which displays tasks from a QgsTaskManager and allows for interaction with the manager
/**
* \class QgsTaskManagerStatusBarWidget
* A compact widget designed for embedding in a status bar, which displays tasks from a
* QgsTaskManager and allows for interaction with the manager.
* @see QgsTaskManager
* @note introduced in QGIS 2.16
* \ingroup gui
* \note added in QGIS 3.0
*/
class GUI_EXPORT QgsTaskManagerStatusBarWidget : public QToolButton
{
Q_OBJECT

public:

/** Constructor for QgsTaskManagerWidget
/** Constructor for QgsTaskManagerWidget.
* @param manager task manager associated with widget
* @param parent parent widget
*/
Expand All @@ -106,11 +110,12 @@ class GUI_EXPORT QgsTaskManagerStatusBarWidget : public QToolButton



/** \ingroup gui
/**
* \ingroup gui
* \class QgsTaskManagerModel
* A model representing a QgsTaskManager
* A model representing a QgsTaskManager.
* @see QgsTaskManager
* @note introduced in QGIS 2.16
* \note added in QGIS 2.16
*/
class GUI_EXPORT QgsTaskManagerModel: public QAbstractItemModel
{
Expand Down Expand Up @@ -164,10 +169,11 @@ class GUI_EXPORT QgsTaskManagerModel: public QAbstractItemModel
};


/** \ingroup gui
/**
* \ingroup gui
* \class QgsProgressBarDelegate
* A delegate for showing a progress bar within a view
* @note introduced in QGIS 2.16
* A delegate for showing a progress bar within a view.
* \note added in QGIS 3.0
*/
class GUI_EXPORT QgsProgressBarDelegate : public QStyledItemDelegate
{
Expand All @@ -184,10 +190,11 @@ class GUI_EXPORT QgsProgressBarDelegate : public QStyledItemDelegate
QSize sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
};

/** \ingroup gui
* \class QgsProgressBarDelegate
/**
* \ingroup gui
* \class QgsTaskStatusDelegate
* A delegate for showing task status within a view. Clicks on the delegate will cause the task to be cancelled (via the model).
* @note introduced in QGIS 2.16
* \note added in QGIS 3.0
*/
class GUI_EXPORT QgsTaskStatusDelegate : public QStyledItemDelegate
{
Expand Down
3 changes: 1 addition & 2 deletions tests/src/python/test_qgsfloatingwidget.py
Expand Up @@ -13,8 +13,7 @@
__revision__ = '$Format:%H$'

import qgis # NOQA
from PyQt.QtGui import QGridLayout
from PyQt.QtWidgets import QWidget
from qgis.PyQt.QtWidgets import QWidget, QGridLayout

import os

Expand Down

0 comments on commit ad71dc4

Please sign in to comment.