Skip to content
Snippets Groups Projects
Commit e2a25616 authored by konstantin.kukharenko's avatar konstantin.kukharenko
Browse files

[+]New property Custom button

parent a40f4165
No related branches found
No related tags found
7 merge requests!26Feature 3349,!25Features 3332,!24Features 3168,!23Features 3167,!21Features 3259,!20Features 3257,!19Features 3176
......@@ -179,3 +179,21 @@ void CustomPlacementButton::setObjectName(const QString &name)
if (m_styledShadow)
m_styledShadow->updateStyleProperties();
}
void CustomPlacementButton::spacerActivate(ButtonSpaicer a_spacer)
{
switch(a_spacer)
{
case ButtonSpaicer::Left:
m_lbLeftSpacing.setVisible(true);
break;
case ButtonSpaicer::Right:
m_lbRightSpacing.setVisible(true);
break;
case ButtonSpaicer::Both:
m_lbRightSpacing.setVisible(true);
m_lbLeftSpacing.setVisible(true);
break;
}
}
......@@ -11,6 +11,7 @@
#include <QFontMetrics>
enum class ImagePos {Left, Right};
enum class ButtonSpaicer {Left,Right,Both};
/** @brief QPushButton with subControls "text" and "image"
*
......@@ -76,6 +77,9 @@ public:
void setImagePosition(ImagePos a_position = ImagePos::Left);
void setGraphicsEffect(StyledDropShadowEffect *a_effect);
///Makes widgets visible on the sides
/// @param a_spacer
void spacerActivate(ButtonSpaicer a_spacer);
private:
///For effect.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment