Skip to content

Commit

Permalink
Drop composer class from gui library
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 10, 2018
1 parent 0732754 commit 322f2e8
Show file tree
Hide file tree
Showing 21 changed files with 19 additions and 3,706 deletions.
2 changes: 1 addition & 1 deletion python/gui/qgspropertyoverridebutton.sip
Expand Up @@ -21,7 +21,7 @@ and QgsPropertyCollection).
It allows users to specify field or expression based overrides
which should be applied to a property of an object. Eg, this widget
is used for controlling data defined overrides in symbology, labeling
and composer.
and layouts.

.. versionadded:: 3.0
%End
Expand Down
1 change: 0 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -154,7 +154,6 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
#include "qgsbrowserdockwidget.h"
#include "qgsadvanceddigitizingdockwidget.h"
#include "qgsclipboard.h"
#include "qgscomposerview.h"
#include "qgsconfigureshortcutsdialog.h"
#include "qgscoordinatetransform.h"
#include "qgscoordinateutils.h"
Expand Down
8 changes: 0 additions & 8 deletions src/gui/CMakeLists.txt
Expand Up @@ -225,9 +225,6 @@ SET(QGIS_GUI_SRCS
qgscolorschemelist.cpp
qgscolorswatchgrid.cpp
qgscolorwidgets.cpp
qgscomposeritemcombobox.cpp
qgscomposerruler.cpp
qgscomposerview.cpp
qgscompoundcolorwidget.cpp
qgsconfigureshortcutsdialog.cpp
qgscredentialdialog.cpp
Expand Down Expand Up @@ -400,10 +397,6 @@ SET(QGIS_GUI_MOC_HDRS
qgscolorschemelist.h
qgscolorswatchgrid.h
qgscolorwidgets.h
qgscomposerinterface.h
qgscomposeritemcombobox.h
qgscomposerruler.h
qgscomposerview.h
qgscompoundcolorwidget.h
qgsconfigureshortcutsdialog.h
qgscredentialdialog.h
Expand Down Expand Up @@ -872,7 +865,6 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/annotations
${CMAKE_SOURCE_DIR}/src/core/auth
${CMAKE_SOURCE_DIR}/src/core/composer
${CMAKE_SOURCE_DIR}/src/core/fieldformatter
${CMAKE_SOURCE_DIR}/src/core/geometry
${CMAKE_SOURCE_DIR}/src/core/layertree
Expand Down
2 changes: 1 addition & 1 deletion src/gui/layout/qgslayoutdesignerinterface.h
@@ -1,5 +1,5 @@
/***************************************************************************
qgscomposerinterface.h
qgslayoutdesignerinterface.h
---------------------
Date : July 2017
Copyright : (C) 2017 Nyall Dawson
Expand Down
2 changes: 1 addition & 1 deletion src/gui/layout/qgslayoutitemwidget.h
Expand Up @@ -40,7 +40,7 @@ class QgsPropertyOverrideButton;
// So QgsLayoutItemWidget HAS a QgsLayoutConfigObject to handle these common tasks.
// Specific item property widgets (e.g., QgsLayoutMapWidget) should inherit from QgsLayoutItemBaseWidget
// (which is a QgsPanelWidget) and also HAS a QgsLayoutConfigObject, with protected methods
// which are just proxied through to the QgsComposerConfigObject.
// which are just proxied through to the QgsLayoutConfigObject.
// phew!
// long story short - don't change this without good reason. If you add a new item type, inherit
// from QgsLayoutItemBaseWidget and trust that everything else has been done for you.
Expand Down
4 changes: 2 additions & 2 deletions src/gui/layout/qgslayoutmousehandles.cpp
Expand Up @@ -319,7 +319,7 @@ double QgsLayoutMouseHandles::rectHandlerBorderTolerance()
//get view scale factor
double viewScaleFactor = mView->transform().m11();

//size of handle boxes depends on zoom level in composer view
//size of handle boxes depends on zoom level in layout view
double rectHandlerSize = 10.0 / viewScaleFactor;

//make sure the boxes don't get too large
Expand Down Expand Up @@ -510,7 +510,7 @@ QgsLayoutMouseHandles::MouseAction QgsLayoutMouseHandles::mouseActionForPosition
QgsLayoutItem *item = dynamic_cast<QgsLayoutItem *>( graphicsItem );
if ( item && item->isSelected() )
{
//cursor is over a selected composer item
//cursor is over a selected layout item
return QgsLayoutMouseHandles::MoveItem;
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/gui/layout/qgslayoutmousehandles.h
Expand Up @@ -143,9 +143,9 @@ class GUI_EXPORT QgsLayoutMouseHandles: public QObject, public QGraphicsRectItem
QPointF mLastMouseEventPos;
//! Position of the mouse at beginning of move/resize (in scene coordinates)
QPointF mBeginMouseEventPos;
//! Position of composer handles at beginning of move/resize (in scene coordinates)
//! Position of layout handles at beginning of move/resize (in scene coordinates)
QPointF mBeginHandlePos;
//! Width and height of composer handles at beginning of resize
//! Width and height of layout handles at beginning of resize
double mBeginHandleWidth = 0;
double mBeginHandleHeight = 0;

Expand Down Expand Up @@ -200,7 +200,7 @@ class GUI_EXPORT QgsLayoutMouseHandles: public QObject, public QGraphicsRectItem
//sets the mouse cursor for the QGraphicsView attached to the composition (workaround qt bug #3732)
void setViewportCursor( Qt::CursorShape cursor );

//resets the composer window status bar to the default message
//resets the layout designer status bar to the default message
void resetStatusBar();

//! Snaps an item or point (depending on mode) originating at originalPoint to the grid or align rulers
Expand Down
6 changes: 4 additions & 2 deletions src/gui/layout/qgslayoutruler.h
Expand Up @@ -15,10 +15,12 @@
#ifndef QGSLAYOUTRULER_H
#define QGSLAYOUTRULER_H

#include "qgscomposeritem.h"
#include "qgis_gui.h"
#include "qgis_sip.h"
#include <QWidget>
#include <QPointer>
#include "qgis_gui.h"
#include <QMenu>
#include <memory>

class QgsLayout;
class QGraphicsLineItem;
Expand Down
1 change: 1 addition & 0 deletions src/gui/layout/qgslayoutview.cpp
Expand Up @@ -34,6 +34,7 @@
#include "qgslayoutpagecollection.h"
#include "qgslayoutundostack.h"
#include "qgslayoutreportsectionlabel.h"
#include "qgsreadwritecontext.h"
#include <memory>
#include <QDesktopWidget>
#include <QMenu>
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgscolorschemelist.cpp
Expand Up @@ -320,7 +320,7 @@ QModelIndex QgsColorSchemeModel::index( int row, int column, const QModelIndex &

if ( !parent.isValid() && row >= 0 && row < mColors.size() )
{
//return an index for the composer item at this position
//return an index for the color item at this position
return createIndex( row, column );
}

Expand Down
71 changes: 0 additions & 71 deletions src/gui/qgscomposerinterface.h

This file was deleted.

120 changes: 0 additions & 120 deletions src/gui/qgscomposeritemcombobox.cpp

This file was deleted.

0 comments on commit 322f2e8

Please sign in to comment.