QSint::ActionGroup Class Reference

Class representing a single group of actions similar to Windows XP task panels. More...

#include <actiongroup.h>

Public Slots

void setExpandable (bool expandable=true)
 Makes the group expandable if expandable is set to true. More...
 
void setHeader (bool enable=true)
 Enables/disables group's header according to enable. More...
 
void setHeaderText (const QString &title)
 Sets text of the header to title. More...
 
void showHide ()
 Expands/collapses the group. More...
 

Public Member Functions

 ActionGroup (const QPixmap &icon, const QString &title, bool expandable=true, QWidget *parent=nullptr)
 Constructor. More...
 
 ActionGroup (const QString &title, bool expandable=true, QWidget *parent=nullptr)
 Constructor. More...
 
 ActionGroup (QWidget *parent=nullptr)
 Constructor. More...
 
ActionLabeladdAction (QAction *action, bool addToLayout=true, bool addStretch=true)
 Creates action item from the action and returns it. More...
 
ActionLabeladdActionLabel (ActionLabel *label, bool addToLayout=true, bool addStretch=true)
 Adds label to the group. More...
 
bool addWidget (QWidget *widget, bool addToLayout=true, bool addStretch=true)
 Adds widget to the group. More...
 
QBoxLayout * groupLayout ()
 Returns group's layout (QVBoxLayout by default). More...
 
bool hasHeader () const
 Returns true if the group has header. More...
 
QString headerText () const
 Returns text of the header. More...
 
bool isExpandable () const
 Returns true if the group is expandable. More...
 
QSize minimumSizeHint () const
 
void setScheme (ActionPanelScheme *pointer)
 Sets the scheme of the panel and all the child groups to scheme. More...
 

Protected Slots

void processHide ()
 
void processShow ()
 

Protected Member Functions

void init (bool header)
 
virtual void paintEvent (QPaintEvent *event)
 

Protected Attributes

double m_foldDelta
 
int m_foldDirection
 
QPixmap m_foldPixmap
 
double m_foldStep
 
double m_fullHeight
 
double m_tempHeight
 
QWidgetmyDummy
 
class TaskGroupmyGroup
 
class TaskHeadermyHeader
 
ActionPanelSchememyScheme
 

Properties

bool expandable
 
bool header
 
QString headerText
 

Detailed Description

Class representing a single group of actions similar to Windows XP task panels.

Since
0.2
An example of ActionGroup

ActionGroup consists from optional header and set of actions represented by ActionLabel. It can contain arbitrary widgets as well.

Constructor & Destructor Documentation

◆ ActionGroup() [1/3]

QSint::ActionGroup::ActionGroup ( QWidget parent = nullptr)
explicit

Constructor.

Creates ActionGroup without header.

References init(), and myHeader.

◆ ActionGroup() [2/3]

QSint::ActionGroup::ActionGroup ( const QString &  title,
bool  expandable = true,
QWidget parent = nullptr 
)
explicit

Constructor.

Creates ActionGroup with header's text set to title, but with no icon.

If expandable set to true (default), the group can be expanded/collapsed by the user.

References expandable, init(), and myHeader.

◆ ActionGroup() [3/3]

QSint::ActionGroup::ActionGroup ( const QPixmap &  icon,
const QString &  title,
bool  expandable = true,
QWidget parent = nullptr 
)
explicit

Constructor.

Creates ActionGroup with header's text set to title and icon set to icon.

If expandable set to true (default), the group can be expanded/collapsed by the user.

References expandable, init(), and myHeader.

Member Function Documentation

◆ addAction()

ActionLabel * QSint::ActionGroup::addAction ( QAction *  action,
bool  addToLayout = true,
bool  addStretch = true 
)

Creates action item from the action and returns it.

If addToLayout is set to true (default), the action is added to the default vertical layout, i.e. subsequent calls of this function will create several ActionLabels arranged vertically, one below another.

Set addToLayout to false if you want to add the action to the specified layout manually. This allows to do custom actions arrangements, i.e. horizontal etc.

If addStretch is set to true (default), ActionLabel will be automatically aligned to the left side of the ActionGroup. Set addStretch to false if you want ActionLabel to occupy all the horizontal space.

References QSint::TaskGroup::addActionLabel(), and myGroup.

Referenced by SandboxGui::TaskPanelView::TaskPanelView().

◆ addActionLabel()

ActionLabel * QSint::ActionGroup::addActionLabel ( ActionLabel label,
bool  addToLayout = true,
bool  addStretch = true 
)

