QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Types | Public Member Functions | List of all members
QgsComposerMultiFrameMergeCommand Class Reference

A composer command that merges together with other commands having the same context (=id) for multi frame items. More...

#include <qgscomposermultiframecommand.h>

Inheritance diagram for QgsComposerMultiFrameMergeCommand:
Inheritance graph
[legend]

Public Types

enum  Context {
  Unknown = 0, HtmlSource, HtmlStylesheet, HtmlBreakDistance,
  TableMaximumFeatures, TableMargin, TableGridStrokeWidth, TableCellStyle
}
 

Public Member Functions

 QgsComposerMultiFrameMergeCommand (Context c, QgsComposerMultiFrame *multiFrame, const QString &text)
 
 ~QgsComposerMultiFrameMergeCommand ()
 
int id () const override
 
bool mergeWith (const QUndoCommand *command) override
 
- Public Member Functions inherited from QgsComposerMultiFrameCommand
 QgsComposerMultiFrameCommand (QgsComposerMultiFrame *multiFrame, const QString &text, QUndoCommand *parent=nullptr)
 
 ~QgsComposerMultiFrameCommand ()
 
QDomDocument afterState () const
 
bool containsChange () const
 Returns true if previous state and after state are valid and different. More...
 
const QgsComposerMultiFramemultiFrame () const
 
QDomDocument previousState () const
 
void redo () override
 
void saveAfterState ()
 
void savePreviousState ()
 
void undo () override
 
- Public Member Functions inherited from QUndoCommand
 QUndoCommand (QUndoCommand *parent)
 
 QUndoCommand (const QString &text, QUndoCommand *parent)
 
virtual ~QUndoCommand ()
 
QString actionText () const
 
const QUndoCommandchild (int index) const
 
int childCount () const
 
void setText (const QString &text)
 
QString text () const
 

Additional Inherited Members

- Protected Member Functions inherited from QgsComposerMultiFrameCommand
 QgsComposerMultiFrameCommand ()
 
bool checkFirstRun ()
 
void restoreState (QDomDocument &stateDoc)
 
void saveState (QDomDocument &stateDoc)
 
- Protected Attributes inherited from QgsComposerMultiFrameCommand
QDomDocument mAfterState
 
bool mFirstRun
 
QgsComposerMultiFramemMultiFrame
 
QDomDocument mPreviousState
 

Detailed Description

A composer command that merges together with other commands having the same context (=id) for multi frame items.

Keeps the oldest previous state and uses the newest after state. The purpose is to avoid too many micro changes in the history

Definition at line 67 of file qgscomposermultiframecommand.h.

Member Enumeration Documentation

◆ Context

Enumerator
Unknown 
HtmlSource 
HtmlStylesheet 
HtmlBreakDistance 
TableMaximumFeatures 
TableMargin 
TableGridStrokeWidth 
TableCellStyle 

Definition at line 70 of file qgscomposermultiframecommand.h.

Constructor & Destructor Documentation

◆ QgsComposerMultiFrameMergeCommand()

QgsComposerMultiFrameMergeCommand::QgsComposerMultiFrameMergeCommand ( QgsComposerMultiFrameMergeCommand::Context  c,
QgsComposerMultiFrame multiFrame,
const QString text 
)

Definition at line 95 of file qgscomposermultiframecommand.cpp.

◆ ~QgsComposerMultiFrameMergeCommand()

QgsComposerMultiFrameMergeCommand::~QgsComposerMultiFrameMergeCommand ( )

Definition at line 102 of file qgscomposermultiframecommand.cpp.

Member Function Documentation

◆ id()

int QgsComposerMultiFrameMergeCommand::id ( ) const
inlineoverridevirtual

Reimplemented from QUndoCommand.

Definition at line 88 of file qgscomposermultiframecommand.h.

◆ mergeWith()

bool QgsComposerMultiFrameMergeCommand::mergeWith ( const QUndoCommand command)
overridevirtual

Reimplemented from QUndoCommand.

Definition at line 107 of file qgscomposermultiframecommand.cpp.


The documentation for this class was generated from the following files: