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


C++ QIconSet函数代码示例

本文整理汇总了C++中QIconSet函数的典型用法代码示例。如果您正苦于以下问题:C++ QIconSet函数的具体用法?C++ QIconSet怎么用?C++ QIconSet使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: QTab

void ClsQDiagramView::addTab(int iType, string strName, string strID) {
#ifdef DEBUG_CLSQDIAGRAMVIEW
    cout << "ClsQDiagramView::addTab(string strName, string strID)" << endl;
#endif


//     int ii;
//     memcpy(&ii, strID.c_str(), sizeof(int));

//     int iT = qtabbar->addTab(new QTab (strName.c_str()));
//     QTab* qq =  qtabbar->tab(iT);
//     qq->setIdentifier(ii);
//     qtabbar->repaint();

//    cout << "strID: " << strID << endl;
//    cout << "strName: " << strName << endl;

    int iT = qtabbar->addTab(new QTab (strName.c_str()));
//    cout << "iT: " << iT << endl;
    qmapTabIdentifyers[iT] = strID;

    QTab* qq =  qtabbar->tab(iT); //tab() or tabAt() ???
//    cout << "qq NULL?: " << (qq==NULL ? "yes" : "no") << endl;

    if(iType == ClsFESystemManager::ITEM_SYSTEM){
	qq->setIconSet(QIconSet(QPixmap(LetterS_2)));
    }
    else if(iType == ClsFESystemManager::ITEM_PROCESS){
	qq->setIconSet(QIconSet(QPixmap(LetterP_2)));
    }

    qq->setIdentifier(iT);
    qtabbar->repaint();

};
开发者ID:jeez,项目名称:iqr,代码行数:35,代码来源:ClsQDiagramView.cpp

示例2: kScheduleBriefWidget

KMyMoneyBriefSchedule::KMyMoneyBriefSchedule(QWidget *parent, const char *name )
  : kScheduleBriefWidget(parent,name, WStyle_Customize | WStyle_NoBorder)
{
  KIconLoader *ic = KGlobal::iconLoader();
  m_nextButton->setPixmap(BarIcon(QString::fromLatin1("1rightarrow")));
  m_prevButton->setPixmap(BarIcon(QString::fromLatin1("1leftarrow")));

  connect(m_prevButton, SIGNAL(clicked()), this, SLOT(slotPrevClicked()));
  connect(m_nextButton, SIGNAL(clicked()), this, SLOT(slotNextClicked()));
  connect(m_closeButton, SIGNAL(clicked()), this, SLOT(hide()));
  connect(m_skipButton, SIGNAL(clicked()), this, SLOT(slotSkipClicked()));
  connect(m_buttonEnter, SIGNAL(clicked()), this, SLOT(slotEnterClicked()));

  KGuiItem skipGuiItem(  i18n("&Skip"),
                          QIconSet(ic->loadIcon("player_fwd", KIcon::Small, KIcon::SizeSmall)),
                          i18n("Skip this transaction"),
                          i18n("Use this button to skip this transaction"));
  m_skipButton->setGuiItem(skipGuiItem);

  KGuiItem enterGuiItem(  i18n("&Enter"),
                          QIconSet(ic->loadIcon("key_enter", KIcon::Small, KIcon::SizeSmall)),
                          i18n("Record this transaction into the register"),
                          i18n("Use this button to record this transaction"));
  m_buttonEnter->setGuiItem(enterGuiItem);
}
开发者ID:sajidji94,项目名称:kmymoney2,代码行数:25,代码来源:kmymoneybriefschedule.cpp

示例3: iconSet

    QIconSet iconSet( const QString &key ) const
    {
	static QPixmap icon( (const char **)qsa_xpm );
	if ( key == "QSEditor" )
	    return QIconSet( icon );
	return QIconSet();
    }
开发者ID:AliYousuf,项目名称:pdfedit-ng-,代码行数:7,代码来源:qseditorplugin.cpp

示例4: kdDebug