Adds label to the group.

See also
addAction() for the description.

References QSint::TaskGroup::addActionLabel(), and myGroup.

Referenced by Gui::TaskView::TaskBox::actionEvent().

◆ addWidget()

bool QSint::ActionGroup::addWidget ( QWidget widget,
bool  addToLayout = true,
bool  addStretch = true 
)

Adds widget to the group.

Returns true if it has been added successfully.

See also
addAction() for the description.

References QSint::TaskGroup::addWidget(), and myGroup.

Referenced by SandboxGui::TaskPanelView::TaskPanelView().

◆ groupLayout()

QBoxLayout * QSint::ActionGroup::groupLayout ( )

Returns group's layout (QVBoxLayout by default).

References QSint::TaskGroup::groupLayout(), and myGroup.

Referenced by Gui::TaskView::TaskBox::hideGroupBox(), MeshInfoWatcher::MeshInfoWatcher(), FemGui::TaskAnalysisInfo::TaskAnalysisInfo(), Gui::TaskView::TaskAppearance::TaskAppearance(), PartGui::TaskAttacher::TaskAttacher(), PartGui::TaskBooleanOperation::TaskBooleanOperation(), PartDesignGui::TaskBooleanParameters::TaskBooleanParameters(), Gui::TaskBoxAngle::TaskBoxAngle(), Gui::TaskBoxPosition::TaskBoxPosition(), PartDesignGui::TaskBoxPrimitives::TaskBoxPrimitives(), PartGui::TaskChamferEdges::TaskChamferEdges(), PartDesignGui::TaskChamferParameters::TaskChamferParameters(), PartGui::TaskCheckGeometryDialog::TaskCheckGeometryDialog(), FemGui::TaskCreateNodeSet::TaskCreateNodeSet(), MeshPartGui::TaskCrossSections::TaskCrossSections(), PartGui::TaskCrossSections::TaskCrossSections(), MeshPartGui::TaskCurveOnMesh::TaskCurveOnMesh(), MeshGui::TaskDecimating::TaskDecimating(), Gui::TaskView::TaskDialogPython::TaskDialogPython(), Gui::Dialog::TaskDisplayProperties::TaskDisplayProperties(), TechDrawGui::TaskDlgActiveView::TaskDlgActiveView(), TechDrawGui::TaskDlgAlignViews::TaskDlgAlignViews(), TechDrawGui::TaskDlgBalloon::TaskDlgBalloon(), TechDrawGui::TaskDlgCenterLine::TaskDlgCenterLine(), TechDrawGui::TaskDlgCosmeticLine::TaskDlgCosmeticLine(), TechDrawGui::TaskDlgCosVertex::TaskDlgCosVertex(), TechDrawGui::TaskDlgCustomizeFormat::TaskDlgCustomizeFormat(), TechDrawGui::TaskDlgDetail::TaskDlgDetail(), TechDrawGui::TaskDlgDimension::TaskDlgDimension(), TechDrawGui::TaskDlgGeomHatch::TaskDlgGeomHatch(), TechDrawGui::TaskDlgHatch::TaskDlgHatch(), TechDrawGui::TaskDlgLeaderLine::TaskDlgLeaderLine(), TechDrawGui::TaskDlgLineDecor::TaskDlgLineDecor(), TechDrawGui::TaskDlgLinkDim::TaskDlgLinkDim(), DrawingGui::TaskDlgOrthoViews::TaskDlgOrthoViews(), TechDrawGui::TaskDlgProjection::TaskDlgProjection(), TechDrawGui::TaskDlgProjGroup::TaskDlgProjGroup(), TechDrawGui::TaskDlgRichAnno::TaskDlgRichAnno(), TechDrawGui::TaskDlgSectionView::TaskDlgSectionView(), TechDrawGui::TaskDlgSelectLineAttributes::TaskDlgSelectLineAttributes(), TechDrawGui::TaskDlgWeldingSymbol::TaskDlgWeldingSymbol(), PartDesignGui::TaskDraftParameters::TaskDraftParameters(), FemGui::TaskDriver::TaskDriver(), RobotGui::TaskEdge2TracParameter::TaskEdge2TracParameter(), Gui::TaskElementColors::TaskElementColors(), PartDesignGui::TaskExtrudeParameters::TaskExtrudeParameters(), PartGui::TaskExtrusion::TaskExtrusion(), PartGui::TaskFaceColors::TaskFaceColors(), PartDesignGui::TaskFeaturePick::TaskFeaturePick(), FemGui::TaskFemConstraintBearing::TaskFemConstraintBearing(), FemGui::TaskFemConstraintContact::TaskFemConstraintContact(), FemGui::TaskFemConstraintDisplacement::TaskFemConstraintDisplacement(), FemGui::TaskFemConstraintFixed::TaskFemConstraintFixed(), FemGui::TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary(), FemGui::TaskFemConstraintForce::TaskFemConstraintForce(), FemGui::TaskFemConstraintHeatflux::TaskFemConstraintHeatflux(), FemGui::TaskFemConstraintInitialTemperature::TaskFemConstraintInitialTemperature(), FemGui::TaskFemConstraintPlaneRotation::TaskFemConstraintPlaneRotation(), FemGui::TaskFemConstraintPressure::TaskFemConstraintPressure(), FemGui::TaskFemConstraintSpring::TaskFemConstraintSpring(), FemGui::TaskFemConstraintTemperature::TaskFemConstraintTemperature(), FemGui::TaskFemConstraintTransform::TaskFemConstraintTransform(), PartGui::TaskFilletEdges::TaskFilletEdges(), PartDesignGui::TaskFilletParameters::TaskFilletParameters(), SurfaceGui::TaskFilling::TaskFilling(), ReenGui::TaskFitBSplineSurface::TaskFitBSplineSurface(), PartDesignGui::TaskHelixParameters::TaskHelixParameters(), PartDesignGui::TaskHoleParameters::TaskHoleParameters(), PartDesignGui::TaskLinearPatternParameters::TaskLinearPatternParameters(), PartGui::TaskLoft::TaskLoft(), PartDesignGui::TaskLoftParameters::TaskLoftParameters(), PartDesignGui::TaskMirroredParameters::TaskMirroredParameters(), PartGui::TaskMirroring::TaskMirroring(), PartDesignGui::TaskMultiTransformParameters::TaskMultiTransformParameters(), FemGui::TaskObjectName::TaskObjectName(), PartGui::TaskOffset::TaskOffset(), SandboxGui::TaskPanelView::TaskPanelView(), PartDesignGui::TaskPipeOrientation::TaskPipeOrientation(), PartDesignGui::TaskPipeParameters::TaskPipeParameters(), PartDesignGui::TaskPipeScaling::TaskPipeScaling(), Gui::Dialog::TaskPlacement::TaskPlacement(), ReenGui::TaskPoisson::TaskPoisson(), PartDesignGui::TaskPolarPatternParameters::TaskPolarPatternParameters(), FemGui::TaskPostClip::TaskPostClip(), FemGui::TaskPostCut::TaskPostCut(), FemGui::TaskPostDataAlongLine::TaskPostDataAlongLine(), FemGui::TaskPostDataAtPoint::TaskPostDataAtPoint(), FemGui::TaskPostDisplay::TaskPostDisplay(), FemGui::TaskPostFunction::TaskPostFunction(), FemGui::TaskPostScalarClip::TaskPostScalarClip(), FemGui::TaskPostWarpVector::TaskPostWarpVector(), PartGui::TaskPrimitives::TaskPrimitives(), PartGui::TaskPrimitivesEdit::TaskPrimitivesEdit(), DrawingGui::TaskProjection::TaskProjection(), PartGui::TaskProjectionOnSurface::TaskProjectionOnSurface(), MeshGui::TaskRemeshGmsh::TaskRemeshGmsh(), MeshGui::TaskRemoveComponents::TaskRemoveComponents(), PartGui::TaskRevolution::TaskRevolution(), PartDesignGui::TaskRevolutionParameters::TaskRevolutionParameters(), RobotGui::TaskRobot6Axis::TaskRobot6Axis(), RobotGui::TaskRobotControl::TaskRobotControl(), RobotGui::TaskRobotMessages::TaskRobotMessages(), PartDesignGui::TaskScaledParameters::TaskScaledParameters(), SurfaceGui::TaskSections::TaskSections(), MeshGui::TaskSegmentation::TaskSegmentation(), ReverseEngineeringGui::TaskSegmentation::TaskSegmentation(), MeshGui::TaskSegmentationBestFit::TaskSegmentationBestFit(), ReverseEngineeringGui::TaskSegmentationManual::TaskSegmentationManual(), Gui::TaskView::TaskSelectLinkProperty::TaskSelectLinkProperty(), PartDesignGui::TaskShapeBinder::TaskShapeBinder(), PartGui::TaskShapeBuilder::TaskShapeBuilder(), SketcherGui::TaskSketcherConstraints::TaskSketcherConstraints(), SketcherGui::TaskSketcherElements::TaskSketcherElements(), SketcherGui::TaskSketcherGeneral::TaskSketcherGeneral(), SketcherGui::TaskSketcherMessages::TaskSketcherMessages(), SketcherGui::TaskSketcherSolverAdvanced::TaskSketcherSolverAdvanced(), SketcherGui::TaskSketcherValidation::TaskSketcherValidation(), MeshGui::TaskSmoothing::TaskSmoothing(), PartGui::TaskSweep::TaskSweep(), MeshPartGui::TaskTessellation::TaskTessellation(), FemGui::TaskTetParameter::TaskTetParameter(), Gui::Dialog::TaskTextureMapping::TaskTextureMapping(), PartGui::TaskThickness::TaskThickness(), PartDesignGui::TaskThicknessParameters::TaskThicknessParameters(), RobotGui::TaskTrajectory::TaskTrajectory(), RobotGui::TaskTrajectoryDressUpParameter::TaskTrajectoryDressUpParameter(), Gui::Dialog::TaskTransform::TaskTransform(), PartDesignGui::TaskTransformedMessages::TaskTransformedMessages(), Gui::TaskView::TaskWatcherPython::TaskWatcherPython(), and PathGui::TaskWidgetPathCompound::TaskWidgetPathCompound().

