本文整理汇总了C++中TQStringList::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ TQStringList::empty方法的具体用法?C++ TQStringList::empty怎么用?C++ TQStringList::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TQStringList
的用法示例。
在下文中一共展示了TQStringList::empty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: received
void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg )
{
kdDebug(6100) << "KJavaAppletContext::received, cmd = >>" << cmd << "<<" << endl;
kdDebug(6100) << "arg count = " << arg.count() << endl;
if ( cmd == TQString::fromLatin1("showstatus")
&& !arg.empty() )
{
TQString tmp = arg.first();
tmp.replace(TQRegExp("[\n\r]"), "");
kdDebug(6100) << "status message = " << tmp << endl;
emit showStatus( tmp );
}
else if ( cmd == TQString::fromLatin1( "showurlinframe" )
&& arg.count() > 1 )
{
kdDebug(6100) << "url = " << arg[0] << ", frame = " << arg[1] << endl;
emit showDocument( arg[0], arg[1] );
}
else if ( cmd == TQString::fromLatin1( "showdocument" )
&& !arg.empty() )
{
kdDebug(6100) << "url = " << arg.first() << endl;
emit showDocument( arg.first(), "_top" );
}
else if ( cmd == TQString::fromLatin1( "resizeapplet" )
&& arg.count() > 2 )
{
//arg[1] should be appletID
//arg[2] should be new width
//arg[3] should be new height
bool ok;
const int appletID = arg[0].toInt( &ok );
const int width = arg[1].toInt( &ok );
const int height = arg[2].toInt( &ok );
if( !ok )
{
kdError(DEBUGAREA) << "could not parse out parameters for resize" << endl;
}
else
{
KJavaApplet* const tmp = d->applets[appletID];
if (tmp)
tmp->resizeAppletWidget( width, height );
}
}
else if (cmd.startsWith(TQString::fromLatin1("audioclip_"))) {
kdDebug(DEBUGAREA) << "process Audio command (not yet implemented): " << cmd << " " << arg[0] << endl;
}
else if ( cmd == TQString::fromLatin1( "JS_Event" )
&& arg.count() > 2 )
{
bool ok;
const int appletID = arg.first().toInt(&ok);
KJavaApplet * applet;
if (ok && (applet = d->applets[appletID]))
{
TQStringList js_args(arg);
js_args.pop_front();
applet->jsData(js_args);
}
else
kdError(DEBUGAREA) << "parse JS event " << arg[0] << " " << arg[1] << endl;
}
else if ( cmd == TQString::fromLatin1( "AppletStateNotification" ) )
{
bool ok;
const int appletID = arg.first().toInt(&ok);
if (ok)
{
KJavaApplet* const applet = d->applets[appletID];
if ( applet )
{
const int newState = arg[1].toInt(&ok);
if (ok)
{
applet->stateChange(newState);
if (newState == KJavaApplet::INITIALIZED) {
kdDebug(DEBUGAREA) << "emit appletLoaded" << endl;
emit appletLoaded();
}
} else
kdError(DEBUGAREA) << "AppletStateNotification: status is not numerical" << endl;
} else
kdWarning(DEBUGAREA) << "AppletStateNotification: No such Applet with ID=" << arg[0] << endl;
} else
kdError(DEBUGAREA) << "AppletStateNotification: Applet ID is not numerical" << endl;
}
else if ( cmd == TQString::fromLatin1( "AppletFailed" ) ) {
bool ok;
const int appletID = arg.first().toInt(&ok);
if (ok)
{
KJavaApplet* const applet = d->applets[appletID];
/*
TQString errorDetail(arg[1]);
errorDetail.replace(TQRegExp(":\\s*"), ":\n");
KMessageBox::detailedError(0L, i18n("Java error while loading applet."), errorDetail);
*/
//.........这里部分代码省略.........