Skip to content

Commit 32834e9

Browse files
committedNov 24, 2017
Update indentation
1 parent 6ec96d6 commit 32834e9

File tree

10 files changed

+233
-193
lines changed

10 files changed

+233
-193
lines changed
 

‎python/core/layout/qgslayoutitemhtml.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ class QgsLayoutItemHtml: QgsLayoutMultiFrame
221221
%Docstring
222222
Recalculates the frame sizes for the current viewport dimensions
223223
%End
224-
void refreshExpressionContext();
225224

226-
void refreshDataDefinedProperty( const QgsLayoutObject::DataDefinedProperty property = QgsLayoutObject::AllProperties );
225+
virtual void refreshDataDefinedProperty( const QgsLayoutObject::DataDefinedProperty property = QgsLayoutObject::AllProperties );
226+
227227

228228
protected:
229229

‎python/core/layout/qgslayoutmultiframe.sip

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,12 @@ class QgsLayoutMultiFrame: QgsLayoutObject, QgsLayoutUndoObjectInterface
266266

267267
public slots:
268268

269+
virtual void refresh();
270+
271+
%Docstring
272+
Refreshes the multiframe, causing a recalculation of any property overrides.
273+
%End
274+
269275
void update();
270276
%Docstring
271277
Forces a redraw of all child frames.
@@ -290,6 +296,14 @@ class QgsLayoutMultiFrame: QgsLayoutObject, QgsLayoutUndoObjectInterface
290296
.. seealso:: recalculateFrameSizes
291297
%End
292298

299+
virtual void refreshDataDefinedProperty( const QgsLayoutObject::DataDefinedProperty property = QgsLayoutObject::AllProperties );
300+
%Docstring
301+
Refreshes a data defined ``property`` for the multi frame by reevaluating the property's value
302+
and redrawing the item with this new value. If ``property`` is set to
303+
QgsLayoutObject.AllProperties then all data defined properties for the item will be
304+
refreshed.
305+
%End
306+
293307
signals:
294308

295309
void changed();

