Skip to content
Permalink
Browse files
Fix failing tests
  • Loading branch information
nyalldawson committed Dec 5, 2016
1 parent 6d4392a commit ad71dc443ddbc618075867267d7af6455846b448
Showing with 31 additions and 22 deletions.
  1. +3 −0 src/app/qgisapp.cpp
  2. +27 −20 src/gui/qgstaskmanagerwidget.h
  3. +1 −2 tests/src/python/test_qgsfloatingwidget.py
@@ -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
@@ -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
{
@@ -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
{
@@ -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
*/
@@ -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
{
@@ -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
{
@@ -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
{
@@ -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

0 comments on commit ad71dc4

Please sign in to comment.