当前位置: 首页>>代码示例>>C++>>正文


C++ KIconLoader::loadIconSet方法代码示例

本文整理汇总了C++中KIconLoader::loadIconSet方法的典型用法代码示例。如果您正苦于以下问题:C++ KIconLoader::loadIconSet方法的具体用法?C++ KIconLoader::loadIconSet怎么用?C++ KIconLoader::loadIconSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KIconLoader的用法示例。


在下文中一共展示了KIconLoader::loadIconSet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getSystemIconSet

QIconSet Util::getSystemIconSet( const QString& name )
{
#ifdef QT_ONLY
    QPixmap pix;
    pix.convertFromImage( qembed_findImage( name ) );
    return QIconSet( pix );
#else
  KIconLoader loader;
  return loader.loadIconSet( name, KIcon::Toolbar);
#endif

}
开发者ID:serghei,项目名称:kde3-kdeutils,代码行数:12,代码来源:util.cpp

示例2: createLayout

void LoggingOptions::createLayout( )
{	QGridLayout* gridLayout      = new QGridLayout( this );
	KIconLoader* iconLoader      = KGlobal::iconLoader( );
	QIconSet     fileOpenIconSet = iconLoader->loadIconSet( "fileopen",   KIcon::Small );

	m_baseFileNameButton   = new QPushButton( fileOpenIconSet, NULL, this, "base file name button" );
	m_grepableLogButton    = new QPushButton( fileOpenIconSet, NULL, this, "grepable log button"   );
	m_normalLogButton      = new QPushButton( fileOpenIconSet, NULL, this, "normal log button"     );
	m_resumeButton         = new QPushButton( fileOpenIconSet, NULL, this, "resume button"         );
	m_scriptKiddieButton   = new QPushButton( fileOpenIconSet, NULL, this, "script kiddie button"  );
	m_stylesheetButton     = new QPushButton( fileOpenIconSet, NULL, this, "stylesheet button"     );
	m_xmlLogButton         = new QPushButton( fileOpenIconSet, NULL, this, "xml log button"        );

	m_appendOutputCheckBox = new QCheckBox( i18n( "Append output (--append_output)"       ), this, "append output checkbox" );
	m_baseFileNameCheckBox = new QCheckBox( i18n( "Base file name (-oA <name>) "          ), this, "base name checkbox"     );
	m_grepableLogCheckBox  = new QCheckBox( i18n( "grep'able log file (-oG <file>) "      ), this, "grepable log checkbox"  );
	m_normalLogCheckBox    = new QCheckBox( i18n( "Normal log file (-oN <file>) "         ), this, "normal log checkbox"    );
	m_noStylesheetCheckBox = new QCheckBox( i18n( "No XSL stylesheet (--no_stylesheet)"   ), this, "no stylesheet checkbox" );
	m_resumeCheckBox       = new QCheckBox( i18n( "Resume file (--resume <file>) "        ), this, "resume checkbox"        );
	m_scriptKiddieCheckBox = new QCheckBox( i18n( "Script kiddie log file (-oS <file>) "  ), this, "script kiddie checkbox" );
	m_stylesheetCheckBox   = new QCheckBox( i18n( "XSL stylesheet (--stylesheet <file>) " ), this, "stylesheet checkbox"    );
	m_xmlLogCheckBox       = new QCheckBox( i18n( "XML log file (-oX <file>) "            ), this, "xml log checkbox"       );

	m_baseFileNameLineEdit = new QLineEdit( this, "base file name line edit" );
	m_grepableLogLineEdit  = new QLineEdit( this, "grepable log line edit"   );
	m_normalLogLineEdit    = new QLineEdit( this, "normal log line edit"     );
	m_resumeLineEdit       = new QLineEdit( this, "resume line edit"         );
	m_scriptKiddieLineEdit = new QLineEdit( this, "script kiddie line edit"  );
	m_stylesheetLineEdit   = new QLineEdit( this, "stylesheet line edit"     );
	m_xmlLogLineEdit       = new QLineEdit( this, "xml log line edit"        );

	byte row = 1;
	gridLayout->addWidget( m_appendOutputCheckBox, row++, 1 );
	gridLayout->addWidget( m_noStylesheetCheckBox, row++, 1 );
	byte rowBlock1 = row;

	row = 1;
	gridLayout->addWidget( m_baseFileNameCheckBox, row,   3 );
	gridLayout->addWidget( m_baseFileNameLineEdit, row,   4 );
	gridLayout->addWidget( m_baseFileNameButton,   row++, 5 );

	gridLayout->addWidget( m_grepableLogCheckBox,  row,   3 );
	gridLayout->addWidget( m_grepableLogLineEdit,  row,   4 );
	gridLayout->addWidget( m_grepableLogButton,    row++, 5 );

	gridLayout->addWidget( m_normalLogCheckBox,    row,   3 );
	gridLayout->addWidget( m_normalLogLineEdit,    row,   4 );
	gridLayout->addWidget( m_normalLogButton,      row++, 5 );

	gridLayout->addWidget( m_resumeCheckBox,       row,   3 );
	gridLayout->addWidget( m_resumeLineEdit,       row,   4 );
	gridLayout->addWidget( m_resumeButton,         row++, 5 );

	gridLayout->addWidget( m_scriptKiddieCheckBox, row,   3 );
	gridLayout->addWidget( m_scriptKiddieLineEdit, row,   4 );
	gridLayout->addWidget( m_scriptKiddieButton,   row++, 5 );

	gridLayout->addWidget( m_xmlLogCheckBox,       row,   3 );
	gridLayout->addWidget( m_xmlLogLineEdit,       row,   4 );
	gridLayout->addWidget( m_xmlLogButton,         row++, 5 );

	gridLayout->addWidget( m_stylesheetCheckBox,   row,   3 );
	gridLayout->addWidget( m_stylesheetLineEdit,   row,   4 );
	gridLayout->addWidget( m_stylesheetButton,     row++, 5 );
	byte rowBlock2 = row;

	gridLayout->setColStretch( 0,  5 );
	gridLayout->setColStretch( 2,  5 );
	gridLayout->setColStretch( 4, 10 );
	gridLayout->setColStretch( 6,  5 );

	gridLayout->setRowStretch( 0, 10 );
	gridLayout->setRowStretch( _max_( rowBlock1, rowBlock2 ), 10 );
}
开发者ID:netrunner-debian-kde-extras,项目名称:knmap,代码行数:74,代码来源:loggingoptions.cpp


注:本文中的KIconLoader::loadIconSet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。