◆ hasHeader()

bool QSint::ActionGroup::hasHeader ( ) const

Returns true if the group has header.

See also
setHeader().

References myHeader.

◆ headerText()

QString QSint::ActionGroup::headerText ( ) const

Returns text of the header.

Only valid if the group has header (see hasHeader()).

See also
setHeaderText().

References myHeader, and QSint::TaskHeader::myTitle.

◆ init()

◆ isExpandable()

bool QSint::ActionGroup::isExpandable ( ) const

Returns true if the group is expandable.

See also
setExpandable().

References QSint::TaskHeader::expandable(), and myHeader.

◆ minimumSizeHint()

QSize QSint::ActionGroup::minimumSizeHint ( ) const

◆ paintEvent()

◆ processHide

void QSint::ActionGroup::processHide ( )
protectedslot

◆ processShow

◆ setExpandable

void QSint::ActionGroup::setExpandable ( bool  expandable = true)
slot

Makes the group expandable if expandable is set to true.

See also
isExpandable().

References expandable, myHeader, and QSint::TaskHeader::setExpandable().

◆ setHeader

void QSint::ActionGroup::setHeader ( bool  enable = true)
slot

Enables/disables group's header according to enable.

See also
hasHeader().

References myHeader.

◆ setHeaderText

void QSint::ActionGroup::setHeaderText ( const QString &  title)
slot

