diff --git a/source/ArmarXGui/interface/WidgetDescription.ice b/source/ArmarXGui/interface/WidgetDescription.ice index 471b6f0bb1eccc2e5937ad10a5a27e6c3d794ab9..c1797d8eb93a37c7943c320763ff6e8ee51729e5 100644 --- a/source/ArmarXGui/interface/WidgetDescription.ice +++ b/source/ArmarXGui/interface/WidgetDescription.ice @@ -70,6 +70,12 @@ module armarx class VSpacer extends Widget { }; + class HLine extends Widget + { + }; + class VLine extends Widget + { + }; class Label extends Widget { string text; diff --git a/source/ArmarXGui/libraries/DefaultWidgetDescriptions/DefaultWidgetDescriptions.cpp b/source/ArmarXGui/libraries/DefaultWidgetDescriptions/DefaultWidgetDescriptions.cpp index 4d4f4cd0a8e7063e9dad5e152e73322894b0dc40..1dde818bf17e922289b2fc1ce6858017fadf4d44 100644 --- a/source/ArmarXGui/libraries/DefaultWidgetDescriptions/DefaultWidgetDescriptions.cpp +++ b/source/ArmarXGui/libraries/DefaultWidgetDescriptions/DefaultWidgetDescriptions.cpp @@ -129,6 +129,16 @@ namespace armarx return new VSpacer; } + HLinePtr makeHLine() + { + return new HLine; + } + + VLinePtr makeVLine() + { + return new VLine; + } + LabelPtr makeLabel(std::string text) { return new Label {false, std::move(text)}; diff --git a/source/ArmarXGui/libraries/DefaultWidgetDescriptions/DefaultWidgetDescriptions.h b/source/ArmarXGui/libraries/DefaultWidgetDescriptions/DefaultWidgetDescriptions.h index b6e3ea01b20332d5e28491d8add6ef85b403d0f4..c892d4b45c134c532749f0f87ee972266905eb45 100644 --- a/source/ArmarXGui/libraries/DefaultWidgetDescriptions/DefaultWidgetDescriptions.h +++ b/source/ArmarXGui/libraries/DefaultWidgetDescriptions/DefaultWidgetDescriptions.h @@ -47,6 +47,8 @@ namespace armarx HSpacerPtr makeHSpacer(); VSpacerPtr makeVSpacer(); + HLinePtr makeHLine(); + VLinePtr makeVLine(); LabelPtr makeLabel(std::string text); CheckBoxPtr makeCheckBox(std::string name, bool defaultValue, std::string label); diff --git a/source/ArmarXGui/libraries/WidgetDescription/WidgetDescription.cpp b/source/ArmarXGui/libraries/WidgetDescription/WidgetDescription.cpp index c6ac9565393de73a3e5cc2634b375b5c7e1d097c..70893ed57ae12d12cf9e588eb67ba943b8d95e02 100644 --- a/source/ArmarXGui/libraries/WidgetDescription/WidgetDescription.cpp +++ b/source/ArmarXGui/libraries/WidgetDescription/WidgetDescription.cpp @@ -204,6 +204,36 @@ namespace armarx }; DescribedWidgetFactoryRegistration<DescribedVSpacer> registerDescribedVSpacer {VSpacer::ice_staticId()}; + class DescribedHLine : public DescribedWidgetBase + { + public: + DescribedHLine(const WidgetPtr& p, ValueChangedListenerInterface*): DescribedWidgetBase(p) + { + setFrameShape(QFrame::HLine); + setFrameShadow(QFrame::Sunken); + } + virtual std::map<std::string, VariantBasePtr> getVariants() override + { + return {}; + } + }; + DescribedWidgetFactoryRegistration<DescribedHLine> registerDescribedHLine {HLine::ice_staticId()}; + + class DescribedVLine : public DescribedWidgetBase + { + public: + DescribedVLine(const WidgetPtr& p, ValueChangedListenerInterface*): DescribedWidgetBase(p) + { + setFrameShape(QFrame::VLine); + setFrameShadow(QFrame::Sunken); + } + virtual std::map<std::string, VariantBasePtr> getVariants() override + { + return {}; + } + }; + DescribedWidgetFactoryRegistration<DescribedVLine> registerDescribedVLine {VLine::ice_staticId()}; + class DescribedLabel : public DescribedWidgetBase { public: