Skip to content
Permalink
Browse files
Swap all QScrollAreas to QgsScrollAreas
  • Loading branch information
nyalldawson committed Mar 20, 2017
1 parent 907ad02 commit 8e6d79271070473286d0f2f379202d4cad0ec75e
Showing with 600 additions and 278 deletions.
  1. +7 −1 python/console/console_settings.ui
  2. +1 −0 python/gui/gui.sip
  3. +15 −0 python/gui/qgsscrollarea.sip
  4. +4 −3 python/plugins/processing/modeler/ModelerParametersDialog.py
  5. +8 −3 python/plugins/processing/ui/DlgModeler.ui
  6. +7 −1 python/plugins/processing/ui/widgetParametersPanel.ui
  7. +0 −1 src/app/composer/qgsattributeselectiondialog.cpp
  8. +2 −1 src/gui/attributetable/qgsdualview.cpp
  9. +2 −2 src/gui/attributetable/qgsdualview.h
  10. +3 −3 src/gui/qgsattributeform.cpp
  11. +0 −1 src/gui/qgsattributetypeloaddialog.cpp
  12. +2 −1 src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp
  13. +3 −3 src/plugins/evis/eventbrowser/evisimagedisplaywidget.h
  14. +2 −1 src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.cpp
  15. +9 −1 src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.ui
  16. +7 −1 src/plugins/geometry_checker/ui/qgsgeometrycheckersetuptab.ui
  17. +2 −3 src/plugins/grass/qgsgrassmoduleoptions.cpp
  18. +9 −3 src/providers/grass/qgsgrassoptionsbase.ui
  19. +10 −4 src/ui/composer/qgsatlascompositionwidgetbase.ui
  20. +13 −7 src/ui/composer/qgscomposerarrowwidgetbase.ui
  21. +10 −4 src/ui/composer/qgscomposerattributetablewidgetbase.ui
  22. +19 −2 src/ui/composer/qgscomposerbase.ui
  23. +14 −8 src/ui/composer/qgscomposerhtmlwidgetbase.ui
  24. +10 −4 src/ui/composer/qgscomposerlabelwidgetbase.ui
  25. +16 −10 src/ui/composer/qgscomposerlegendwidgetbase.ui
  26. +14 −8 src/ui/composer/qgscomposermapgridwidgetbase.ui
  27. +13 −7 src/ui/composer/qgscomposermapwidgetbase.ui
  28. +16 −10 src/ui/composer/qgscomposerpicturewidgetbase.ui
  29. +18 −3 src/ui/composer/qgscomposerpolygonwidgetbase.ui
  30. +8 −2 src/ui/composer/qgscomposerpolylinewidgetbase.ui
  31. +18 −12 src/ui/composer/qgscomposerscalebarwidgetbase.ui
  32. +8 −2 src/ui/composer/qgscomposershapewidgetbase.ui
  33. +10 −4 src/ui/composer/qgscomposertablewidgetbase.ui
  34. +13 −7 src/ui/composer/qgscompositionwidgetbase.ui
  35. +9 −1 src/ui/editorwidgets/qgsdatetimeeditconfig.ui
  36. +11 −5 src/ui/editorwidgets/qgsexternalresourceconfigdlg.ui
  37. +9 −1 src/ui/qgscharacterselectdialogbase.ui
  38. +7 −1 src/ui/qgscustomprojectiondialogbase.ui
  39. +33 −27 src/ui/qgsdiagrampropertiesbase.ui
  40. +20 −3 src/ui/qgsgpsinformationwidgetbase.ui
  41. +10 −4 src/ui/qgsgradientcolorrampdialogbase.ui
  42. +10 −2 src/ui/qgslabelingrulepropswidget.ui
  43. +10 −4 src/ui/qgslabelpropertydialogbase.ui
  44. +13 −5 src/ui/qgsnewgeopackagelayerdialogbase.ui
  45. +14 −4 src/ui/qgsnewspatialitelayerdialogbase.ui
  46. +10 −4 src/ui/qgspluginmanagerbase.ui
  47. +16 −10 src/ui/qgsprojectpropertiesbase.ui
  48. +17 −11 src/ui/qgsrasterlayerpropertiesbase.ui
  49. +13 −7 src/ui/qgsrasterlayersaveasdialogbase.ui
  50. +32 −26 src/ui/qgstextformatwidgetbase.ui
  51. +26 −20 src/ui/qgsvectorlayerpropertiesbase.ui
  52. +13 −7 src/ui/qgsvectorlayersaveasdialogbase.ui
  53. +10 −3 src/ui/styledock/qgsrenderercontainerbase.ui
  54. +15 −9 src/ui/symbollayer/widget_fontmarker.ui
  55. +9 −1 src/ui/templates/qgsoptionsdialog_template.ui
