From e985f7e545f4739493965aad69bbecb136dc9346 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 16 Jun 2011 19:02:47 +0000 Subject: TQt4 port kdewebdev This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kommander/plugin/kommanderplugin.h | 23 ++++++------- kommander/plugin/specialinformation.cpp | 58 ++++++++++++++++----------------- kommander/plugin/specialinformation.h | 10 +++--- kommander/plugin/specials.h | 10 +++--- 4 files changed, 51 insertions(+), 50 deletions(-) (limited to 'kommander/plugin') diff --git a/kommander/plugin/kommanderplugin.h b/kommander/plugin/kommanderplugin.h index d74abaa4..ae06fdc0 100644 --- a/kommander/plugin/kommanderplugin.h +++ b/kommander/plugin/kommanderplugin.h @@ -1,29 +1,29 @@ /**************************************************************************** - ** kommanderplugin.h - KommanderPlugin class definition created from QWidgetPlugin + ** kommanderplugin.h - KommanderPlugin class definition created from TQWidgetPlugin ** Copyright (C) 2001 Trolltech AS. All rights reserved. ** Copyright (C) 2003 Marc Britton ** - ** This file is part of the widgets module of the Qt GUI Toolkit. + ** This file is part of the widgets module of the TQt GUI Toolkit. ** ** This file may be distributed under the terms of the Q Public License ** as defined by Trolltech AS of Norway and appearing in the file - ** LICENSE.QPL included in the packaging of this file. + ** LICENSE.TQPL included in the packaging of this file. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** - ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition - ** licenses may use this file in accordance with the Qt Commercial License + ** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition + ** licenses may use this file in accordance with the TQt Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for - ** information about Qt Commercial License Agreements. - ** See http://www.trolltech.com/qpl/ for QPL licensing information. + ** information about TQt Commercial License Agreements. + ** See http://www.trolltech.com/qpl/ for TQPL licensing information. ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are @@ -45,15 +45,16 @@ class TQIconSet; class KOMMANDER_EXPORT KommanderPlugin : public TQObject { Q_OBJECT + TQ_OBJECT public: KommanderPlugin(); ~KommanderPlugin(); - virtual void addWidget( const TQString &name, const TQString &group, const TQString &toolTip, TQIconSet *iconSet, const TQString &whatsThis = TQString::null, bool isContainer = false); + virtual void addWidget( const TQString &name, const TQString &group, const TQString &toolTip, TQIconSet *iconSet, const TQString &whatsThis = TQString(), bool isContainer = false); virtual void removeWidget( const TQString &name ); virtual TQStringList widgets() const; - virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 ) = 0; + virtual TQWidget *create( const TQString &key, TQWidget *tqparent = 0, const char *name = 0 ) = 0; virtual TQString group( const TQString &key ) const; virtual TQString toolTip( const TQString &key ) const; virtual TQString whatsThis( const TQString &key ) const; @@ -75,7 +76,7 @@ class KOMMANDER_EXPORT KommanderPlugin : public TQObject * @param maxArgs maximum number of accepted arguments * @return true if registration was successful */ - static bool registerFunction(int id, const TQString& function, const TQString description = TQString::null, + static bool registerFunction(int id, const TQString& function, const TQString description = TQString(), int minArgs = -1, int maxArgs = -1); @@ -84,7 +85,7 @@ private: struct WidgetInfo { WidgetInfo() { } - WidgetInfo( const TQString &g, const TQString &t, TQIconSet *i, const TQString &w = TQString::null, bool c = false) + WidgetInfo( const TQString &g, const TQString &t, TQIconSet *i, const TQString &w = TQString(), bool c = false) : group( g ), toolTip( t ), iconSet(i), whatsThis( w ), isContainer( c ) {} diff --git a/kommander/plugin/specialinformation.cpp b/kommander/plugin/specialinformation.cpp index d6ed318b..bbfe308e 100644 --- a/kommander/plugin/specialinformation.cpp +++ b/kommander/plugin/specialinformation.cpp @@ -22,8 +22,8 @@ SpecialFunction::SpecialFunction(const TQString& name, const TQString& descripti int minArgs, int maxArgs) { m_parserTypes = AllParsers; - int lbracket = name.find('('); - int rbracket = name.find(')'); + int lbracket = name.tqfind('('); + int rbracket = name.tqfind(')'); m_function = (lbracket != -1) ? name.left(lbracket) : name; m_description = description; if (lbracket != -1 && rbracket != -1) @@ -44,8 +44,8 @@ SpecialFunction::SpecialFunction(ParserType p, const TQString& name, const TQStr int minArgs, int maxArgs) { m_parserTypes = p; - int lbracket = name.find('('); - int rbracket = name.find(')'); + int lbracket = name.tqfind('('); + int rbracket = name.tqfind(')'); m_function = (lbracket != -1) ? name.left(lbracket) : name; m_description = description; if (lbracket != -1 && rbracket != -1) @@ -71,15 +71,15 @@ TQString SpecialFunction::prototype(uint prototypeFlags) const TQStringList params; for (uint i=start; irecursive parameter to true to include widgets contained by child widgets."), 2); + insert(DCOP::tqchildren, "tqchildren(TQString widget, bool recursive)", + i18n("Returns the list of child widgets contained in the tqparent widget. Set the recursive parameter to true to include widgets contained by child widgets."), 2); insert(DCOP::clear, "clear(TQString widget)", i18n("Removes all content from the widget."), 1); insertAlias(DCOP::clear, "clearList"); @@ -375,8 +375,8 @@ void SpecialInformation::registerSpecials() i18n("Returns type(class) of widget."), 1); insert(DCOP::setEditable, "setEditable(TQString widget, bool editable)", i18n("Makes the widget editable or read only, depending on the editable argument."), 2); - insertInternal(DCOP::geometry, "geometry(TQString widget)", - i18n("Return the widget's geometry as x y w h. This is useful for positioning a created widget."), 1); + insertInternal(DCOP::tqgeometry, "tqgeometry(TQString widget)", + i18n("Return the widget's tqgeometry as x y w h. This is useful for positioning a created widget."), 1); insertInternal(DCOP::hasFocus, "hasFocus(TQString widget)", i18n("Returns true if the widget has focus."), 1); insertInternal(DCOP::getBackgroundColor, "getBackgroundColor(TQString widget)", @@ -400,8 +400,8 @@ void SpecialInformation::registerSpecials() insert(Kommander::dcopid, "dcopid", i18n("Returns DCOP identifier of current process. This is shorthand for kmdr-executor-@pid."), 0); - insert(Kommander::parentPid, "parentPid", - i18n("Returns the pid of the parent Kommander window."), 0); + insert(Kommander::tqparentPid, "tqparentPid", + i18n("Returns the pid of the tqparent Kommander window."), 0); insert(Kommander::debug, "debug(TQString text)", i18n("Writes text on stderr."), 1); insert(Kommander::echo, "echo(TQString text)", @@ -440,8 +440,8 @@ void SpecialInformation::registerSpecials() i18n("Executes an external DCOP call."), 3, 9); insertMacro(Kommander::comment, "#", i18n("Adds a comment to EOL that Kommander will not parse"), 0); - insertInternal(Kommander::createWidget, "createWidget(TQString widgetName, TQString widgetType, TQString parent)", - i18n("Creates a new widget with the specified type and as the child of parent."), 3); + insertInternal(Kommander::createWidget, "createWidget(TQString widgetName, TQString widgetType, TQString tqparent)", + i18n("Creates a new widget with the specified type and as the child of tqparent."), 3); insertInternal(Kommander::widgetExists, "widgetExists(TQString widgetName)", i18n("Returns true if there is a widget with the passed name, false otherwise."), 1); insertInternal(Kommander::connect, "connect(TQString sender, TQString signal, TQString receiver, TQString slot)", @@ -524,11 +524,11 @@ void SpecialInformation::registerSpecials() insertGroup(Group::String, "String", "str"); insert(String::length, "length(TQString string)", i18n("Returns number of chars in the string."), 1); - insert(String::contains, "contains(TQString string, TQString substring)", + insert(String::tqcontains, "tqcontains(TQString string, TQString substring)", i18n("Checks if the the string contains the given substring."), 2); - insert(String::find, "find(TQString string, TQString sought, int index)", + insert(String::tqfind, "tqfind(TQString string, TQString sought, int index)", i18n("Returns the position of a substring in the string, or -1 if it is not found."), 2); - insert(String::findRev, "findRev(TQString string, TQString sought, int index)", + insert(String::tqfindRev, "tqfindRev(TQString string, TQString sought, int index)", i18n("Returns the position of a substring in the string, or -1 if it is not found. String is searched backwards"), 2); insertInternal(String::count, "count(TQString String, TQString substring)", i18n("Returns the count of a given substring in the given string."), 2); @@ -540,7 +540,7 @@ void SpecialInformation::registerSpecials() i18n("Returns n chars of the string, starting from start."), 3); insert(String::remove, "remove(TQString string, TQString substring)", i18n("Removes all occurrences of given substring."), 2); - insert(String::replace, "replace(TQString string, TQString substring, TQString replacement)", + insert(String::tqreplace, "tqreplace(TQString string, TQString substring, TQString replacement)", i18n("Replaces all occurrences of the given substring with the given replacement."), 3); insert(String::upper, "upper(TQString string)", i18n("Converts the string to uppercase."), 1); diff --git a/kommander/plugin/specialinformation.h b/kommander/plugin/specialinformation.h index fa898620..1ff00a6c 100644 --- a/kommander/plugin/specialinformation.h +++ b/kommander/plugin/specialinformation.h @@ -36,9 +36,9 @@ public: /* Flags describing which parser supports the function */ enum ParserType {MacroParser = 1, InternalParser = 2, AllParsers = 3}; SpecialFunction(const TQString& function, const TQString& description - = TQString::null, int minArgs = -1, int maxArgs = -1); + = TQString(), int minArgs = -1, int maxArgs = -1); SpecialFunction(ParserType p, const TQString& function, const TQString& description - = TQString::null, int minArgs = -1, int maxArgs = -1); + = TQString(), int minArgs = -1, int maxArgs = -1); SpecialFunction() {m_minArgs = m_maxArgs = 0;} /* minimum number of arguments */ int minArg() const {return m_minArgs;} @@ -90,13 +90,13 @@ public: static TQString description(int gname, int fname); static TQString prototype(int gname, int fname, uint prototypeFlags = 0); /* Insert function supported by all parsers */ - static bool insert(int id, const TQString& function, const TQString description = TQString::null, + static bool insert(int id, const TQString& function, const TQString description = TQString(), int minArgs = -1, int maxArgs = -1, SpecialFunction::ParserType = SpecialFunction::AllParsers); /* Insert function supported by (old) macro parser */ - static bool insertMacro(int id, const TQString& function, const TQString description = TQString::null, + static bool insertMacro(int id, const TQString& function, const TQString description = TQString(), int minArgs = -1, int maxArgs = -1); /* Insert function supported by (new) internal parser */ - static bool insertInternal(int id, const TQString& function, const TQString description = TQString::null, + static bool insertInternal(int id, const TQString& function, const TQString description = TQString(), int minArgs = -1, int maxArgs = -1); static bool insertAlias(int id, const TQString& alias); static void insertGroup(int id, const TQString& name, const TQString& parserName); diff --git a/kommander/plugin/specials.h b/kommander/plugin/specials.h index 2d46200a..f7db7b6d 100644 --- a/kommander/plugin/specials.h +++ b/kommander/plugin/specials.h @@ -28,19 +28,19 @@ namespace Group namespace DCOP { - enum {addUniqueItem, associatedText, cancel, cellText, clear, checked, children, columnCount, count, currentColumn, + enum {addUniqueItem, associatedText, cancel, cellText, clear, checked, tqchildren, columnCount, count, currentColumn, currentItem, currentRow, execute, findItem, global, insertColumn, insertItem, insertItems, insertRow, item, itemDepth, itemPath, removeColumn, removeItem, removeRow, selection, setAssociatedText, setChecked, setCellText, setCurrentItem, insertTab, setColumnCaption, setEnabled, setGlobal, setMaximum, setPixmap, setRowCaption, setSelection, setText, getBackgroundColor, setBackgroundColor, - setVisible, text, type, setCellWidget, cellWidget, setEditable, geometry, hasFocus, isModified}; + setVisible, text, type, setCellWidget, cellWidget, setEditable, tqgeometry, hasFocus, isModified}; } namespace Kommander { - enum {widgetText, selectedWidgetText, null, pid, dcopid, parentPid, debug, + enum {widgetText, selectedWidgetText, null, pid, dcopid, tqparentPid, debug, echo, env, exec, expr, global, i18n, dialog, readSetting, setGlobal, writeSetting, dcop, - switchBlock, execBegin, forBlock, forEachBlock, ifBlock, comment, createWidget, connect, disconnect, widgetExists, exit, Break, Continue, Return, execBackground, switchInternal}; //, focusWidget}; + switchBlock, execBegin, forBlock, forEachBlock, ifBlock, comment, createWidget, connect, disconnect, widgetExists, exit, Break, Continue, Return, execBackground, switchInternal}; //, tqfocusWidget}; } namespace Array @@ -55,7 +55,7 @@ namespace Matrix namespace String { - enum {length, contains, find, findRev, left, right, mid, remove, replace, upper, lower, + enum {length, tqcontains, tqfind, tqfindRev, left, right, mid, remove, tqreplace, upper, lower, compare, isEmpty, isNumber, section, args, toInt, toDouble, round, sort, trim, padLeft, padRight, count}; } -- cgit v1.2.1