Sets text of the header to title.

Only valid if the group has header (see hasHeader()).

See also
headerText().

References headerText, myHeader, and QSint::TaskHeader::myTitle.

◆ setScheme()

void QSint::ActionGroup::setScheme ( ActionPanelScheme pointer)

Sets the scheme of the panel and all the child groups to scheme.

By default, ActionPanelScheme::defaultScheme() is used.

References myGroup, myHeader, myScheme, QSint::TaskGroup::setScheme(), and QSint::TaskHeader::setScheme().

◆ showHide

Member Data Documentation

◆ m_foldDelta

double QSint::ActionGroup::m_foldDelta
protected

◆ m_foldDirection

int QSint::ActionGroup::m_foldDirection
protected

◆ m_foldPixmap

QPixmap QSint::ActionGroup::m_foldPixmap
protected

◆ m_foldStep

double QSint::ActionGroup::m_foldStep
protected

◆ m_fullHeight

double QSint::ActionGroup::m_fullHeight
protected

◆ m_tempHeight

double QSint::ActionGroup::m_tempHeight
protected

◆ myDummy

QWidget* QSint::ActionGroup::myDummy
protected

◆ myGroup

◆ myHeader

◆ myScheme

Property Documentation

◆ expandable

bool QSint::ActionGroup::expandable
readwrite

Referenced by ActionGroup(), and setExpandable().

◆ header

bool QSint::ActionGroup::header
readwrite

Referenced by init().

◆ headerText

QString QSint::ActionGroup::headerText
readwrite

Referenced by setHeaderText().


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