KActionMenu* WPAccount::actionMenu()
{
	kdDebug(14170) <<  "WPAccount::actionMenu()" << endl;

	/// How to remove an action from Kopete::Account::actionMenu()? GF

	KActionMenu *theActionMenu = new KActionMenu(accountId() , myself()->onlineStatus().iconFor(this), this);
	theActionMenu->popupMenu()->insertTitle(myself()->onlineStatus().iconFor(this), i18n("WinPopup (%1)").arg(accountId()));

	if (mProtocol)
	{
		KAction *goOnline = new KAction("Online", QIconSet(mProtocol->WPOnline.iconFor(this)), 0,
										 this, SLOT(connect()), theActionMenu, "actionGoAvailable");
		goOnline->setEnabled(isConnected() && isAway());
		theActionMenu->insert(goOnline);

		KAction *goAway = new KAction("Away", QIconSet(mProtocol->WPAway.iconFor(this)), 0,
									  this, SLOT(goAway()), theActionMenu, "actionGoAway");
		goAway->setEnabled(isConnected() && !isAway());
		theActionMenu->insert(goAway);

		/// One can not really go offline manually - appears online as long as samba server is running. GF

		theActionMenu->popupMenu()->insertSeparator();
		theActionMenu->insert(new KAction(i18n("Properties"),  0,
							  this, SLOT(editAccount()), theActionMenu, "actionAccountProperties"));

	}

	return theActionMenu;
}
开发者ID:serghei,项目名称:kde3-kdenetwork,代码行数:31,代码来源:wpaccount.cpp

示例5: QIconSet

QIconSet QuickCustomWidgetInterface::iconSet( const QString &feature ) const
{
    if ( feature == "PaintWidget" )
        return QIconSet( QPixmap( pixlabel_pixmap ) );
    else if ( feature == "ColorButton" )
        return QIconSet( QPixmap( pushbutton_pixmap ) );
    return QIconSet();
}
开发者ID:Miguel-J,项目名称:eneboo-core,代码行数:8,代码来源:quickcustom.cpp

示例6: getMainWindow

void VoronoiDiagramPlugin::init()
{
	TerraViewBase* tview = getMainWindow();

    try
	{
		if(tview)
		{
            // Voronoi
			showVoronoiWinAction_ = new QAction(0, "Voronoi", false);
			showVoronoiWinAction_->setMenuText(tr("Voronoi"));
			showVoronoiWinAction_->setText(tr("Voronoi"));
            showVoronoiWinAction_->setIconSet(QIconSet(QPixmap::fromMimeSource("voronoi.png")));

            // Voronoi Ponderado Multiplicativamente 
			showMWVoronoiWinAction_ = new QAction(0, "Voronoi Ponderado Multiplicativamente", false);
			showMWVoronoiWinAction_->setMenuText(tr("Voronoi Ponderado Multiplicativamente"));
			showMWVoronoiWinAction_->setText(tr("Voronoi Ponderado Multiplicativamente"));
            showMWVoronoiWinAction_->setIconSet(QIconSet(QPixmap::fromMimeSource("mwvoronoi.png")));

            // Delaunay
            showDelaunayWinAction_ = new QAction(0, "Delaunay", false);
			showDelaunayWinAction_->setMenuText(tr("Delaunay"));
			showDelaunayWinAction_->setText(tr("Delaunay"));
            showDelaunayWinAction_->setIconSet(QIconSet(QPixmap::fromMimeSource("delaunay.png")));

            QString mainMenuName = "TerraViewPlugins.";
            mainMenuName += tr("Diagrams");
            QPopupMenu* mnu = getPluginsMenu(mainMenuName.latin1());

			if(mnu != 0)
			{
				if(!showVoronoiWinAction_->addTo(mnu))
					throw;
                if(!showMWVoronoiWinAction_->addTo(mnu))
					throw;
                if(!showDelaunayWinAction_->addTo(mnu))
					throw;

			}

			connect(showVoronoiWinAction_, SIGNAL(activated()), this, SLOT(showVoronoiWindow()));
            connect(showMWVoronoiWinAction_, SIGNAL(activated()), this, SLOT(showMWVoronoiWindow()));
            connect(showDelaunayWinAction_, SIGNAL(activated()), this, SLOT(showDelaunayWindow()));
		}
	}
	catch(...)
	{
		QMessageBox::critical(tview, tr("TerraView plug-in error"), tr("Can't create plug-in menu."));
		delete showVoronoiWinAction_;
		showVoronoiWinAction_ = 0;
        delete showMWVoronoiWinAction_;
		showMWVoronoiWinAction_ = 0;
        delete showDelaunayWinAction_;
		showDelaunayWinAction_ = 0;
        
	}
}
开发者ID:mauriciodev,项目名称:MWVoronoi,代码行数:58,代码来源:voronoidiagramplugin.cpp

