karbon

#include <vdistributecmd.h>

Inheritance diagram for VDistributeCmd:
VCommand VVisitor

Public Types

enum  Distribute {
  DISTRIBUTE_HORIZONTAL_CENTER , DISTRIBUTE_HORIZONTAL_GAP , DISTRIBUTE_HORIZONTAL_LEFT , DISTRIBUTE_HORIZONTAL_RIGHT ,
  DISTRIBUTE_VERTICAL_CENTER , DISTRIBUTE_VERTICAL_GAP , DISTRIBUTE_VERTICAL_BOTTOM , DISTRIBUTE_VERTICAL_TOP
}
 

Public Member Functions

 VDistributeCmd (VDocument *doc, Distribute distribute)
 
virtual void execute ()
 
virtual void unexecute ()
 
virtual bool changesSelection () const
 
- Public Member Functions inherited from VCommand
 VCommand (VDocument *doc, const TQString &name, const TQString &icon="14_action")
 
virtual ~VCommand ()
 
TQString name () const
 
void setName (const TQString &name)
 
TQString icon () const
 
VDocument * document () const
 
- Public Member Functions inherited from VVisitor
 VVisitor ()
 
virtual bool visit (VObject &object)
 
virtual void visitVObject (VObject &object)
 
virtual void visitVPath (VPath &composite)
 
virtual void visitVDocument (VDocument &document)
 
virtual void visitVGroup (VGroup &group)
 
virtual void visitVLayer (VLayer &layer)
 
virtual void visitVSubpath (VSubpath &path)
 
virtual void visitVSelection (VSelection &selection)
 
virtual void visitVText (VText &text)
 
virtual void visitVImage (VImage &img)
 
bool success () const
 

Protected Member Functions

double getAvailableSpace (VObject *first, VObject *last, double extent)
 
- Protected Member Functions inherited from VVisitor
virtual ~VVisitor ()
 
void setSuccess (bool success=true)
 

Protected Attributes

Distribute m_distribute
 
TQPtrList< VTranslateCmd > m_trafoCmds
 

Detailed Description

A command for distributing objects.

Definition at line 29 of file vdistributecmd.h.

Member Enumeration Documentation

◆ Distribute

enum VDistributeCmd::Distribute

Definition at line 32 of file vdistributecmd.h.

Constructor & Destructor Documentation

◆ VDistributeCmd()

VDistributeCmd::VDistributeCmd ( VDocument *  doc,
Distribute  distribute 
)

Definition at line 28 of file vdistributecmd.cpp.

◆ ~VDistributeCmd()

VDistributeCmd::~VDistributeCmd ( )
virtual

Definition at line 34 of file vdistributecmd.cpp.

Member Function Documentation

◆ changesSelection()

virtual bool VDistributeCmd::changesSelection ( ) const
inlinevirtual

Returns if the command changes the actual document selection.

This flag is checked to determine if the document has to be redrawn.

Returns
true if the selection is changed, else false

Reimplemented from VCommand.

Definition at line 48 of file vdistributecmd.h.

◆ execute()

void VDistributeCmd::execute ( )
virtual

Executes the command.

All the changes to the document are done here. All commands have to implement this function.

Implements VCommand.

Definition at line 39 of file vdistributecmd.cpp.

◆ getAvailableSpace()

double VDistributeCmd::getAvailableSpace ( VObject *  first,
VObject *  last,
double  extent 
)
protected

Definition at line 165 of file vdistributecmd.cpp.

◆ unexecute()

void VDistributeCmd::unexecute ( )
virtual

Unexecutes the command.

All changes to the document have to be undone here.

Reimplemented from VCommand.

Definition at line 156 of file vdistributecmd.cpp.

Member Data Documentation

◆ m_distribute

Distribute VDistributeCmd::m_distribute
protected

Definition at line 53 of file vdistributecmd.h.

◆ m_trafoCmds

TQPtrList<VTranslateCmd> VDistributeCmd::m_trafoCmds
protected

Definition at line 54 of file vdistributecmd.h.


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