35 #include <tdeglobal.h>
36 #include <tdeapplication.h>
37 #include <tdeaboutdata.h>
38 #include <tdemessagebox.h>
39 #include <tdecmdlineargs.h>
45 {
"error",
I18N_NOOP(
"Display error message (default)"), 0 },
47 {
"warning",
I18N_NOOP(
"Display warning message"), 0 },
49 {
"info",
I18N_NOOP(
"Display informational message"), 0 },
50 {
"+message",
I18N_NOOP(
"Message string to be displayed"), 0 },
55 I18N_NOOP(
"Utility to display aRts error messages"),
56 TDEAboutData::License_GPL,
"(c) 2001, Jeff Tranter", 0, 0,
"tranter@kde.org");
58 int main(
int argc,
char **argv) {
59 aboutData.
addAuthor(
"Jeff Tranter", 0,
"tranter@kde.org");
69 if (args->
count() == 0) {
74 for (
int i = 0; i < args->
count(); i++) {
78 msg += TQString(
" ") + args->
arg(i);
81 const int notifyOptions = 0;
82 if (args->
isSet(
"w")) {
83 KMessageBox::sorry(0, msg, i18n(
"Warning"), notifyOptions);
84 }
else if (args->
isSet(
"i")) {
86 id.replace(TQRegExp(
"[\\[\\]\\s=]"),
"_");
87 KMessageBox::information(0, msg, i18n(
"Informational"),
id, notifyOptions);
89 KMessageBox::error(0, msg, i18n(
"Error"), notifyOptions);
static void setMainCatalogue(const char *catalog)
static void addCmdLineOptions(const TDECmdLineOptions *options, const char *name=0, const char *id=0, const char *afterId=0)
static void usage(const char *id=0)
static TDECmdLineArgs * parsedArgs(const char *id=0)
static void init(int _argc, char **_argv, const char *_appname, const char *programName, const char *_description, const char *_version, bool noKApp=false)
static TDELocale * locale()
void addAuthor(const char *name, const char *task=0, const char *emailAddress=0, const char *webAddress=0)
bool isSet(const char *option) const
const char * arg(int n) const