本文整理汇总了C++中TQStringList::size方法的典型用法代码示例。如果您正苦于以下问题:C++ TQStringList::size方法的具体用法?C++ TQStringList::size怎么用?C++ TQStringList::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TQStringList
的用法示例。
在下文中一共展示了TQStringList::size方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create
const Medium Medium::create(const TQStringList &properties)
{
Medium m;
if ( properties.size() >= PROPERTIES_COUNT )
{
m.m_properties[ID] = properties[ID];
m.m_properties[UUID] = properties[UUID];
m.m_properties[NAME] = properties[NAME];
m.m_properties[LABEL] = properties[LABEL];
m.m_properties[USER_LABEL] = properties[USER_LABEL];
m.m_properties[MOUNTABLE] = properties[MOUNTABLE];
m.m_properties[DEVICE_NODE] = properties[DEVICE_NODE];
m.m_properties[MOUNT_POINT] = properties[MOUNT_POINT];
m.m_properties[FS_TYPE] = properties[FS_TYPE];
m.m_properties[MOUNTED] = properties[MOUNTED];
m.m_properties[BASE_URL] = properties[BASE_URL];
m.m_properties[MIME_TYPE] = properties[MIME_TYPE];
m.m_properties[ICON_NAME] = properties[ICON_NAME];
m.m_properties[ENCRYPTED] = properties[ENCRYPTED];
m.m_properties[CLEAR_DEVICE_UDI] = properties[CLEAR_DEVICE_UDI];
m.m_properties[HIDDEN] = properties[HIDDEN];
m.m_properties[SOFT_HIDDEN] = properties[SOFT_HIDDEN];
}
return m;
}
示例2: updateDCOPFunctions
void EditAction::updateDCOPFunctions()
{
theDCOPFunctions->clear();
if(theDCOPApplications->currentText().isNull() || theDCOPApplications->currentText().isEmpty()) return;
TQStringList functions = AddAction::getFunctions(nameProgramMap[theDCOPApplications->currentText()], theDCOPObjects->currentText());
if(!functions.size() && theDCOPApplications->currentText() == (*theAction).program()) theDCOPFunctions->insertItem((*theAction).method().prototype());
for(TQStringList::iterator i = functions.begin(); i != functions.end(); ++i)
theDCOPFunctions->insertItem(*i);
updateArguments();
}
示例3: loadServers
bool EvaServers::loadServers( )
{
TQFile file(filename);
if(!file.open(IO_ReadOnly)){
return false;
}
TQTextStream stream(&file);
TQString line;
TQStringList lineList;
int nextType = 0;
while(!stream.atEnd()){
line = stream.readLine().stripWhiteSpace();
if(line == "UDP"){
nextType = UDP;
continue;
}else if(line == "TCP"){
nextType = TCP;
continue;
} else if(line == "" ){
continue;
}
lineList = TQStringList::split(":", line);
if(lineList.size() != 2)
continue;
lineList[0].stripWhiteSpace();
serverItem *item = new serverItem();
if(lineList[0]=="URL"){
item->type = Addr_URL;
}else if(lineList[0]=="IP"){
item->type = Addr_IP;
}else
continue;
item->addr = lineList[1].stripWhiteSpace();
if(nextType == UDP){
UDPServers.append(*item);
}
if(nextType == TCP){
TCPServers.append(*item);
}
}
file.close();
return true;
}
示例4: loadConfig
void QuickLauncher::loadConfig()
{
DEBUGSTR << "QuickLauncher::loadConfig()" << endl << flush;
//TDEConfig *c = config();
//c->setGroup("General");
setConserveSpace(m_settings->conserveSpace());
setDragEnabled(m_settings->dragEnabled());
/*DEBUGSTR << " IconDim="<<m_iconDim << endl << flush;
DEBUGSTR << " ConserveSpace=" << (m_manager->conserveSpace()) <<
endl << flush;
DEBUGSTR << " DragEnabled=" << isDragEnabled() << endl << flush;*/
TQStringList volatileButtons = m_settings->volatileButtons();
TQStringList urls = m_settings->buttons();
if (m_settings->showDesktopEnabled()) {
if (!urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP"))
urls.prepend("SPECIAL_BUTTON__SHOW_DESKTOP");
}
else {
if (urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP"))
urls.remove("SPECIAL_BUTTON__SHOW_DESKTOP");
}
kdDebug() << "GetButtons " << urls.join("/") << endl;
TQStringList::Iterator iter(urls.begin());
int n = 0;
while (iter != urls.end()) {
TQString url = *iter;
addApp(url, n, false);
++iter;
++n;
}
// Restore sticky state
for (n=0; n<int(m_buttons->size()); ++n)
{
QuickButton* button = (*m_buttons)[n];
if (volatileButtons.contains(button->menuId()) == false)
{
button->setSticky(true);
}
button->setDynamicModeEnabled(m_settings->autoAdjustEnabled());
}
m_popularity->readConfig(m_settings);
m_popularity->setHistoryHorizon(m_settings->historyHorizon()/100.0);
TQStringList serviceNames = m_settings->serviceNames();
TQValueList<int> insPos = m_settings->serviceInspos();
for (int n=std::min(serviceNames.size(),insPos.size())-1; n>=0; --n)
{
m_appOrdering[serviceNames[n]] = insPos[n];
}
}
示例5: createList
Medium::MList Medium::createList(const TQStringList &properties)
{
MList l;
if ( properties.size() % (PROPERTIES_COUNT+1) == 0)
{
int media_count = properties.size()/(PROPERTIES_COUNT+1);
TQStringList props = properties;
for(int i=0; i<media_count; i++)
{
const Medium m = create(props);
l.append(m);
TQStringList::iterator first = props.begin();
TQStringList::iterator last = props.find(SEPARATOR);
++last;
props.erase(first, last);
}
}
return l;
}
示例6: getKDEKeyByEmail
TQStringList KSSLD::getKDEKeyByEmail(const TQString &email) {
TQStringList rc;
TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email.lower());
kdDebug() << "GETKDEKey " << email.latin1() << endl;
if (it == skEmail.end())
return rc;
TQPtrVector<KSSLCertificate> &elem = *it;
for (unsigned int n = 0; n < elem.size(); n++) {
KSSLCertificate *cert = elem.at(n);
if (cert) {
rc.append(cert->getKDEKey());
}
}
kdDebug() << "ergebnisse: " << rc.size() << " " << elem.size() << endl;
return rc;
}
示例7: dcopCall
KonqSidebarWeather::KonqSidebarWeather(TDEInstance* inst, TQObject* parent,
TQWidget* widgetParent,
TQString& desktopName, const char* name)
: KonqSidebarPlugin(inst, parent, widgetParent, desktopName, name),
DCOPObject(name)
{
m_container = new sidebarwidget(widgetParent,"sidebarwidget");
kdDebug() << "Calling Get Widget" << endl;
kdDebug() << "Get weatherstation list... " << endl;
if (!connectDCOPSignal(0,0,
"fileUpdate(TQString)",
"refresh(TQString)",false))
kdDebug() << "Could not attach signal..." << endl;
else
kdDebug() << "attached dcop signals..." << endl;
DCOPRef dcopCall( "KWeatherService", "WeatherService" );
DCOPReply reply = dcopCall.call("listStations()", true );
if ( reply.isValid() ) {
TQStringList replyList = reply;
for(int i = 0; i < replyList.size(); i++)
{
dockwidget *d = new dockwidget(m_container->viewport(), replyList[i].latin1());
m_container->addWidget(d, replyList[i].latin1());
d->resizeView(80,48);
d->show();
m_widgets.insert(replyList[i], d);
dcopCall.send("update(TQString)", replyList[i]);
}
}
timeOut = new TQTimer(this, "timeOut" );
timeOut->changeInterval(15*60000);
connect(timeOut, TQT_SIGNAL(timeout()), this, TQT_SLOT(update()));
// m_widgets.append(new dockwidget(widgetParent));
}
示例8: update
void KonqSidebarWeather::update()
{
timeOut->stop();
DCOPRef dcopCall( "KWeatherService", "WeatherService" );
DCOPReply reply = dcopCall.call("listStations()", true );
if ( reply.isValid() ) {
TQStringList replyList = reply;
for(int i = 0; i < replyList.size(); i++)
{
if(!m_widgets.find(replyList[i]))
{
dockwidget *d = new dockwidget(m_container->viewport(), replyList[i].latin1());
m_container->addWidget(d, replyList[i].latin1());
d->show();
m_widgets.insert(replyList[i], d);
}
dcopCall.send("update(TQString)", replyList[i]);
}
}
timeOut->start(15*60000);
}
示例9: saveConfig
void QuickLauncher::saveConfig()
{
if (!m_refreshEnabled)
{
m_needsSave=true;
return;
}
TQStringList urls, volatileUrls;
ButtonIter iter = m_buttons->begin();
while (iter != m_buttons->end()) {
if ((*iter)->sticky() == false)
{
volatileUrls.append((*iter)->menuId());
}
urls.append((*iter)->menuId());
++iter;
}
m_settings->setButtons(urls);
kdDebug() << "SetButtons " << urls.join("/") << endl;
m_settings->setVolatileButtons(volatileUrls);
m_settings->setConserveSpace(m_manager->conserveSpace());
m_settings->setDragEnabled(isDragEnabled());
m_popularity->writeConfig(m_settings);
// m_popularity must have written the current service list by now
TQStringList serviceNames = m_settings->serviceNames();
TQValueList<int> insertionPositions;
for (int n=0; n<int(serviceNames.size()); ++n)
{
if (m_appOrdering.find(serviceNames[n]) != m_appOrdering.end())
{
insertionPositions.push_back(m_appOrdering[serviceNames[n]]);
}
}
m_settings->setServiceInspos(insertionPositions);
m_settings->writeConfig();
}
示例10: mediamanager
PropertiesPage::PropertiesPage(TQWidget* parent, const TQString &_id)
: PropertiesPageGUI(parent), id(_id)
{
kdDebug() << "props page " << id << endl;
DCOPRef mediamanager("kded", "mediamanager");
DCOPReply reply = mediamanager.call( "mountoptions", id);
TQStringList list;
if (reply.isValid())
list = reply;
if (list.size()) {
kdDebug() << "list " << list << endl;
for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
{
TQString key = (*it).left((*it).find('='));
TQString value = (*it).mid((*it).find('=') + 1);
kdDebug() << "key '" << key << "' value '" << value << "'\n";
options[key] = value;
}
if (!options.contains("ro"))
option_ro->hide();
else
option_ro->setChecked(options["ro"] == "true");
connect( option_ro, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("quiet"))
option_quiet->hide();
else
option_quiet->setChecked(options["quiet"] == "true");
connect( option_quiet, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("sync"))
option_sync->hide();
else
option_sync->setChecked(options["sync"] == "true");
connect( option_sync, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("atime"))
option_atime->hide();
else
option_atime->setChecked(options["atime"] == "true");
connect( option_atime, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("flush"))
option_flush->hide();
else
option_flush->setChecked(options["flush"] == "true");
connect( option_flush, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("utf8"))
option_utf8->hide();
else
option_utf8->setChecked(options["utf8"] == "true");
connect( option_utf8, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("uid"))
option_uid->hide();
else
option_uid->setChecked(options["uid"] == "true");
connect( option_uid, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("shortname"))
{
option_shortname->hide();
text_shortname->hide();
}
else
{
for (int index = 0; short_names[index]; ++index)
if (options["shortname"] == short_names[index])
{
option_shortname->setCurrentItem(index);
break;
}
connect( option_shortname, TQT_SIGNAL( activated(int) ), TQT_SIGNAL( changed() ) );
}
if (!options.contains("journaling"))
{
text_journaling->hide();
option_journaling->hide();
}
else
{
for (int index = 0; journales[index]; ++index)
if (options["journaling"] == journales[index])
{
option_journaling->setCurrentItem(index);
break;
}
connect( option_journaling, TQT_SIGNAL( activated(int) ), TQT_SIGNAL( changed() ) );
}
label_filesystem->setText(i18n("Filesystem: %1").arg(options["filesystem"]));
option_mountpoint->setText(options["mountpoint"]);
connect( option_mountpoint, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SIGNAL( changed() ) );
//.........这里部分代码省略.........