示例7: RK_TRACE

void RKCommandEditorWindowPart::initializeActions () {
	RK_TRACE (COMMANDEDITOR);

	runAll = new KAction (i18n ("Run all"), QIconSet (RKCommonFunctions::getRKWardDataDir () + "icons/run_all.png"), KShortcut ("F9"), command_editor, SLOT (runAll()), actionCollection (), "run_all");
	runSelection = new KAction (i18n ("Run selection"), QIconSet (RKCommonFunctions::getRKWardDataDir () + "icons/run_selection.png"), KShortcut ("F8"), command_editor, SLOT (runSelection()), actionCollection (), "run_selection");
	runLine = new KAction (i18n ("Run current line"), QIconSet (RKCommonFunctions::getRKWardDataDir () + "icons/run_line.png"), KShortcut ("Ctrl+L"), command_editor, SLOT (runLine()), actionCollection (), "run_line");

	helpFunction = new KAction (i18n ("&Function reference"), KShortcut ("F2"), command_editor, SLOT (showHelp()), actionCollection (), "function_reference");
}
开发者ID:svn2github,项目名称:rkward-svn-mirror,代码行数:9,代码来源:rkcommandeditorwindowpart.cpp

示例8: SLOT

/*
 * Initialize the GUI interface for the plugin 
 */
void IMExportPlugin::initGui()
{
  QPopupMenu *pluginMenu = mQGisIface->getPluginMenu("&Image Map Exporter");
  mMenuId = pluginMenu->insertItem(QIconSet(icon),"&Image Map Exporter", this, SLOT(run()));

  // Create the action for the tool
  QAction *myQActionPointer = new QAction("Image Map Exporter", QIconSet(icon),
					  "&Wmi",0, this, "run");
  connect(myQActionPointer, SIGNAL(activated()), this, SLOT(run()));
  mQGisIface->addToolBarIcon(myQActionPointer);
}
开发者ID:alexckp,项目名称:qgis,代码行数:14,代码来源:imexportplugin.cpp

示例9: EvaUserUIBase

EvaDetailsWindow::EvaDetailsWindow(  QStringList &user, QWidget* parent, const char* name, bool modal, WFlags fl)
	: EvaUserUIBase( parent, name, modal, fl ),
	details( user ),selectedFaceIndex( 0 )
{
  
        
	QObject::connect( pbUpdate, SIGNAL( clicked() ), this, SLOT( slotUpdateClick() ) );	//Click the update button
	QObject::connect( pbClose, SIGNAL( clicked() ), this, SLOT( close() ) );	//Click the close button
	
	QObject::connect( tbtnShop, SIGNAL( clicked() ), this, SLOT( slotShopClicked() ) );
	QObject::connect( tbtnAlbum, SIGNAL( clicked() ), this, SLOT( slotAlbumClicked() ) );
	
	QObject::connect( kpbUpdateShow, SIGNAL( clicked() ), this, SLOT( slotUpdateQQShow() ) );
	QObject::connect( twTabMain, SIGNAL(currentChanged(QWidget*)), this, SLOT( slotCurrentChanged(QWidget*)));
	
	QObject::connect( pbDownloadMemo, SIGNAL( clicked() ), this, SLOT( slotDownloadMemo() ));
	//QObject::connect( tabWidget, SIGNAL(currentChanged(QWidget*)), this, SLOT(currentChanged(QWidget*)) );
	
	m_IsModifyMemo = false;
	codec = QTextCodec::codecForName("GB18030");
	
	bool ok;
	id = details[0].toUInt(&ok, 10);
	if(!ok) return;
	frd = (EvaMain::user->getFriendList()).getFriend(id); //get the user qq of this details window
	
	setCaption( i18n( "View User Info") );//set the title of this dialog

	qwUserInfo->lblBasicInfo->setPixmap(*faces->getIcon("DETAILS_BASIC_INFO"));
	qwUserInfo->lblDetails->setPixmap(*faces->getIcon("DETAILS_DETAILS"));
	qwUserInfo->lblDescription->setPixmap(*faces->getIcon("DETAILS_DESCRIPTION"));
	
	chbAutoUploadMemo->setChecked(true);
	if(!frd){ // He/She is not in your buddy list
		twTabMain->setTabEnabled(twTabMain->page(2), false);
	}
	if(faces){
		QPixmap *icon = faces->getIcon("QQ_SHOP");
		if(icon)
			tbtnShop->setIconSet(QIconSet(*icon));// add Icon to QQShow shop button
	} 
	if(faces){
		QPixmap *icon = faces->getIcon("QQ_ALBUM");
		if(icon)
			tbtnAlbum->setIconSet(QIconSet(*icon));
	}
	
	UpdateData(true);
	if(details.size()!=37) {
		QTimer::singleShot(500, this, SLOT(slotFirstUpdate()));
	}
	
	
}
开发者ID:evareborn,项目名称:eva-nirvana,代码行数:54,代码来源:evadetailswindow.cpp

