26 #define YUILogComponent "ui" 30 #include "YApplication.h" 32 #include "YUISymbols.h" 33 #include "YPushButton.h" 42 , isDefaultButton(
false )
43 , setDefaultButtonRecursive(
false )
44 , isHelpButton(
false )
45 , isRelNotesButton(
false )
46 , role( YCustomButton )
51 bool setDefaultButtonRecursive;
53 bool isRelNotesButton;
94 return priv->isDefaultButton;
102 if ( ! priv->setDefaultButtonRecursive )
107 priv->setDefaultButtonRecursive =
true;
113 if ( isDefaultButton )
122 priv->setDefaultButtonRecursive =
false;
129 return priv->isHelpButton;
135 priv->isHelpButton = helpButton;
136 priv->role = YHelpButton;
141 return priv->isRelNotesButton;
147 priv->isRelNotesButton = relNotesButton;
148 priv->role = YRelNotesButton;
170 yuiMilestone() <<
"Guessing function key F" <<
functionKey()
172 <<
" from button role " << priv->role
189 YButtonRole oldRole = priv->role;
191 if (priv->role == YCustomButton)
195 case 10: priv->role = YOKButton;
break;
196 case 9: priv->role = YCancelButton;
break;
197 case 1: priv->role = YHelpButton;
break;
200 if ( priv->role != oldRole )
202 yuiMilestone() <<
"Guessing button role " << priv->role
221 propSet.
add(
YProperty( YUIProperty_Label, YStringProperty ) );
257 std::ostream & operator<<( std::ostream & stream, YButtonRole
role )
261 case YCustomButton: stream <<
"YCustomButton";
break;
262 case YOKButton: stream <<
"YOKButton";
break;
263 case YApplyButton: stream <<
"YApplyButton";
break;
264 case YCancelButton: stream <<
"YCancelButton";
break;
265 case YHelpButton: stream <<
"YHelpButton";
break;
266 case YRelNotesButton: stream <<
"YRelNotesButton";
break;
269 stream <<
"<Undefined button role #" << (int) role <<
">";
bool isEmpty() const
Returns 'true' if this property set does not contain anything.
virtual void setDefaultButton(YPushButton *defaultButton)
Set this dialog's default button (the button that is activated when the user hits [Return] anywhere i...
int defaultFunctionKey(const std::string &label) const
Return the default function key number for a widget with the specified label or 0 if there is none...
Transport class for the value of simple properties.
void add(const YProperty &prop)
Add a property to this property set.
A set of properties to check names and types against.
std::string stringVal() const
Methods to get the value of this property.
Class for widget properties.
static YApplication * app()
Return the global YApplication object.
YPushButton * defaultButton() const
Return this dialog's default button: The button that is activated when the user hits [Return] anywher...
A window in the desktop environment.
void check(const std::string &propertyName) const
Check if a property 'propertyName' exists in this property set.
YPropertyType type() const
Returns the type of this property value.