@@ -46,7 +46,7 @@
</widget>
</item>
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea">
<widget class="QgsScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
@@ -1139,6 +1139,12 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsScrollArea</class>
<extends>QScrollArea</extends>
<header location="global">qgis.gui</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBox</class>
<extends>QGroupBox</extends>
@@ -154,6 +154,7 @@
%Include qgsscalerangewidget.sip
%Include qgsscalevisibilitydialog.sip
%Include qgsscalewidget.sip
%Include qgsscrollarea.sip
%Include qgssearchquerybuilder.sip
%Include qgsshortcutsmanager.sip
%Include qgsslider.sip
@@ -0,0 +1,15 @@
class QgsScrollArea : QScrollArea
{
%TypeHeaderCode
#include <qgsscrollarea.h>
%End

public:
explicit QgsScrollArea( QWidget *parent /TransferThis/ = 0 );
void scrollOccurred();
bool hasScrolled() const;

protected:
void wheelEvent( QWheelEvent *event );

};
@@ -30,13 +30,14 @@
from qgis.PyQt.QtCore import Qt, QUrl, QMetaObject
from qgis.PyQt.QtWidgets import (QDialog, QDialogButtonBox, QLabel, QLineEdit,
QFrame, QPushButton, QSizePolicy, QVBoxLayout,
QHBoxLayout, QTabWidget, QWidget, QScrollArea,
QHBoxLayout, QTabWidget, QWidget,
QTextBrowser)
from qgis.PyQt.QtNetwork import QNetworkRequest, QNetworkReply

from qgis.core import QgsNetworkAccessManager

from qgis.gui import QgsMessageBar
from qgis.gui import (QgsMessageBar,
QgsScrollArea)

from processing.gui.wrappers import InvalidParameterValue
from processing.gui.MultipleInputPanel import MultipleInputPanel
@@ -187,7 +188,7 @@ def setupUi(self):
self.tabWidget.setMinimumWidth(300)
self.paramPanel = QWidget()
self.paramPanel.setLayout(self.verticalLayout)
self.scrollArea = QScrollArea()
self.scrollArea = QgsScrollArea()
self.scrollArea.setWidget(self.paramPanel)
self.scrollArea.setWidgetResizable(True)
self.tabWidget.addTab(self.scrollArea, self.tr('Parameters'))
@@ -44,7 +44,7 @@
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea_1">
<widget class="QgsScrollArea" name="scrollArea_1">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
@@ -138,7 +138,7 @@
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea_2">
<widget class="QgsScrollArea" name="scrollArea_2">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
@@ -222,7 +222,7 @@
<number>2</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea_3">
<widget class="QgsScrollArea" name="scrollArea_3">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
@@ -505,6 +505,11 @@
</action>
</widget>
<customwidgets>
<customwidget>
<class>QgsScrollArea</class>
<extends>QScrollArea</extends>
<header>qgis.gui</header>
</customwidget>
<customwidget>
<class>QgsFilterLineEdit</class>
<extends>QLineEdit</extends>
@@ -21,7 +21,7 @@
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<widget class="QgsScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
@@ -88,6 +88,12 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsScrollArea</class>
<extends>QScrollArea</extends>
<header>qgis.gui</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBox</class>
<extends>QGroupBox</extends>
@@ -29,7 +29,6 @@
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QScrollArea>
#include <QSpinBox>
#include <QSortFilterProxyModel>

