Swiftray  1.0
command.h File Reference
#include <layer.h>
#include <shape/shape.h>
#include <shape/text-shape.h>

Go to the source code of this file.

Classes

class  Commands::AddLayerCmd
 Command for adding layers. More...
 
class  Commands::AddShapeCmd
 Command for adding shapes. The command needs to manage shapes' lifecycle, but doesn't need to manage layers' lifecycle. More...
 
class  Commands::BaseCmd
 A class template for undoable commands, along with undo() / redo() implementation. More...
 
class  Commands::JoinedCmd
 A group of commands that can be considered as a single step in undo/redo. More...
 
class  Commands::RemoveLayerCmd
 Command for removing layers. More...
 
class  Commands::RemoveShapeCmd
 Command for removing shapes. The command needs to manage shapes' lifecycle, but doesn't need to manage layers' lifecycle. More...
 
class  Commands::SelectCmd
 Command for selection changes in document. More...
 
class  Commands::SetCmd< T, PropType, PropGetter, PropSetter >
 Command for changing objects' property, and the property can be "passed by value". More...
 
class  Commands::SetRefCmd< T, PropType, PropGetter, PropSetter >
 Command for changing objects' property, and the property is usually "passed by reference". More...
 

Namespaces

 Commands
 Undoable commands.
 

Typedefs

typedef shared_ptr< BaseCmd > Commands::CmdPtr
 
typedef Commands::CmdPtr CmdPtr
 
typedef shared_ptr< JoinedCmd > Commands::JoinedPtr
 

Functions

CmdPtr Commands::AddLayer (const LayerPtr &layer)
 
CmdPtr Commands::AddShape (Layer *layer, const ShapePtr &shape)
 
CmdPtr Commands::AddShapes (Layer *layer, const QList< ShapePtr > &shapes)
 
JoinedPtr Commands::Joined ()
 
JoinedPtr Commands::operator+ (const CmdPtr &a, const CmdPtr &b)
 
JoinedPtrCommands::operator<< (JoinedPtr &a, BaseCmd *b)
 
JoinedPtrCommands::operator<< (JoinedPtr &a, const CmdPtr &b)
 
CmdPtr Commands::RemoveLayer (const LayerPtr &layer)
 
CmdPtr Commands::RemoveSelections (Document *doc)
 
CmdPtr Commands::RemoveShape (const ShapePtr &shape)
 
CmdPtr Commands::RemoveShape (Layer *layer, const ShapePtr &shape)
 
CmdPtr Commands::RemoveShapes (const QList< ShapePtr > &shapes)
 
CmdPtr Commands::Select (Document *doc, const QList< ShapePtr > &new_selections)
 
template<typename T , typename PropType , PropType(T::*)() const PropGetter, void(T::*)(PropType) PropSetter>
CmdPtr Commands::Set (T *target, PropType new_value)
 
template<typename T , typename PropType , const PropType &(T::*)() const PropGetter, void(T::*)(const PropType &) PropSetter>
CmdPtr Commands::SetRef (T *target, PropType new_value)
 

Variables

constexpr CmdPtr(* Commands::SetFont )(TextShape *, QFont)
 
constexpr CmdPtr(* Commands::SetLayer )(Shape *, Layer *)
 
constexpr CmdPtr(* Commands::SetLineHeight )(TextShape *, float)
 
constexpr CmdPtr(* Commands::SetParent )(Shape *, Shape *)
 
constexpr CmdPtr(* Commands::SetRotation )(Shape *, qreal)
 
constexpr CmdPtr(* Commands::SetTransform )(Shape *, QTransform)
 

Typedef Documentation

◆ CmdPtr