summaryrefslogtreecommitdiffstats
path: root/kjsembed/xmlactionclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/xmlactionclient.cpp')
-rw-r--r--kjsembed/xmlactionclient.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/kjsembed/xmlactionclient.cpp b/kjsembed/xmlactionclient.cpp
index d2394a92..390d5fd2 100644
--- a/kjsembed/xmlactionclient.cpp
+++ b/kjsembed/xmlactionclient.cpp
@@ -31,27 +31,27 @@ namespace KJSEmbed {
// XML Tags and Attributes
//
-TTQString tag_header("header");
-TTQString tag_action("action");
-TTQString tag_type( "type" );
-TTQString tag_label( "label" );
-TTQString tag_icons( "icons" );
-TTQString tag_shortcut( "shortcut" );
-TTQString tag_name( "name" );
-TTQString tag_group( "group" );
-TTQString tag_text( "text" );
-TTQString tag_statustext( "statustext" );
-TTQString tag_whatsthis( "whatsthis" );
-TTQString tag_script( "script" );
-TTQString tag_data( "data" );
-TTQString tag_item( "item" );
-
-TTQString attr_type( "type" );
-TTQString attr_src( "src" );
-TTQString attr_exclusive( "exclusive" );
-
-TTQString type_include( "include" );
-TTQString type_debug( "debug" );
+TQString tag_header("header");
+TQString tag_action("action");
+TQString tag_type( "type" );
+TQString tag_label( "label" );
+TQString tag_icons( "icons" );
+TQString tag_shortcut( "shortcut" );
+TQString tag_name( "name" );
+TQString tag_group( "group" );
+TQString tag_text( "text" );
+TQString tag_statustext( "statustext" );
+TQString tag_whatsthis( "whatsthis" );
+TQString tag_script( "script" );
+TQString tag_data( "data" );
+TQString tag_item( "item" );
+
+TQString attr_type( "type" );
+TQString attr_src( "src" );
+TQString attr_exclusive( "exclusive" );
+
+TQString type_include( "include" );
+TQString type_debug( "debug" );
//
// Default Runner
@@ -77,8 +77,8 @@ bool XMLActionRunner::run( XMLActionClient *client, const XMLActionClient::XMLAc
// Main Client Class
//
-XMLActionClient::XMLActionClient( TTQObject *parent, const char *name )
- : TTQObject( parent, name ? name : "XMLActionClient" ),
+XMLActionClient::XMLActionClient( TQObject *parent, const char *name )
+ : TQObject( parent, name ? name : "XMLActionClient" ),
ac(0), actrun(0)
{
}
@@ -87,18 +87,18 @@ XMLActionClient::~XMLActionClient()
{
}
-bool XMLActionClient::load( const TTQString &filename )
+bool XMLActionClient::load( const TQString &filename )
{
XMLActionHandler h( this );
return load( &h, filename );
}
-bool XMLActionClient::load( XMLActionHandler *hand, const TTQString &filename )
+bool XMLActionClient::load( XMLActionHandler *hand, const TQString &filename )
{
- TTQFile f( filename );
- TTQXmlInputSource src( &f );
+ TQFile f( filename );
+ TQXmlInputSource src( &f );
- TTQXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
reader.setContentHandler( hand );
bool ok = reader.parse( src );
if ( !ok ) {
@@ -108,7 +108,7 @@ bool XMLActionClient::load( XMLActionHandler *hand, const TTQString &filename )
return ok;
}
-bool XMLActionClient::bind( const TTQString &name, const XMLActionScript &s )
+bool XMLActionClient::bind( const TQString &name, const XMLActionScript &s )
{
// kdWarning() << "Runner:bind called, name=" << name << " type=" << s.type
// << " text=" << s.text << " src=" << s.src << endl;
@@ -129,7 +129,7 @@ bool XMLActionClient::bind( KAction *act, const XMLActionScript &s )
return bind( act->name(), s );
}
-bool XMLActionClient::run( const TTQString &name )
+bool XMLActionClient::run( const TQString &name )
{
if ( scripts.contains( name ) )
return run( scripts[name] );
@@ -149,7 +149,7 @@ bool XMLActionClient::run( const XMLActionScript &s )
void XMLActionClient::action_activated()
{
- const TTQObject *sender = TTQObject::sender();
+ const TQObject *sender = TQObject::sender();
if ( !sender )
return;
@@ -161,29 +161,29 @@ void XMLActionClient::action_activated()
//
XMLActionHandler::XMLActionHandler( XMLActionClient *client )
- : TTQXmlDefaultHandler(), actclient( client )
+ : TQXmlDefaultHandler(), actclient( client )
{
}
-bool XMLActionHandler::characters( const TTQString &chars )
+bool XMLActionHandler::characters( const TQString &chars )
{
cdata = cdata + chars;
return true;
}
-bool XMLActionHandler::startElement( const TTQString &, const TTQString &, const TTQString &qn,
- const TTQXmlAttributes &attrs )
+bool XMLActionHandler::startElement( const TQString &, const TQString &, const TQString &qn,
+ const TQXmlAttributes &attrs )
{
- cdata = TTQString::null;
+ cdata = TQString::null;
if ( qn == tag_script ) {
ad.script.type = attrs.value( attr_type );
ad.script.src = attrs.value( attr_src );
}
else if ( qn == tag_group ) {
- TTQString ex = attrs.value( attr_exclusive );
- if ( ex == TTQString("true") )
+ TQString ex = attrs.value( attr_exclusive );
+ if ( ex == TQString("true") )
ad.exclusive = true;
}
else if ( qn == tag_action )
@@ -192,7 +192,7 @@ bool XMLActionHandler::startElement( const TTQString &, const TTQString &, const
return true;
}
-bool XMLActionHandler::endElement( const TTQString &, const TTQString &, const TTQString &qn )
+bool XMLActionHandler::endElement( const TQString &, const TQString &, const TQString &qn )
{
if ( qn == tag_action ) {
defineAction();
@@ -200,49 +200,49 @@ bool XMLActionHandler::endElement( const TTQString &, const TTQString &, const T
}
else if ( qn == tag_type ) {
ad.type = cdata;
- cdata = TTQString::null;
+ cdata = TQString::null;
}
else if ( qn == tag_label ) {
ad.text = cdata;
- cdata = TTQString::null;
+ cdata = TQString::null;
}
else if ( qn == tag_text ) {
// Nothing
}
else if ( qn == tag_icons ) {
ad.icons = cdata;
- cdata = TTQString::null;
+ cdata = TQString::null;
}
else if ( qn == tag_shortcut ) {
ad.keys = cdata;
- cdata = TTQString::null;
+ cdata = TQString::null;
}
else if ( qn == tag_name ) {
ad.name = cdata.latin1();
- cdata = TTQString::null;
+ cdata = TQString::null;
}
else if ( qn == tag_group ) {
ad.group = cdata.latin1();
- cdata = TTQString::null;
+ cdata = TQString::null;
}
else if ( qn == tag_whatsthis ) {
ad.whatsthis = cdata;
- cdata = TTQString::null;
+ cdata = TQString::null;
}
else if ( qn == tag_statustext ) {
ad.status = cdata;
- cdata = TTQString::null;
+ cdata = TQString::null;
}
else if ( qn == tag_script ) {
ad.script.text = cdata;
- cdata = TTQString::null;
+ cdata = TQString::null;
if ( !inAction && ad.script.isValid() )
actclient->run( ad.script );
}
else if ( qn == tag_item ) {
ad.items += cdata;
- cdata = TTQString::null;
+ cdata = TQString::null;
}
return true;
@@ -263,7 +263,7 @@ void XMLActionHandler::defineAction()
actclient->bind( act, ad.script );
ad.clear();
- cdata = TTQString::null;
+ cdata = TQString::null;
}
KAction *XMLActionHandler::createAction( KActionCollection *parent )
@@ -307,7 +307,7 @@ KAction *XMLActionHandler::createAction( KActionCollection *parent )
else if ( ad.type == "KActionMenu" ) {
KActionMenu *am = new KActionMenu( ad.text, ad.icons, parent, ad.name.latin1() );
- for ( TTQStringList::Iterator it = ad.items.begin() ; it != ad.items.end() ; ++it ) {
+ for ( TQStringList::Iterator it = ad.items.begin() ; it != ad.items.end() ; ++it ) {
KAction *a = parent->action( (*it).latin1() );
if ( a )
am->insert( a );
@@ -331,7 +331,7 @@ KAction *XMLActionHandler::createAction( KActionCollection *parent )
act->setStatusText( ad.status );
act->setWhatsThis( ad.whatsthis );
- TTQObject::connect( actclient, TQT_SIGNAL( destroyed() ), act, TQT_SLOT( deleteLater() ) );
+ TQObject::connect( actclient, TQT_SIGNAL( destroyed() ), act, TQT_SLOT( deleteLater() ) );
return act;
}