示例10: setIcon

QucsEdit::QucsEdit(const QString& FileName_, bool readOnly)
{
  // set application icon
  setIcon (QPixmap(QucsSettings.BitmapDir + "big.qucs.xpm"));
  setCaption("Qucs Editor " PACKAGE_VERSION " - " + tr("File: "));

  QVBoxLayout *v = new QVBoxLayout(this);

  QHBox *h = new QHBox(this);
  v->addWidget(h);

  QToolButton *ButtLoad = new QToolButton(h);
  ButtLoad->setIconSet(
	    QIconSet(QImage(QucsSettings.BitmapDir + "fileopen.png")));
  connect(ButtLoad, SIGNAL(clicked()), SLOT(slotLoad()));

  QToolButton *ButtSave = new QToolButton(h);
  ButtSave->setIconSet(
            QIconSet(QImage(QucsSettings.BitmapDir + "filesave.png")));
  connect(ButtSave, SIGNAL(clicked()), SLOT(slotSave()));
  ButtSave->setDisabled(readOnly);

  h->setStretchFactor(new QWidget(h),5); // stretchable placeholder
  PosText = new QLabel(tr("Line: %1  -  Column: %2").arg(1).arg(1), h);
  h->setStretchFactor(new QWidget(h),5); // stretchable placeholder

  QPushButton *ButtAbout = new QPushButton(tr("About"),h);
  connect(ButtAbout, SIGNAL(clicked()), SLOT(slotAbout()));

  QPushButton *ButtOK = new QPushButton(tr("Quit"),h);
  connect(ButtOK, SIGNAL(clicked()), SLOT(slotQuit()));
  ButtOK->setFocus();

  // try using same-sized mono-spaced font in the textarea
  QFont fedit = QFont("Courier New");
  fedit.setPointSize(QucsSettings.font.pointSize()-1);
  fedit.setStyleHint(QFont::Courier);
  fedit.setFixedPitch(true);

  text = new QTextEdit(this);
  text->setTextFormat(Qt::PlainText);
  text->setReadOnly(readOnly);
  text->setWordWrap(QTextEdit::NoWrap);
  text->setMinimumSize(300,200);
  text->setFont(fedit);
  text->setCurrentFont(fedit);
  v->addWidget(text);
  connect(text, SIGNAL(cursorPositionChanged(int, int)),
          SLOT(slotPrintCursorPosition(int, int)));

  // .................................................
  loadFile(FileName_);
}
开发者ID:MikeBrinson,项目名称:qucs,代码行数:53,代码来源:qucsedit.cpp

示例11: QIconSet

/*!
    Returns the iconset of page \a w or a \link QIconSet::QIconSet()
    null iconset\endlink if \a w is not a tab page or does not have an
    iconset.
*/
QIconSet QTabWidget::tabIconSet( QWidget * w ) const
{
    int id = d->stack->id( w );
    if ( id < 0 )
        return QIconSet();
    QTab* t = d->tabs->tab( id );
    if ( !t )
        return QIconSet();
    if ( t->iconset )
	return QIconSet( *t->iconset );
    else
	return QIconSet();
}
开发者ID:OS2World,项目名称:LIB-QT3_Toolkit_Vbox,代码行数:18,代码来源:qtabwidget.cpp

示例12: setupDataBase

QIconSet WidgetDatabase::iconSet( int id )
{
    setupDataBase();
    WidgetDatabaseRecord *r = at( id );
    if ( !r )
	return QIconSet();
#if defined(DESIGNER)
    if ( !r->icon )
	r->icon = new QIconSet( PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Small ),
				PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Large ) );
    return *r->icon;