@@ -28,6 +28,7 @@
#include "qgsorganizetablecolumnsdialog.h"
#include "qgseditorwidgetregistry.h"
#include "qgssettings.h"
#include "qgsscrollarea.h"

#include <QClipboard>
#include <QDialog>
@@ -95,7 +96,7 @@ void QgsDualView::init( QgsVectorLayer *layer, QgsMapCanvas *mapCanvas, const Qg
mAttributeForm = new QgsAttributeForm( mLayer, QgsFeature(), mEditorContext );
if ( !context.parentContext() )
{
mAttributeEditorScrollArea = new QScrollArea();
mAttributeEditorScrollArea = new QgsScrollArea();
mAttributeEditorScrollArea->setWidgetResizable( true );
mAttributeEditor->layout()->addWidget( mAttributeEditorScrollArea );
mAttributeEditorScrollArea->setWidget( mAttributeForm );
@@ -29,7 +29,7 @@
class QgsFeatureRequest;
class QSignalMapper;
class QgsMapLayerAction;
class QScrollArea;
class QgsScrollArea;

/** \ingroup gui
* This widget is used to show the attributes of a set of features of a {@link QgsVectorLayer}.
@@ -351,7 +351,7 @@ class GUI_EXPORT QgsDualView : public QStackedWidget, private Ui::QgsDualViewBas
QgsDistanceArea mDistanceArea;
QString mDisplayExpression;
QgsAttributeTableConfig mConfig;
QScrollArea *mAttributeEditorScrollArea = nullptr;
QgsScrollArea *mAttributeEditorScrollArea = nullptr;
QgsMapCanvas *mMapCanvas = nullptr;

friend class TestQgsDualView;
@@ -31,6 +31,7 @@
#include "qgslogger.h"
#include "qgstabwidget.h"
#include "qgssettings.h"
#include "qgsscrollarea.h"

#include <QDir>
#include <QTextStream>
@@ -42,7 +43,6 @@
#include <QKeyEvent>
#include <QLabel>
#include <QPushButton>
#include <QScrollArea>
#include <QUiLoader>
#include <QMessageBox>
#include <QToolButton>
@@ -1210,7 +1210,7 @@ void QgsAttributeForm::init()
if ( mContext.formMode() != QgsAttributeEditorContext::Embed )
{
// put the form into a scroll area to nicely handle cases with lots of attributes
QScrollArea *scrollArea = new QScrollArea( this );
QgsScrollArea *scrollArea = new QgsScrollArea( this );
scrollArea->setWidget( formWidget );
scrollArea->setWidgetResizable( true );
scrollArea->setFrameShape( QFrame::NoFrame );
@@ -1599,7 +1599,7 @@ QgsAttributeForm::WidgetInfo QgsAttributeForm::createWidgetFromDef( const QgsAtt

if ( context.formMode() != QgsAttributeEditorContext::Embed )
{
QScrollArea *scrollArea = new QScrollArea( parent );
QgsScrollArea *scrollArea = new QgsScrollArea( parent );

scrollArea->setWidget( myContainer );
scrollArea->setWidgetResizable( true );
@@ -29,7 +29,6 @@
#include <QComboBox>
#include <QLabel>
#include <QFrame>
#include <QScrollArea>
#include <QCompleter>
#include <QSpinBox>
#include <QPushButton>
@@ -27,6 +27,7 @@
#include "evisimagedisplaywidget.h"

#include "qgsapplication.h"
#include "qgsscrollarea.h"

#include <QVBoxLayout>
#include <QHBoxLayout>
@@ -76,7 +77,7 @@ eVisImageDisplayWidget::eVisImageDisplayWidget( QWidget *parent, Qt::WindowFlags
myButtonBar->setLayout( myButtonBarLayout );

//setup display area
mDisplayArea = new QScrollArea();
mDisplayArea = new QgsScrollArea();

QVBoxLayout *myLayout = new QVBoxLayout;
myLayout->addWidget( myButtonBar );
@@ -29,12 +29,12 @@

#include <QLabel>
#include <QWidget>
#include <QScrollArea>
#include <QPushButton>
#include <QBuffer>

#include <QResizeEvent>

class QgsScrollArea;

/**
* \class eVisGenericEventBrowserGui
* \brief Generic viewer for browsing event
@@ -81,7 +81,7 @@ class eVisImageDisplayWidget : public QWidget
int mCurrentZoomStep;

//! \brief widget to display the image in
QScrollArea *mDisplayArea = nullptr;
QgsScrollArea *mDisplayArea = nullptr;

//! \brief Method that actually display the image in the widget
void displayImage();
@@ -37,6 +37,7 @@
#include "qgsvectordataprovider.h"
#include "qgsvectorfilewriter.h"
#include "qgssettings.h"
#include "qgsscrollarea.h"

QString QgsGeometryCheckerResultTab::sSettingsGroup = QStringLiteral( "/geometry_checker/default_fix_methods/" );

@@ -550,7 +551,7 @@ void QgsGeometryCheckerResultTab::setDefaultResolutionMethods()

QVBoxLayout *layout = new QVBoxLayout( &dialog );

QScrollArea *scrollArea = new QScrollArea( &dialog );
QgsScrollArea *scrollArea = new QgsScrollArea( &dialog );
scrollArea->setFrameShape( QFrame::NoFrame );
layout->setContentsMargins( 0, 0, 0, 0 );
layout->addWidget( scrollArea );
@@ -27,7 +27,7 @@
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea">
<widget class="QgsScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
@@ -401,6 +401,14 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsScrollArea</class>
<extends>QScrollArea</extends>
<header>qgsscrollarea.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>scrollArea</tabstop>
<tabstop>tableWidgetErrors</tabstop>
@@ -27,7 +27,7 @@
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea">
<widget class="QgsScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
@@ -723,6 +723,12 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsScrollArea</class>
<extends>QScrollArea</extends>
<header>qgsscrollarea.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsMapLayerComboBox</class>
<extends>QComboBox</extends>
@@ -16,8 +16,6 @@

#include <QDomElement>
#include <QFileDialog>
#include <QMessageBox>
#include <QScrollArea>
#include <QTextCodec>

#include "qgisinterface.h"
@@ -30,6 +28,7 @@
#include "qgsrasterlayer.h"
#include "qgsvectorlayer.h"
#include "qgsvectordataprovider.h"
#include "qgsscrollarea.h"

#include "qgsgrass.h"
#include "qgsgrassmodule.h"
@@ -90,7 +89,7 @@ QgsGrassModuleStandardOptions::QgsGrassModuleStandardOptions(
//
QVBoxLayout *mypOuterLayout = new QVBoxLayout( this );
mypOuterLayout->setContentsMargins( 0, 0, 0, 0 );
QScrollArea *mypScrollArea = new QScrollArea();
QgsScrollArea *mypScrollArea = new QgsScrollArea();
//transfers scroll area ownership so no need to call delete
mypOuterLayout->addWidget( mypScrollArea );
QFrame *mypInnerFrame = new QFrame();
@@ -228,7 +228,7 @@
<widget class="QWidget" name="mModulesPage">
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QScrollArea" name="mModulesScrollArea">
<widget class="QgsScrollArea" name="mModulesScrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
@@ -329,7 +329,7 @@
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="mBrowserScrollArea">
<widget class="QgsScrollArea" name="mBrowserScrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
@@ -566,6 +566,12 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsScrollArea</class>
<extends>QScrollArea</extends>
<header>qgsscrollarea.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
@@ -580,8 +586,8 @@
</customwidget>
</customwidgets>
<resources>
<include location="../../../images/images.qrc"/>
<include location="../../plugins/grass/qgsgrass_plugin.qrc"/>
<include location="../../../images/images.qrc"/>
</resources>
<connections>
<connection>

0 comments on commit 8e6d792

Please sign in to comment.