1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
|
/***************************************************************************
kommanderwidget.cpp - Text widget core functionality
-------------------
copyright : (C) 2002-2003 Marc Britton <[email protected]>
(C) 2004 Michal Rudolf <[email protected]>
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/* KDE INCLUDES */
#include <dcopclient.h>
#include <kapplication.h>
#include <kdebug.h>
#include <klocale.h>
#include <kdialogbase.h>
#include <kmessagebox.h>
#include <kprocess.h>
/* QT INCLUDES */
#include <tqcstring.h>
#include <tqdatastream.h>
#include <tqfileinfo.h>
#include <tqobject.h>
#include <tqobjectlist.h>
#include <tqregexp.h>
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqvaluelist.h>
#include <tqvariant.h>
/* UNIX INCLUDES */
#include <unistd.h>
#include <stdlib.h>
/* OTHER INCLUDES */
#include "myprocess.h"
#include "kommanderwidget.h"
#include "specials.h"
#include "specialinformation.h"
#include "parser.h"
#include "parserdata.h"
#include "kommanderwindow.h"
KommanderWidget::KommanderWidget(TQObject *a_thisObject)
{
m_thisObject = a_thisObject;
}
KommanderWidget::~KommanderWidget()
{
}
void KommanderWidget::setAssociatedText(const TQStringList& a_associations)
{
m_associatedText = a_associations;
while(m_associatedText.count() < (states().count()))
m_associatedText += TQString(); // sync states and associations
}
TQStringList KommanderWidget::associatedText() const
{
return m_associatedText;
}
bool KommanderWidget::hasAssociatedText()
{
int index = states().findIndex(currentState());
if (index == -1 || m_associatedText[index].isEmpty())
return false;
return true;
}
void KommanderWidget::setPopulationText(const TQString& a_txt)
{
m_populationText = a_txt;
}
TQString KommanderWidget::populationText() const
{
return m_populationText;
}
TQStringList KommanderWidget::states() const
{
return m_states;
}
TQStringList KommanderWidget::displayStates() const
{
return m_displayStates;
}
void KommanderWidget::setStates(const TQStringList& a_states)
{
m_states = a_states;
}
void KommanderWidget::setDisplayStates(const TQStringList& a_displayStates)
{
m_displayStates = a_displayStates;
}
TQString KommanderWidget::evalAssociatedText() // expands and returns associated text as a string
{
int index = ( states().findIndex( currentState()) );
if (index == -1)
{
printError(i18n("Invalid state for associated text."));
return TQString();
}
return evalAssociatedText(m_associatedText[index]);
}
TQString KommanderWidget::evalAssociatedText(const TQString& a_text)
{
/* New internal parser is used if global flag is set */
if ((KommanderWidget::useInternalParser && !a_text.startsWith("#!")) || a_text.startsWith("#!kommander"))
{
Parser p(internalParserData());
p.setWidget(this);
p.setString(a_text);
if (!p.setString(a_text) || !p.parse())
printError(i18n("Line %1: %2.\n").tqarg(p.errorLine()+1).tqarg(p.errorMessage()));
return TQString();
}
/* Old macro-only parser is implemented below */
bool parserType = KommanderWidget::useInternalParser;
KommanderWidget::useInternalParser = false; //shebang is used, switch to old parser
TQString evalText;
int pos = 0, baseTextLength = a_text.length();
while (pos < baseTextLength)
{
int ident = a_text.find(ESCCHAR, pos);
if (ident == -1) {
evalText += a_text.mid(pos);
break;
}
evalText += a_text.mid(pos, ident - pos);
pos = ident+1;
/* escaped @ */
if (pos < baseTextLength-1 && a_text[pos] == ESCCHAR)
{
evalText += ESCCHAR;
pos++;
continue;
}
TQString identifier = parseIdentifier(a_text, pos);
/* comment */
if (identifier.isEmpty())
{
if (pos < baseTextLength && a_text[pos] == '#') { // comment
int newpos = a_text.find('\n', pos+1);
if (newpos == -1)
newpos = a_text.length();
if (pos > 1 && a_text[pos-2] == '\n')
newpos++;
pos = newpos;
}
else
evalText += ESCCHAR; // single @
continue;
}
bool ok = true;
TQStringList args;
/* Standard, non-prefixed special */
if (identifier == "if") // if required special handling as it takes expression
{
TQString arg = parseBrackets(a_text, pos, ok);
if (!ok)
return TQString();
args.append(evalAssociatedText(arg));
evalText += evalIfBlock(args, a_text, pos);
}
else if (SpecialInformation::function(Group::Kommander, identifier) != -1)
{
args = parseFunction("Kommander", identifier, a_text, pos, ok);
if (!ok)
return TQString();
else if (identifier == "execBegin")
evalText += evalExecBlock(args, a_text, pos);
else if (identifier == "forEach")
evalText += evalForEachBlock(args, a_text, pos);
else if (identifier == "for")
evalText += evalForBlock(args, a_text, pos);
else if (identifier == "switch")
evalText += evalSwitchBlock(args, a_text, pos);
else if (identifier == "if")
evalText += evalIfBlock(args, a_text, pos);
else
evalText += evalFunction(identifier, args);
}
/* Widget special */
else if (parseWidget(identifier))
evalText += evalWidgetFunction(identifier, a_text, pos);
else if (a_text[pos] == '.')
{
pos++;
TQString function = parseIdentifier(a_text, pos);
args = parseFunction(identifier, function, a_text, pos, ok);
if (!ok)
return TQString();
switch (SpecialInformation::group(identifier))
{
case Group::Array:
evalText += evalArrayFunction(function, args);
break;
case Group::String:
evalText += Parser::function(internalParserData(), "str_" + function, args);
break;
case Group::File:
evalText += Parser::function(internalParserData(), "file_" + function, args);
break;
case Group::Message:
evalText += Parser::function(internalParserData(), "message_" + function, args);
break;
case Group::Input:
evalText += Parser::function(internalParserData(), "input_" + function, args);
break;
default:
return TQString();
}
}
else
{
printError(i18n("Unknown special: \'%1\'.").tqarg(identifier));
return TQString();
}
}
KommanderWidget::useInternalParser = parserType;
return evalText;
}
TQString KommanderWidget::DCOPQuery(const TQStringList& a_query)
{
TQString app = a_query[0];
app.remove("\"");
TQCString appId = app.latin1(), object = a_query[1].latin1();
// parse function arguments
TQString function = a_query[2], pTypes;
function.remove(' ');
int start = function.find('(');
bool ok = false;
if (start != -1)
pTypes = parseBrackets(function, start, ok);
else
{
ok = true;
function += "()";
}
if (!ok)
{
printError(i18n("Unmatched parenthesis in DCOP call \'%1\'.").tqarg(a_query[2]));
return TQString();
}
const TQStringList argTypes = parseArgs(pTypes, ok);
if (!ok || argTypes.count() != a_query.count() - 3)
{
printError(i18n("Incorrect arguments in DCOP call \'%1\'.").tqarg(a_query[2]));
return TQString();
}
TQCString replyType;
TQByteArray byteData, byteReply;
TQDataStream byteDataStream(byteData, IO_WriteOnly);
for (uint i=0 ; i<argTypes.count(); i++) {
if (argTypes[i] == "int")
byteDataStream << a_query[i+3].toInt();
else if (argTypes[i] == "long")
byteDataStream << a_query[i+3].toLong();
else if (argTypes[i] == "float")
byteDataStream << a_query[i+3].toFloat();
else if (argTypes[i] == "double")
byteDataStream << a_query[i+3].toDouble();
else if (argTypes[i] == "bool")
byteDataStream << (bool)(a_query[i+3] != "false" && a_query[i+3] != "false" && a_query[i+3] != "0");
else if (argTypes[i] == TQSTRINGLIST_OBJECT_NAME_STRING)
if (a_query[i+3].find('\n') != -1)
byteDataStream << TQStringList::split("\n", a_query[i+3], true);
else
byteDataStream << TQStringList::split("\\n", a_query[i+3], true);
else
byteDataStream << a_query[i+3];
}
DCOPClient *cl = KApplication::dcopClient();
if (!cl || !cl->call(appId, object, function.latin1(), byteData, replyType, byteReply))
{
printError(i18n("Tried to perform DCOP query, but failed."));
return TQString();
}
TQDataStream byteReplyStream(byteReply, IO_ReadOnly);
if (replyType == TQSTRING_OBJECT_NAME_STRING)
{
TQString text;
byteReplyStream >> text;
return text;
}
else if(replyType == "int")
{
int i;
byteReplyStream >> i;
return TQString::number(i);
}
else if(replyType == "bool")
{
bool b;
byteReplyStream >> b;
return TQString::number(b);
}
else if (replyType == TQSTRINGLIST_OBJECT_NAME_STRING)
{
TQStringList text;
byteReplyStream >> text;
return text.join("\n");
}
else if(replyType != "void")
{
printError(i18n("DCOP return type %1 is not yet implemented.").tqarg(replyType.data()));
}
return TQString();
}
TQString KommanderWidget::localDCOPQuery(const TQString function, const TQStringList& args)
{
TQStringList pArgs;
pArgs.append(kapp->dcopClient()->appId());
pArgs.append("KommanderIf");
pArgs.append(function);
for (uint i=0; i<args.count(); i++)
pArgs.append(args[i]);
return DCOPQuery(pArgs);
}
TQString KommanderWidget::localDCOPQuery(const TQString function, const TQString& arg1,
const TQString& arg2, const TQString& arg3, const TQString& arg4)
{
TQStringList pArgs;
pArgs.append(kapp->dcopClient()->appId());
pArgs.append("KommanderIf");
pArgs.append(function);
pArgs.append(arg1);
pArgs.append(arg2);
if (!arg3.isNull())
pArgs.append(arg3);
if (!arg4.isNull())
pArgs.append(arg4);
return DCOPQuery(pArgs);
}
TQString KommanderWidget::execCommand(const TQString& a_command, const TQString& a_shell) const
{
MyProcess proc(this);
TQString text = proc.run(a_command.local8Bit(), a_shell.latin1());
//FIXME check if exec was successful
return text;
}
TQString KommanderWidget::runDialog(const TQString& a_dialog, const TQString& a_params)
{
TQString pFileName = localDCOPQuery("global(TQString)", "_KDDIR") + TQString("/") + a_dialog;
TQFileInfo pDialogFile(pFileName);
if (!pDialogFile.exists())
{
pFileName = a_dialog;
pDialogFile.setFile(pFileName);
if (!pDialogFile.exists())
return TQString();
}
TQString cmd = TQString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4")
.tqarg(pFileName).tqarg(a_params).tqarg(getpid()).tqarg(getpid());
return execCommand(cmd);
}
void KommanderWidget::printError(const TQString& a_error) const
{
if (showErrors)
{
KDialogBase* dialog = new KDialogBase("Error", KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel,
KDialogBase::Yes, KDialogBase::No, 0, 0, true, false,
i18n("Continue"), i18n("Continue && Ignore Next Errors"), i18n("Stop"));
switch (KMessageBox::createKMessageBox(dialog, TQMessageBox::Warning,
i18n("<qt>Error in widget <b>%1</b>:<p><i>%2</i></qt>").tqarg(TQString(m_thisObject->name()))
.tqarg(a_error), TQStringList(), TQString(), 0, 0))
{
case KDialogBase::No:
showErrors = false;
case KDialogBase::Yes:
break;
case KDialogBase::Cancel:
if (parentDialog()->inherits(TQDIALOG_OBJECT_NAME_STRING))
{
parentDialog()->close();
exit(-1);
}
else if (parentDialog()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING))
kapp->quit();
}
}
else
{
kdError() << i18n("Error in widget %1:\n %2\n").tqarg(m_thisObject->name()).tqarg(a_error);
}
}
TQString KommanderWidget::parseIdentifier(const TQString& s, int& from) const
{
uint start = from;
while (start < s.length() && s[start].isSpace())
start++;
uint end = start;
while (end < s.length() && (s[end].isLetterOrNumber() || s[end] == '_'))
end++;
from = end;
return s.mid(start, end-start);
}
TQString KommanderWidget::parseBrackets(const TQString& s, int& from, bool& ok) const
{
ok = true;
uint start = from;
while (start < s.length() && s[start].isSpace())
start++;
if (start == s.length() || s[start] != '(')
return TQString();
bool quoteSingle = false, quoteDouble = false;
int brackets = 1;
for (uint end = start+1; end < s.length(); end++)
{
if (!quoteDouble && s[end] == '\'' && s[end-1] != '\\')
quoteSingle = !quoteSingle;
else if (!quoteSingle && s[end] == '\"' && s[end-1] != '\\')
quoteDouble = !quoteDouble;
else if (!quoteDouble && !quoteSingle && s[end] == '(')
brackets++;
else if (!quoteDouble && !quoteSingle && s[end] == ')')
{
brackets--;
if (!brackets) {
from = end + 1;
return s.mid(start+1, end-start-1);
}
}
}
ok = false;
return TQString();
}
TQStringList KommanderWidget::parseArgs(const TQString& s, bool &ok)
{
TQStringList argList;
bool quoteDouble = false, quoteSingle = false;
uint i, start = 0, brackets=0;
for (i = 0; i < s.length(); i++)
{
/* Handle brackets */
if (s[i] == '(' && !quoteSingle && !quoteDouble)
brackets++;
else if (s[i] == ')' && !quoteSingle && !quoteDouble)
brackets--;
/* Ignore everything in brackets */
else if (!brackets)
{
if (s[i] == '\'' && s[i-1] != '\\' && !quoteDouble)
quoteSingle = !quoteSingle;
else if (s[i] == '\"' && s[i-1] != '\\' && !quoteSingle)
quoteDouble = !quoteDouble;
else if (s[i] == ',' && !quoteDouble && !quoteSingle)
{
TQString arg = s.mid(start, i - start).stripWhiteSpace();
if (!arg.isEmpty())
argList.append(evalAssociatedText(parseQuotes(arg)));
start = i+1;
}
}
}
if (!quoteDouble && !quoteSingle)
{
TQString arg = s.mid(start, s.length() - start + 1).stripWhiteSpace();
if (!arg.isEmpty())
argList.append(evalAssociatedText(parseQuotes(arg)));
}
ok = !quoteDouble && !quoteSingle;
return argList;
}
TQString KommanderWidget::parseQuotes(const TQString& s) const
{
if (s[0] == s[s.length()-1] && (s[0] == '\'' || s[0] == '\"'))
{
TQMemArray<TQChar> buf(s.length());
int start = 0;
int end = s.length() - 1;
for (int i=1; i<end; i++)
if (s[i] == '\\')
{
if (s[i+1] == 't')
buf[start++] = '\t';
else if (s[i+1] == 'n')
buf[start++] = '\n';
else if (s[i+1] == '\\')
buf[start++] = '\\';
else
{
buf[start++] = s[i];
i--;
}
i++;
}
else
buf[start++] = s[i];
return TQString(buf, start);
//return s.mid(1, s.length()-2);
}
else return s;
}
bool KommanderWidget::isWidget(const TQString& a_name) const
{
return parseWidget(a_name);
}
KommanderWidget* KommanderWidget::widgetByName(const TQString& a_name) const
{
return parseWidget(a_name);
}
KommanderWidget* KommanderWidget::parseWidget(const TQString& widgetName) const
{
if (TQString(parentDialog()->name()) == widgetName)
return dynamic_cast <KommanderWidget*>(parentDialog());
TQCString s = widgetName.lower() == "self" ? m_thisObject->name() : widgetName.latin1();
TQObject* childObj = parentDialog()->child(s);
/* if (!childObj)
{
Parser parser(internalParserData());
TQString variableValue = parser.variable(widgetName).toString();
s = variableValue.lower() == "self" ? m_thisObject->name() : variableValue.latin1();
childObj = parentDialog()->child(s);
}*/
return dynamic_cast <KommanderWidget*>(childObj);
}
TQStringList KommanderWidget::parseFunction(const TQString& group, const TQString& function,
const TQString& s, int& from, bool& ok)
{
ok = true;
bool success = false;
TQString arg = parseBrackets(s, from, ok);
if (!ok)
{
printError(i18n("Unmatched parenthesis after \'%1\'.").tqarg(function));
return TQString();
}
const TQStringList args = parseArgs(arg, ok);
int gname = SpecialInformation::group(group);
int fname = SpecialInformation::function(gname, function);
bool extraArg = gname == Group::DCOP;
if (!ok)
printError(i18n("Unmatched quotes in argument of \'%1\'.").tqarg(function));
else if (gname == -1)
printError(i18n("Unknown function group: \'%1\'.").tqarg(group));
else if (fname == -1 && !extraArg)
printError(i18n("Unknown function: \'%1\' in group '%2'.").tqarg(function).tqarg(group));
else if (fname == -1 && extraArg)
printError(i18n("Unknown widget function: \'%1\'.").tqarg(function));
else if ((int)args.count() + extraArg < SpecialInformation::minArg(gname, fname))
printError(i18n("Not enough arguments for \'%1\' (%2 instead of %3).<p>"
"Correct syntax is: %4")
.tqarg(function).tqarg(args.count() + extraArg).tqarg(SpecialInformation::minArg(gname, fname))
.tqarg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames)));
else if ((int)args.count() + extraArg > SpecialInformation::maxArg(gname, fname))
printError(i18n("Too many arguments for \'%1\' (%2 instead of %3).<p>"
"Correct syntax is: %4")
.tqarg(function).tqarg(args.count() + extraArg).tqarg(SpecialInformation::maxArg(gname, fname))
.tqarg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames)));
else
success = true;
ok = success;
return args;
}
int KommanderWidget::parseBlockBoundary(const TQString& s, int from, const TQStringList& args) const
{
int shortest = -1;
for (uint i=0; i<args.count(); i++)
{
int match = s.find(args[i], from);
if (shortest > match || shortest == -1)
shortest = match;
}
return shortest;
}
TQString KommanderWidget::substituteVariable(TQString text, TQString variable, TQString value) const
{
TQString var = TQString("@%1").tqarg(variable);
TQString newtext;
int newpos, pos = 0;
while (true)
{
newpos = text.find(var, pos);
if (newpos != -1)
{
newtext += text.mid(pos, newpos-pos);
newtext += value;
pos = newpos + var.length();
} else
{
newtext += text.mid(pos);
break;
}
}
return newtext;
}
TQWidget* KommanderWidget::parentDialog() const
{
TQObject *superParent = m_thisObject;
while (superParent->tqparent())
{
superParent = superParent->tqparent();
if (superParent->inherits(TQDIALOG_OBJECT_NAME_STRING) || superParent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING))
break;
}
return (TQWidget*)superParent;
}
TQString KommanderWidget::global(const TQString& variableName)
{
TQString var = variableName.startsWith("_") ? variableName : TQString("_")+ variableName;
Parser parser(internalParserData());
return parser.variable(var).toString();
}
void KommanderWidget::setGlobal(const TQString& variableName, const TQString& value)
{
TQString var = variableName.startsWith("_") ? variableName : TQString("_")+ variableName;
Parser parser(internalParserData());
parser.setVariable(var, value);
}
TQString KommanderWidget::handleDCOP(const int function, const TQStringList& args)
{
TQWidget* current = dynamic_cast<TQWidget*>(m_thisObject);
if (!current)
return TQString();
switch(function) {
case DCOP::setEnabled:
current->setEnabled( args[0] != "false" && args[0] != "0");
break;
case DCOP::setVisible:
current->setShown(args[0] != "false" && args[0] != "0");
break;
case DCOP::type:
return current->className();
case DCOP::tqchildren:
{
TQStringList matching;
TQObjectList* widgets = current->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, args.count() == 0 || args[0] != "false");
for (TQObject* w = widgets->first(); w; w = widgets->next())
if (w->name() && (dynamic_cast<KommanderWidget*>(w)))
matching.append(w->name());
return matching.join("\n");
}
}
return TQString();
}
bool KommanderWidget::isFunctionSupported(int f)
{
return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::tqchildren || f == DCOP::type;
}
bool KommanderWidget::isCommonFunction(int f)
{
return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::tqchildren || f == DCOP::type;
}
ParserData* KommanderWidget::internalParserData() const
{
return m_parserData;
}
TQString KommanderWidget::fileName()
{
KommanderWindow* window = dynamic_cast<KommanderWindow*>(parentDialog());
if (window)
return TQString(window->fileName());
else
return TQString();
}
TQString KommanderWidget::widgetName() const
{
if (m_thisObject)
return TQString::tqfromLatin1(m_thisObject->name());
else
return TQString();
}
bool KommanderWidget::inEditor = false;
bool KommanderWidget::showErrors = true;
bool KommanderWidget::useInternalParser = false;
ParserData* KommanderWidget::m_parserData = new ParserData;
|