‎src/app/qgscrashhandler.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class APP_EXPORT QgsCrashHandler
3131
{
3232

3333
public:
34+
3435
/**
3536
* This class doesn't need to be created by anyone as is only used to handle
3637
* crashes in the application.

‎src/core/layout/qgslayoutitemhtml.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,8 @@ class CORE_EXPORT QgsLayoutItemHtml: public QgsLayoutMultiFrame
224224

225225
//! Recalculates the frame sizes for the current viewport dimensions
226226
void recalculateFrameSizes() override;
227-
void refreshExpressionContext();
228227

229-
void refreshDataDefinedProperty( const QgsLayoutObject::DataDefinedProperty property = QgsLayoutObject::AllProperties );
228+
void refreshDataDefinedProperty( const QgsLayoutObject::DataDefinedProperty property = QgsLayoutObject::AllProperties ) override;
230229

231230
protected:
232231

@@ -273,6 +272,8 @@ class CORE_EXPORT QgsLayoutItemHtml: public QgsLayoutMultiFrame
273272

274273
//! Calculates the max width of frames in the html multiframe
275274
double maxFrameWidth() const;
275+
276+
void refreshExpressionContext();
276277
};
277278

278279
#endif // QGSLAYOUTITEMHTML_H

‎src/core/layout/qgslayoutmultiframe.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ void QgsLayoutMultiFrame::recalculateFrameRects()
233233
}
234234
}
235235

236+
void QgsLayoutMultiFrame::refreshDataDefinedProperty( const QgsLayoutObject::DataDefinedProperty )
237+
{
238+
239+
}
240+
236241
QgsLayoutFrame *QgsLayoutMultiFrame::createNewFrame( QgsLayoutFrame *currentFrame, QPointF pos, QSizeF size )
237242
{
238243
if ( !currentFrame )
@@ -289,6 +294,12 @@ void QgsLayoutMultiFrame::cancelCommand()
289294
mLayout->undoStack()->cancelCommand();
290295
}
291296

297+
void QgsLayoutMultiFrame::refresh()
298+
{
299+
QgsLayoutObject::refresh();
300+
refreshDataDefinedProperty();
301+
}
302+
292303
void QgsLayoutMultiFrame::handleFrameRemoval()
293304
{
294305
if ( mBlockUpdates )

‎src/core/layout/qgslayoutmultiframe.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,11 @@ class CORE_EXPORT QgsLayoutMultiFrame: public QgsLayoutObject, public QgsLayoutU
278278

279279
public slots:
280280

281+
/**
282+
* Refreshes the multiframe, causing a recalculation of any property overrides.
283+
*/
284+
void refresh() override;
285+
281286
/**
282287
* Forces a redraw of all child frames.
283288
*/
@@ -302,6 +307,14 @@ class CORE_EXPORT QgsLayoutMultiFrame: public QgsLayoutObject, public QgsLayoutU
302307
*/
303308
void recalculateFrameRects();
304309

310+
/**
311+
* Refreshes a data defined \a property for the multi frame by reevaluating the property's value
312+
* and redrawing the item with this new value. If \a property is set to
313+
* QgsLayoutObject::AllProperties then all data defined properties for the item will be
314+
* refreshed.
315+
*/
316+
virtual void refreshDataDefinedProperty( const QgsLayoutObject::DataDefinedProperty property = QgsLayoutObject::AllProperties );
317+
305318
signals:
306319

307320
/**

‎src/crashhandler/CMakeLists.txt

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
INCLUDE_DIRECTORIES(SYSTEM
2-
${CMAKE_CURRENT_BINARY_DIR}
3-
)
4-
5-
QT5_WRAP_UI(CRASH_UIS_H qgscrashdialog.ui)
6-
QT5_WRAP_CPP(CRASH_HDR_MOC qgscrashdialog.h)
7-
8-
SET(IMAGE_RCCS ../../images/images.qrc)
9-
QT5_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS})
10-
11-
# -wd4091 Avoid 'typedef' ignored on left of '' when no variable is declared warning in DbgHelp.h
12-
SET_SOURCE_FILES_PROPERTIES(qgsstacktrace.cpp PROPERTIES COMPILE_FLAGS -wd4091)
13-
14-
ADD_EXECUTABLE(qgiscrashhandler WIN32
15-
main.cpp
16-
${CRASH_UIS_H}
17-
${CRASH_HDR_MOC}
18-
${IMAGE_RCC_SRCS}
19-
qgscrashdialog.cpp
20-
qgsstacktrace.cpp
21-
qgscrashreport.cpp
22-
${CMAKE_CURRENT_SOURCE_DIR}/../app/qgis_win32.rc
23-
)
24-
25-
TARGET_LINK_LIBRARIES(qgiscrashhandler
26-
${QT_QTCORE_LIBRARY}
27-
${QT_QTGUI_LIBRARY}
28-
DbgHelp
29-
)
30-
31-
INSTALL(CODE "MESSAGE(\"Installing crashhandler ...\")")
32-
INSTALL(TARGETS qgiscrashhandler RUNTIME DESTINATION ${QGIS_LIBEXEC_DIR})
1+
INCLUDE_DIRECTORIES(SYSTEM
2+
${CMAKE_CURRENT_BINARY_DIR}
3+
)
4+
5+
QT5_WRAP_UI(CRASH_UIS_H qgscrashdialog.ui)
6+
QT5_WRAP_CPP(CRASH_HDR_MOC qgscrashdialog.h)
7+
8+
SET(IMAGE_RCCS ../../images/images.qrc)
9+
QT5_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS})
10+
11+
# -wd4091 Avoid 'typedef' ignored on left of '' when no variable is declared warning in DbgHelp.h
12+
SET_SOURCE_FILES_PROPERTIES(qgsstacktrace.cpp PROPERTIES COMPILE_FLAGS -wd4091)
13+
14+
ADD_EXECUTABLE(qgiscrashhandler WIN32
15+
main.cpp
16+
${CRASH_UIS_H}
17+
${CRASH_HDR_MOC}
18+
${IMAGE_RCC_SRCS}
19+
qgscrashdialog.cpp
20+
qgsstacktrace.cpp
21+
qgscrashreport.cpp
22+
${CMAKE_CURRENT_SOURCE_DIR}/../app/qgis_win32.rc
23+
)
24+
25+
TARGET_LINK_LIBRARIES(qgiscrashhandler
26+
${QT_QTCORE_LIBRARY}
27+
${QT_QTGUI_LIBRARY}
28+
DbgHelp
29+
)
30+
31+
INSTALL(CODE "MESSAGE(\"Installing crashhandler ...\")")
32+
INSTALL(TARGETS qgiscrashhandler RUNTIME DESTINATION ${QGIS_LIBEXEC_DIR})

‎src/crashhandler/qgscrashdialog.h

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
1-
/***************************************************************************
2-
qgscrashdialog.h - QgsCrashDialog
3-
4-
---------------------
5-
begin : 11.4.2017
6-
copyright : (C) 2017 by Nathan Woodrow
7-
email : woodrow.nathan@gmail.com
8-
***************************************************************************
9-
* *
10-
* This program is free software; you can redistribute it and/or modify *
11-
* it under the terms of the GNU General Public License as published by *
12-
* the Free Software Foundation; either version 2 of the License, or *
13-
* (at your option) any later version. *
14-
* *
15-
***************************************************************************/
16-
17-
#ifndef QGSCRASHDIALOG_H
18-
#define QGSCRASHDIALOG_H
19-
20-
#include <QDialog>
21-
#include <QFormLayout>
22-
#include <QPlainTextEdit>
23-
#include <QPushButton>
24-
25-
#include "ui_qgscrashdialog.h"
26-
27-
/**
28-
* A dialog to show a nicer crash dialog to the user.
29-
*/
30-
class QgsCrashDialog : public QDialog, private Ui::QgsCrashDialog
31-
{
32-
Q_OBJECT
33-
public:
34-
35-
/**
36-
* A dialog to show a nicer crash dialog to the user.
37-
*/
38-
QgsCrashDialog( QWidget *parent = nullptr );
39-
40-
void setBugReport( const QString &reportData );
41-
void setReloadArgs( const QString &reloadArgs );
42-
43-
static QString htmlToMarkdown( const QString &html );
44-
45-
private slots:
46-
void showReportWidget();
47-
void createBugReport();
48-
void reloadQGIS();
49-
50-
private:
51-
QString mReportData;
52-
QString mReloadArgs;
53-
};
54-
55-
#endif // QGSCRASHDIALOG_H
1+
/***************************************************************************
2+
qgscrashdialog.h - QgsCrashDialog
3+
4+
---------------------
5+
begin : 11.4.2017
6+
copyright : (C) 2017 by Nathan Woodrow
7+
email : woodrow.nathan@gmail.com
8+
***************************************************************************
9+
* *
10+
* This program is free software; you can redistribute it and/or modify *
11+
* it under the terms of the GNU General Public License as published by *
12+
* the Free Software Foundation; either version 2 of the License, or *
13+
* (at your option) any later version. *
14+
* *
15+
***************************************************************************/
16+
17+
#ifndef QGSCRASHDIALOG_H
18+
#define QGSCRASHDIALOG_H
19+
20+
#include <QDialog>
21+
#include <QFormLayout>
22+
#include <QPlainTextEdit>
23+
#include <QPushButton>
24+
25+
#include "ui_qgscrashdialog.h"
26+
27+
/**
28+
* A dialog to show a nicer crash dialog to the user.
29+
*/
30+
class QgsCrashDialog : public QDialog, private Ui::QgsCrashDialog
31+
{
32+
Q_OBJECT
33+
public:
34+
35+
/**
36+
* A dialog to show a nicer crash dialog to the user.
37+
*/
38+
QgsCrashDialog( QWidget *parent = nullptr );
39+
40+
void setBugReport( const QString &reportData );
41+
void setReloadArgs( const QString &reloadArgs );
42+
43+
static QString htmlToMarkdown( const QString &html );
44+
45+
private slots:
46+
void showReportWidget();
47+
void createBugReport();
48+
void reloadQGIS();
49+
50+
private:
51+
QString mReportData;
52+
QString mReloadArgs;
53+
};
54+
55+
#endif // QGSCRASHDIALOG_H

0 commit comments

Comments
 (0)
Please sign in to comment.