#endif

    return QIconSet();
}
开发者ID:kthxbyte,项目名称:QT2-Linaro,代码行数:15,代码来源:widgetdatabase.cpp

示例13: message

void CallTab::muteSpkButtonClicked()
{
	bool on = muteSpkButton->isOn();
	if (on)
	{
		message("Audio output disabled.");
		muteSpkButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "speaker_mute.png" ) ) );
	}
	else 
	{
		message("Audio output enabled.");
		muteSpkButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "speaker.png" ) ) );
	}
	emit muteSpkSignal(callId, on);
}
开发者ID:nightfly19,项目名称:renyang-learn,代码行数:15,代码来源:CallTab.cpp

示例14: setMainWidgetTitle

SettingDlg::SettingDlg():MyBaseDlg()
{
    isCancel = true;
    isFullScreenMode = false;

    setMainWidgetTitle("App Setting");

    form0 = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
    //listBox0 = new ZListBox("%C%M", this);
    form1 = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
    form2 = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
    form3 = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);
    form4 = new ZFormContainer(this, 0, ZSkinService::clsZFormContainer);

    tabWidget = new ZNavTabWidget(this);
    this->setContentWidget(tabWidget);
    tabWidget->stopNextWhenKeyRepeat(true);

    QPixmap imgTab;
    imgTab.load(getAppDir()+"/img/tab0.png");
    tabWidget->addTab(form0, QIconSet(imgTab), "");
    imgTab.load(getAppDir()+"/img/tab1.png");
    tabWidget->addTab(form1, QIconSet(imgTab), "");
    imgTab.load(getAppDir()+"/img/tab2.png");
    tabWidget->addTab(form2, QIconSet(imgTab), "");
    imgTab.load(getAppDir()+"/img/tab3.png");
    tabWidget->addTab(form3, QIconSet(imgTab), ""); ;
    imgTab.load(getAppDir()+"/img/tab4.png");
    tabWidget->addTab(form4, QIconSet(imgTab), "");

    ZSoftKey *softKey = new ZSoftKey ( NULL, this, this );
    softKey->setText(ZSoftKey::LEFT,  lng->tr("FT_SELECT"), (ZSoftKey::TEXT_PRIORITY)0);
    softKey->setText(ZSoftKey::RIGHT, lng->tr("FT_CANCEL"), (ZSoftKey::TEXT_PRIORITY)0);
    softKey->setClickedSlot(ZSoftKey::RIGHT, this, SLOT (reject()));
    softKey->setClickedSlot(ZSoftKey::LEFT, this, SLOT (accept()));
    setCSTWidget(softKey);

    imei = getIMEI();
    imsi = getIMSI();

    buildTab0();
    buildTab1();
    buildTab2();
    buildTab3();
    buildTab4();

    startTimer(300);
}
开发者ID:OpenMagx,项目名称:RokrToolsPro,代码行数:48,代码来源:settingDlg.cpp

示例15: while

void
aToolBar::ReadTool( aCfgItem &obj )
{
    aCfgItem aobj, apix;	// action and pixmap XML data
    QString aKey;	// key sequence
    long pid;	// action id
    
    aobj = md->firstChild( obj );	//from first child action
    while ( !aobj.isNull() ) {		// foreach not null
	aKey = md->sText ( aobj, md_key );	//key sequence
	pid = md->id( aobj );	// action id
	apix = md->findChild( 
		md->find( 
			md->text( md->findChild( aobj, md_comaction, 0 ) ).toLong() ), 
		            md_active_picture, 
                  		0 
		);	// first action pixmap cfg object
	QPixmap pix( md->binary( apix ) );	// pixmap
	QAction *a = new QAction( 
		QIconSet(pix), // pixmap
		md->attr( aobj, mda_name), // name
		aKey, // key sequence
		this, // owner
		md->attr( aobj, mda_name) // name
	);	// create new action
	actions.insert( pid, a );	// add action to dict
	a->addTo( this );	// put action into toolbar
	connect( a, SIGNAL(activated()), this, SLOT(on_Item()) );	// connect to slot
	aobj = md->nextSibling( aobj );	// get next action
    }
}
开发者ID:app,项目名称:ananas-labs,代码行数:31,代码来源:atoolbar.cpp


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