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=0) | |
Constructor. More... | |
ActionGroup (const QString &title, bool expandable=true, QWidget *parent=0) | |
Constructor. More... | |
ActionGroup (QWidget *parent=0) | |
Constructor. More... | |
ActionLabel * | addAction (QAction *action, bool addToLayout=true, bool addStretch=true) |
Creates action item from the action and returns it. More... | |
ActionLabel * | addActionLabel (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 |
QWidget * | myDummy |
class TaskGroup * | myGroup |
class TaskHeader * | myHeader |
ActionPanelScheme * | myScheme |
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
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]
|
explicit |
Constructor.
Creates ActionGroup without header.
◆ ActionGroup() [2/3]
|
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.
◆ ActionGroup() [3/3]
|
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.
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.
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.
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 m_foldStep.
Referenced by SandboxGui::TaskPanelView::TaskPanelView().
◆ groupLayout()
QBoxLayout * QSint::ActionGroup::groupLayout | ( | ) |
Returns group's layout (QVBoxLayout by default).
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(), Gui::Dialog::TaskClipping::TaskClipping(), 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::TaskDlgBalloon::TaskDlgBalloon(), TechDrawGui::TaskDlgCenterLine::TaskDlgCenterLine(), TechDrawGui::TaskDlgCosVertex::TaskDlgCosVertex(), TechDrawGui::TaskDlgDetail::TaskDlgDetail(), TechDrawGui::TaskDlgGeomHatch::TaskDlgGeomHatch(), TechDrawGui::TaskDlgHatch::TaskDlgHatch(), TechDrawGui::TaskDlgLeaderLine::TaskDlgLeaderLine(), TechDrawGui::TaskDlgLineDecor::TaskDlgLineDecor(), TechDrawGui::TaskDlgLinkDim::TaskDlgLinkDim(), DrawingGui::TaskDlgOrthoViews::TaskDlgOrthoViews(), TechDrawGui::TaskDlgProjGroup::TaskDlgProjGroup(), TechDrawGui::TaskDlgRichAnno::TaskDlgRichAnno(), TechDrawGui::TaskDlgSectionView::TaskDlgSectionView(), TechDrawGui::TaskDlgWeldingSymbol::TaskDlgWeldingSymbol(), PartDesignGui::TaskDraftParameters::TaskDraftParameters(), FemGui::TaskDriver::TaskDriver(), RobotGui::TaskEdge2TracParameter::TaskEdge2TracParameter(), Gui::TaskElementColors::TaskElementColors(), 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::TaskFemConstraintTemperature::TaskFemConstraintTemperature(), FemGui::TaskFemConstraintTransform::TaskFemConstraintTransform(), PartGui::TaskFilletEdges::TaskFilletEdges(), PartDesignGui::TaskFilletParameters::TaskFilletParameters(), SurfaceGui::TaskFilling::TaskFilling(), ReenGui::TaskFitBSplineSurface::TaskFitBSplineSurface(), 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(), PartDesignGui::TaskPadParameters::TaskPadParameters(), SandboxGui::TaskPanelView::TaskPanelView(), PartDesignGui::TaskPipeOrientation::TaskPipeOrientation(), PartDesignGui::TaskPipeParameters::TaskPipeParameters(), PartDesignGui::TaskPipeScaling::TaskPipeScaling(), Gui::Dialog::TaskPlacement::TaskPlacement(), PartDesignGui::TaskPocketParameters::TaskPocketParameters(), 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(), 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(), MeshGui::TaskSegmentation::TaskSegmentation(), ReverseEngineeringGui::TaskSegmentation::TaskSegmentation(), MeshGui::TaskSegmentationBestFit::TaskSegmentationBestFit(), ReverseEngineeringGui::TaskSegmentationManual::TaskSegmentationManual(), Gui::TaskView::TaskSelectLinkProperty::TaskSelectLinkProperty(), PartDesignGui::TaskShapeBinder::TaskShapeBinder(), PartGui::TaskShapeBuilder::TaskShapeBuilder(), SketcherGui::TaskSketcherConstrains::TaskSketcherConstrains(), 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 |
◆ headerText()
QString QSint::ActionGroup::headerText | ( | ) | const |
Returns text of the header.
Only valid if the group has header (see hasHeader()).
- See also
- setHeaderText().
◆ init()
|
protected |
Referenced by DocumentObject.DocumentObject::onChanged().
◆ isExpandable()
bool QSint::ActionGroup::isExpandable | ( | ) | const |
Returns true if the group is expandable.
- See also
- setExpandable().
References expandable, myHeader, and QSint::TaskHeader::setExpandable().
◆ minimumSizeHint()
QSize QSint::ActionGroup::minimumSizeHint | ( | ) | const |
Referenced by Gui::TaskView::TaskBox::minimumSizeHint().
◆ paintEvent()
|
protectedvirtual |
◆ processHide
|
protectedslot |
Referenced by showHide().
◆ processShow
|
protectedslot |
◆ setExpandable
|
slot |
Makes the group expandable if expandable is set to true.
- See also
- isExpandable().
References myHeader.
◆ setHeader
|
slot |
Enables/disables group's header according to enable.
- See also
- hasHeader().
References myHeader, and QSint::TaskHeader::myTitle.
◆ setHeaderText
|
slot |
Sets text of the header to title.
Only valid if the group has header (see hasHeader()).
- See also
- headerText().
◆ 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.
◆ showHide
|
slot |
Expands/collapses the group.
Only valid if the group has header (see hasHeader()).
References QSint::ActionPanelScheme::groupFoldDelay, QSint::ActionPanelScheme::groupFoldSteps, m_foldDelta, m_foldDirection, m_foldPixmap, m_foldStep, m_fullHeight, m_tempHeight, myDummy, myGroup, myScheme, processHide(), and QSint::TaskGroup::transparentRender().
Member Data Documentation
◆ m_foldDelta
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), and showHide().
◆ m_foldDirection
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), paintEvent(), and showHide().
◆ m_foldPixmap
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), paintEvent(), and showHide().
◆ m_foldStep
|
protected |
Referenced by addWidget(), Gui::TaskView::TaskBox::hideGroupBox(), paintEvent(), and showHide().
◆ m_fullHeight
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), and showHide().
◆ m_tempHeight
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), and showHide().
◆ myDummy
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), paintEvent(), and showHide().
◆ myGroup
|
protected |
◆ myHeader
|
protected |
Referenced by hasHeader(), Gui::TaskView::TaskBox::hideGroupBox(), isExpandable(), setExpandable(), and setHeader().
◆ myScheme
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), paintEvent(), and showHide().
Property Documentation
◆ expandable
|
readwrite |
Referenced by isExpandable().
◆ header
|
readwrite |
◆ headerText
|
readwrite |
The documentation for this class was generated from the following files:
- src/Gui/QSint/actionpanel/actiongroup.h
- src/Gui/QSint/actionpanel/actiongroup.cpp