19 #include "kstdguiitem.h"
23 #include <tdeapplication.h>
25 KGuiItem KStdGuiItem::guiItem ( StdItem ui_enum )
28 case Ok :
return ok();
29 case Cancel :
return cancel();
30 case Yes :
return yes();
31 case No :
return no();
32 case Discard :
return discard();
33 case Save :
return save();
34 case DontSave :
return dontSave();
35 case SaveAs :
return saveAs();
36 case Apply :
return apply();
37 case Clear :
return clear();
38 case Help :
return help();
39 case Close :
return close();
40 case Defaults :
return defaults();
41 case Back :
return back();
42 case Forward :
return forward();
43 case Print :
return print();
44 case Continue :
return cont();
45 case Open :
return open();
46 case Quit :
return quit();
48 case Reset :
return reset();
49 case Delete :
return del();
50 case Insert :
return insert();
62 TQString KStdGuiItem::stdItem( StdItem ui_enum )
65 case Ok :
return TQString::fromLatin1(
"ok");
66 case Cancel :
return TQString::fromLatin1(
"cancel");
67 case Yes :
return TQString::fromLatin1(
"yes");
68 case No :
return TQString::fromLatin1(
"no");
69 case Discard :
return TQString::fromLatin1(
"discard");
70 case Save :
return TQString::fromLatin1(
"save");
71 case DontSave :
return TQString::fromLatin1(
"dontSave");
72 case SaveAs :
return TQString::fromLatin1(
"saveAs");
73 case Apply :
return TQString::fromLatin1(
"apply");
74 case Help :
return TQString::fromLatin1(
"help");
75 case Close :
return TQString::fromLatin1(
"close");
76 case Defaults :
return TQString::fromLatin1(
"defaults");
77 case Back :
return TQString::fromLatin1(
"back");
78 case Forward :
return TQString::fromLatin1(
"forward");
79 case Print :
return TQString::fromLatin1(
"print");
80 case Continue :
return TQString::fromLatin1(
"continue");
81 case Open :
return TQString::fromLatin1(
"open");
82 case Quit :
return TQString::fromLatin1(
"quit");
83 case AdminMode:
return TQString::fromLatin1(
"adminMode");
84 case Delete :
return TQString::fromLatin1(
"delete");
85 case Insert :
return TQString::fromLatin1(
"insert");
86 case Find :
return TQString::fromLatin1(
"find");
87 case Stop :
return TQString::fromLatin1(
"stop");
88 case Add :
return TQString::fromLatin1(
"add");
89 case Remove :
return TQString::fromLatin1(
"remove");
90 case Test :
return TQString::fromLatin1(
"test");
91 case Properties :
return TQString::fromLatin1(
"properties");
92 case Overwrite :
return TQString::fromLatin1(
"overwrite");
93 default :
return TQString::null;
99 return KGuiItem( i18n(
"&OK" ),
"button_ok" );
105 return KGuiItem( i18n(
"&Cancel" ),
"button_cancel" );
110 return KGuiItem( i18n(
"&Yes" ),
"button_ok", i18n(
"Yes" ) );
115 return KGuiItem( i18n(
"&No" ),
"window-close", i18n(
"No" ) );
120 return KGuiItem( i18n(
"&Discard" ),
"edittrash", i18n(
"Discard changes" ),
121 i18n(
"Pressing this button will discard all recent "
122 "changes made in this dialog" ) );
127 return KGuiItem( i18n(
"&Save" ),
"document-save", i18n(
"Save data" ) );
132 return KGuiItem( i18n(
"&Do Not Save" ),
"edittrash",
133 i18n(
"Don't save data" ) );
138 return KGuiItem( i18n(
"Save &As..." ),
"document-save-as",
139 i18n(
"Save file with another name" ) );
144 return KGuiItem( i18n(
"&Apply" ),
"apply", i18n(
"Apply changes" ),
145 i18n(
"When clicking <b>Apply</b>, the settings will be "
146 "handed over to the program, but the dialog "
147 "will not be closed.\n"
148 "Use this to try different settings." ) );
153 return KGuiItem( i18n(
"Administrator &Mode..." ),
"wizard", i18n(
"Enter Administrator Mode" ),
154 i18n(
"When clicking <b>Administrator Mode</b> you will be prompted "
155 "for the administrator (root) password in order to make changes "
156 "which require root privileges." ) );
161 return KGuiItem( i18n(
"C&lear" ),
"locationbar_erase",
162 i18n(
"Clear input" ),
163 i18n(
"Clear the input in the edit field" ) );
168 return KGuiItem( i18n(
"show help",
"&Help" ),
"help",
169 i18n(
"Show help" ) );
174 return KGuiItem( i18n(
"&Close" ),
"window-close",
175 i18n(
"Close the current window or document" ) );
180 return KGuiItem( i18n(
"&Defaults" ),
"reload",
181 i18n(
"Reset all items to their default values" ) );
186 TQString icon = ( useBidi == UseRTL && TQApplication::reverseLayout() )
187 ?
"forward" :
"back";
188 return KGuiItem( i18n(
"go back",
"&Back" ), icon,
189 i18n(
"Go back one step" ) );
194 TQString icon = ( useBidi == UseRTL && TQApplication::reverseLayout() )
195 ?
"back" :
"forward";
196 return KGuiItem( i18n(
"go forward",
"&Forward" ), icon,
197 i18n(
"Go forward one step" ) );
202 return qMakePair(
back( UseRTL ),
forward( UseRTL ) );
207 return KGuiItem( i18n(
"&Print..." ),
"document-print",
208 i18n(
"Opens the print dialog to print "
209 "the current document" ) );
214 return KGuiItem( i18n(
"C&ontinue" ), TQString::null,
215 i18n(
"Continue operation" ) );
220 return KGuiItem( i18n(
"&Delete" ),
"edit-delete",
221 i18n(
"Delete item(s)" ) );
226 return KGuiItem( i18n(
"&Open..." ),
"document-open",
227 i18n(
"Open file" ) );
232 return KGuiItem( i18n(
"&Quit" ),
"system-log-out",
233 i18n(
"Quit application" ) );
238 return KGuiItem( i18n(
"&Reset" ),
"edit-undo",
239 i18n(
"Reset configuration" ) );
244 return KGuiItem( i18n(
"Verb",
"&Insert" ),
"edit-paste");
249 return KGuiItem( i18n(
"Confi&gure..." ),
"configure" );
254 return KGuiItem( i18n(
"&Find"),
"edit-find" );
259 return KGuiItem( i18n(
"Stop"),
"process-stop" );
264 return KGuiItem( i18n(
"Add"),
"add" );
269 return KGuiItem( i18n(
"Remove"),
"remove" );
279 return KGuiItem( i18n(
"Properties"),
"document-properties" );
284 return KGuiItem( i18n(
"&Overwrite"),
"document-save-as" );
An abstract class for GUI data such as ToolTip and Icon.
static KGuiItem remove()
Returns a "remove" item.
static KGuiItem test()
Returns a "test" item.
static KGuiItem configure()
Returns a "configure" item.
BidiMode
The back and forward items by default use the RTL settings for Hebrew and Arab countries.
static KGuiItem back(BidiMode useBidi=IgnoreRTL)
Return a GUI item for a 'back' action, like Konqueror's back button.
static KGuiItem adminMode()
Returns a KGuiItem suiting for cases where code or functionality runs under root privileges.
static KGuiItem forward(BidiMode useBidi=IgnoreRTL)
Return a GUI item for a 'forward' action, like Konqueror's forward button.
static KGuiItem properties()
static KGuiItem add()
Returns a "add" item.
static KGuiItem stop()
Returns a "stop" item.
static KGuiItem find()
Returns a "find" item.
static KGuiItem overwrite()
static KGuiItem cont()
Returns a "continue" item.
static TQPair< KGuiItem, KGuiItem > backAndForward()
Return both a back and a forward item.
static KGuiItem del()
Returns a "delete" item.