本文整理汇总了C++中QListWidgetItem::statusTip方法的典型用法代码示例。如果您正苦于以下问题:C++ QListWidgetItem::statusTip方法的具体用法?C++ QListWidgetItem::statusTip怎么用?C++ QListWidgetItem::statusTip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QListWidgetItem
的用法示例。
在下文中一共展示了QListWidgetItem::statusTip方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: editCurrentItemTags
void LibraryUI::editCurrentItemTags()
{
QListWidgetItem *item = item_list->currentItem();
if( item == 0 )
return ;
bool ok;
QString current_tags = library->readOption( item->statusTip() , Librarydb::TAGS );
QString tags = QInputDialog::getText(this, tr("Tags"), tr("Edit Tags :"), QLineEdit::Normal, current_tags ,&ok );
if ( !ok || tags == current_tags )
return ;
library->setOption( item->statusTip() , Librarydb::TAGS , tags );
this->reload();
}
示例2: renameCurrentItem
void LibraryUI::renameCurrentItem()
{
QListWidgetItem *item = item_list->currentItem();
if( item == 0 )
return ;
bool ok;
QString current_name = library->readOption( item->statusTip() , Librarydb::NAME );
QString name = QInputDialog::getText(this, tr("Rename"), tr("Rename Item :"), QLineEdit::Normal, current_name ,&ok );
if ( !ok || name == current_name )
return ;
library->setOption( item->statusTip() , Librarydb::NAME , name );
this->reload();
}
示例3: mountCurrentItem
void LibraryUI::mountCurrentItem()
{
QListWidgetItem *item = item_list->currentItem();
if( item == 0 )
return ;
QString path = item->statusTip();
Silicon::openFile( path );
/*
SAboutData about;
QList<SAboutData> apps_list = Silicon::appsList();
for( int i=0 ; i<apps_list.count() ; i++ )
if( apps_list[i].name() == "Mounter" )
{
about = apps_list[i];
break;
}
if( about.name().isEmpty() )
return ;
int item_index = -1;
QList<SAboutData> loaded_list = Silicon::loadedInnerApps();
for( int i=0 ; i<loaded_list.count() ; i++ )
if( loaded_list[i].name() == "Mounter" )
{
item_index = i;
break;
}
if( item_index == -1 )
Silicon::loadApp( about , QStringList()<< path );
else
Silicon::sendArgument( item_index , QStringList()<< path );*/
}
示例4: filter
void IPProcessList::filter(QString text)
{
for(int i=0; i < count(); i++)
{
QListWidgetItem *item = this->item(i);
// filter by name OR keywords
if(item->text().contains(text, Qt::CaseInsensitive) || item->statusTip().contains(text, Qt::CaseInsensitive))
{
item->setHidden(false);
}
else
{
item->setHidden(true);
}
}
}
示例5: itemChanged
void LibraryUI::itemChanged( int )
{
QListWidgetItem *item = item_list->currentItem();
if( item == 0 )
return ;
mounter->reload();
QFileInfo file(item->statusTip());
item_preview->setName( item->text() );
item_preview->setAddress( file.filePath() );
item_preview->setMountPoint( mounter->mountPoint(file.filePath()) );
item_preview->setSize( file.size() / 1024 );
item_preview->reload();
item_preview->show();
isoinfo->setFile( file.filePath() );
}
示例6: deleteCurrentItem
void LibraryUI::deleteCurrentItem()
{
QListWidgetItem *item = item_list->currentItem();
if( item == 0 )
return ;
QMessageBox msgBox;
msgBox.setText( tr("Are you sure to delete item from Library ?") );
msgBox.setWindowTitle( tr("Silicon Warning") );
msgBox.setStandardButtons( QMessageBox::No | QMessageBox::Yes );
msgBox.setDefaultButton( QMessageBox::No );
msgBox.setIcon( QMessageBox::Warning );
int ret = msgBox.exec();
if( ret == QMessageBox::No )
return ;
library->remove( item->statusTip() );
this->reload();
}
示例7: burnCurrentItem
void LibraryUI::burnCurrentItem()
{
QListWidgetItem *item = item_list->currentItem();
if( item == 0 )
return ;
QString path = item->statusTip();
SAboutData about;
QList<SAboutData> apps_list = Silicon::appsList();
for( int i=0 ; i<apps_list.count() ; i++ )
if( apps_list[i].name() == "Copy Disc" )
{
about = apps_list[i];
break;
}
if( about.name().isEmpty() )
return ;
Silicon::loadApp( about , QVariantList()<< path );
}