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... | |
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 |
Class representing a single group of actions similar to Windows XP task panels.
ActionGroup consists from optional header and set of actions represented by ActionLabel. It can contain arbitrary widgets as well.
|
explicit |
|
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.
|
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.
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().
ActionLabel * QSint::ActionGroup::addActionLabel | ( | ActionLabel * | label, |
bool | addToLayout = true , |
||
bool | addStretch = true |
||
) |
Adds label to the group.
References QSint::TaskGroup::addActionLabel(), and myGroup.
Referenced by Gui::TaskView::TaskBox::actionEvent().
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.
References QSint::TaskGroup::addWidget(), and myGroup.
Referenced by SandboxGui::TaskPanelView::TaskPanelView().
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().
bool QSint::ActionGroup::hasHeader | ( | ) | const |
QString QSint::ActionGroup::headerText | ( | ) | const |
Returns text of the header.
Only valid if the group has header (see hasHeader()).
References myHeader, and QSint::TaskHeader::myTitle.
|
protected |
References draftgeoutils.intersections::connect(), QSint::ActionPanelScheme::defaultScheme(), header, m_foldStep, myDummy, myGroup, myHeader, myScheme, and showHide().
Referenced by ActionGroup(), and DocumentObject.DocumentObject::onChanged().
bool QSint::ActionGroup::isExpandable | ( | ) | const |
Returns true if the group is expandable.
References QSint::TaskHeader::expandable(), and myHeader.
QSize QSint::ActionGroup::minimumSizeHint | ( | ) | const |
Referenced by Gui::TaskView::TaskBox::minimumSizeHint().
|
protectedvirtual |
|
protectedslot |
References QSint::ActionPanelScheme::groupFoldDelay, m_foldDelta, m_foldStep, m_tempHeight, myDummy, myHeader, myScheme, processHide(), and QSint::TaskHeader::setFold().
Referenced by processHide(), and showHide().
|
protectedslot |
References QSint::ActionPanelScheme::groupFoldDelay, m_foldDelta, m_foldPixmap, m_foldStep, m_fullHeight, m_tempHeight, myDummy, myGroup, myHeader, myScheme, processShow(), and QSint::TaskHeader::setFold().
Referenced by processShow(), and showHide().
|
slot |
Makes the group expandable if expandable is set to true.
References expandable, myHeader, and QSint::TaskHeader::setExpandable().
|
slot |
|
slot |
Sets text of the header to title.
Only valid if the group has header (see hasHeader()).
References headerText, myHeader, and QSint::TaskHeader::myTitle.
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().
|
slot |
Expands/collapses the group.
Only valid if the group has header (see hasHeader()).
References QSint::TaskHeader::expandable(), QSint::ActionPanelScheme::groupFoldDelay, QSint::ActionPanelScheme::groupFoldSteps, m_foldDelta, m_foldDirection, m_foldPixmap, m_foldStep, m_fullHeight, m_tempHeight, myDummy, myGroup, myHeader, myScheme, processHide(), processShow(), and QSint::TaskGroup::transparentRender().
Referenced by init().
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), processHide(), processShow(), and showHide().
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), paintEvent(), and showHide().
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), paintEvent(), processShow(), and showHide().
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), init(), paintEvent(), processHide(), processShow(), and showHide().
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), processShow(), and showHide().
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), processHide(), processShow(), and showHide().
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), init(), paintEvent(), processHide(), processShow(), and showHide().
|
protected |
|
protected |
|
protected |
Referenced by Gui::TaskView::TaskBox::hideGroupBox(), init(), paintEvent(), processHide(), processShow(), setScheme(), and showHide().
|
readwrite |
Referenced by ActionGroup(), and setExpandable().
|
readwrite |
Referenced by setHeaderText().