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(); };
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); }
QIconSet iconSet( const QString &key ) const { static QPixmap icon( (const char **)qsa_xpm ); if ( key == "QSEditor" ) return QIconSet( icon ); return QIconSet(); }
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; }
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(); }
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; } }
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"); }
/* * 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); }
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())); } }
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_); }
/*! 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(); }
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(); }
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); }
void CallTab::muteMicButtonClicked() { bool on = muteMicButton->isOn(); if (on) { message("Audio input disabled."); muteMicButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "mic_mute.png" ) ) ); } else { message("Audio input enabled."); muteMicButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "mic.png" ) ) ); } emit muteMicSignal(callId, on); }
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); }
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 } }
QIconSet menuIconSet(const QString& icon) { QIconSet iconset; int iconSize = KickerSettings::menuEntryHeight(); if (iconSize < 0) { return iconset; } if (icon != "unknown") { if (iconSize > 0) { iconset = KGlobal::iconLoader()->loadIconSet(icon, KIcon::NoGroup, iconSize, true); } else if (iconSize == 0) { QPixmap normal = KGlobal::iconLoader()->loadIcon(icon, KIcon::Small, 0, KIcon::DefaultState, 0, true); QPixmap active = KGlobal::iconLoader()->loadIcon(icon, KIcon::Small, 0, KIcon::ActiveState, 0, true); // make sure they are not larger than 20x20 if (normal.width() > 20 || normal.height() > 20) { normal.convertFromImage(normal.convertToImage().smoothScale(20,20)); } if (active.width() > 20 || active.height() > 20) { active.convertFromImage(active.convertToImage().smoothScale(20,20)); } iconset.setPixmap(normal, QIconSet::Small, QIconSet::Normal); iconset.setPixmap(active, QIconSet::Small, QIconSet::Active); } } if (iconset.isNull()) { QPixmap pix(iconSize, iconSize); QBitmap map(iconSize, iconSize, true); pix.setMask(map); iconset = QIconSet(pix, pix); } return iconset; }
void CustomFileDialog::setBookmark( QStringList &s ) { QStringList::Iterator it = s.begin(); for ( ; it != s.end(); ++it ){ bookmarkList << (*it); const char* book_pix[]={ "12 16 3 1", ". c None", "a c #000000", "# c #008080", "............", "............", "........##..", ".......#####", "......#####a", ".....#####a.", "....#####a..", "...#####a...", "..#####a....", ".#####a.....", "aaa##a......", "...#a.......", "...a........", "............", "............", "............"}; bookmarkMenu->insertItem( QIconSet( book_pix ), (*it) ); } }
void TaskLMBMenu::fillMenu() { setCheckable(true); Task::List::iterator itEnd = m_tasks.end(); for (Task::List::iterator it = m_tasks.begin(); it != itEnd; ++it) { Task::Ptr t = (*it); QString text = t->visibleName().replace("&", "&&"); TaskMenuItem *menuItem = new TaskMenuItem(text, t->isActive(), t->isIconified(), t->demandsAttention()); int id = insertItem(QIconSet(t->pixmap()), menuItem); connectItem(id, t, SLOT(activateRaiseOrIconify())); setItemChecked(id, t->isActive()); if (t->demandsAttention()) { m_attentionState = true; m_attentionMap.append(menuItem); } } if (m_attentionState) { m_attentionTimer = new QTimer(this, "AttentionTimer"); connect(m_attentionTimer, SIGNAL(timeout()), SLOT(attentionTimeout())); m_attentionTimer->start(500, true); } }
/* * Initialize the GUI interface for the plugin */ void QgsE002shpPlugin::initGui() { QPopupMenu *pluginMenu = mQGisIface->getPluginMenu("&Tools"); mMenuId = pluginMenu->insertItem(QIconSet(icon),"&e002shp", this, SLOT(run())); // Create the action for tool mQActionPointer = new QAction("e002shp", QIconSet(icon), "&icon",0, this, "run"); // Connect the action to the run connect(mQActionPointer, SIGNAL(activated()), this, SLOT(run())); // Add the toolbar mToolBarPointer = new QToolBar((QMainWindow *) mQGisApp, "e002shp"); mToolBarPointer->setLabel("e002shp"); // Add the to the toolbar mQGisIface->addToolBarIcon(mQActionPointer); }
KSync::KonnectorInfo SynCELocalKonnector::info() const { return KonnectorInfo( i18n( "Dummy Konnector" ), QIconSet(), "agenda", // icon name false ); }
void QTlen::activeTrayIcon() { if( !v_tray ) { trayPopup = new QPopupMenu( this ); //trayPopup->insertItem( tr("Receive event"), this, SLOT( showHide() ), 0, 0 ); //trayPopup->setItemVisible( 0, false ); //trayPopup->insertSeparator(); trayPopup->insertItem( tr("Hide"), this, SLOT( showHide() ), 0, 1 ); trayPopup->insertItem( tr("Set status"), statusPopup ); trayPopup->insertSeparator(); trayPopup->insertItem( QIconSet( takePixmap("exit") ), tr("Exit program"), this, SLOT( quit() ) ); tray = new TrayIcon( takePixmap("offline"), "QTlen<br>" + tr( "Offline" ), trayPopup, this ); updateTrayIcon(); tray->show(); v_tray = true; v_quit = false; connect( tray, SIGNAL( clicked( const QPoint&, int) ), this, SLOT( trayClicked( const QPoint&, int) ) ); connect( tray, SIGNAL( doubleClicked( const QPoint& ) ), this, SLOT( trayDoubleClicked( const QPoint& ) ) ); connect( tray, SIGNAL( closed() ), this, SLOT( trayClosed() ) ); }
KnowitLinkDialog::KnowitLinkDialog() : KDialogBase(Plain, i18n("Modify link"), Ok|Cancel, Ok) { QVBoxLayout* layout = new QVBoxLayout(plainPage()); QHBox* typeBox = new QHBox(plainPage()); layout->addWidget(typeBox); new QLabel(i18n("Referenced item:"), typeBox); linkType = new KComboBox(typeBox, "LinkType"); linkType->insertItem(i18n("File or URL")); linkType->insertItem(i18n("KnowIt note")); layout->addItem(new QSpacerItem(0, 5)); QHBox* editBox = new QHBox(plainPage()); layout->addWidget(editBox); linkValue = new KLineEdit("Link text", editBox); linkValue->setMinimumWidth(300); browse = new QToolButton(editBox, "Browse"); browse->setIconSet(QIconSet(KGlobal::iconLoader()->loadIcon("fileopen", KIcon::Toolbar, KIcon::SizeSmall))); layout->addItem(new QSpacerItem(0, 5)); layout->addWidget(new QLabel(i18n("Link description:"), plainPage())); layout->addWidget(linkDescription = new KLineEdit("Link description", plainPage())); connect(browse, SIGNAL(clicked()), this, SLOT(slotBrowse())); connect(linkType, SIGNAL(activated(int)), this, SLOT(slotTypeChanged(int))); }
void CustomFileDialog::bookmarkChosen(int i) { if(i == clearId) { bookmarkList.clear(); bookmarkMenu->clear(); addId = bookmarkMenu->insertItem("Add bookmark"); clearId = bookmarkMenu->insertItem("Clear bookmarks"); bookmarkMenu->insertSeparator(); return; } if(i == addId) { bookmarkList << dirPath(); const char *book_pix[] = {"12 16 3 1", ". c None", "a c #000000", "# c #008080", "............", "............", "........##..", ".......#####", "......#####a", ".....#####a.", "....#####a..", "...#####a...", "..#####a....", ".#####a.....", "aaa##a......", "...#a.......", "...a........", "............", "............", "............"}; bookmarkMenu->insertItem(QIconSet(book_pix), dirPath()); return; } setDir(bookmarkMenu->text(i)); }
/* * Sets the strings of the subwidgets using the current * language. */ void LogViewer::languageChange() { setCaption( tr( "IHU Log Viewer" ) ); clearButton->setText( tr( "Clear" ) ); saveButton->setText( tr( "Save" ) ); saveButton->setIconSet( QIconSet( QPixmap::fromMimeSource( "save.png" ) ) ); closeButton->setText( tr( "Close" ) ); }
void ZUserInfo::initInterface() { logMes_2("ZUserInfo->initInterface: start"); QFont font(qApp->font()); font.setPointSize(14); QPixmap pm; myWidget = new ZWidget(); tabWidget = new ZNavTabWidget(ZNavTabWidget::NEIGHBOR, false, false, myWidget); tabWidget->setFocusPolicy(ZNavTabWidget::NoFocus); tabWidget->setTabPosition(ZNavTabWidget::TOP); setContentWidget ( tabWidget ); spFull = new ZDetailView(this); spMain = new ZDetailView(this); spHome = new ZDetailView(this); spWork = new ZDetailView(this); tvDesc = new xTextView(this, zSmile); spFull->setFont(ZDetailItem::FontContent, font); spFull->setFont(ZDetailItem::FontTitle, font); spMain->setFont(ZDetailItem::FontContent, font); spMain->setFont(ZDetailItem::FontTitle, font); spHome->setFont(ZDetailItem::FontContent, font); spHome->setFont(ZDetailItem::FontTitle, font); spWork->setFont(ZDetailItem::FontContent, font); spWork->setFont(ZDetailItem::FontTitle, font); pm.load(ProgDir+ "/image/tab_full.png"); tabWidget->addTab(spFull, QIconSet(pm), ""); pm.load(ProgDir+ "/image/tab_main.png"); tabWidget->addTab(spMain, QIconSet(pm), ""); pm.load(ProgDir+ "/image/tab_home.png"); tabWidget->addTab(spHome, QIconSet(pm), ""); pm.load(ProgDir+ "/image/tab_work.png"); tabWidget->addTab(spWork, QIconSet(pm), ""); pm.load(ProgDir+ "/image/tab_note.png"); tabWidget->addTab(tvDesc, QIconSet(pm), ""); tabWidget->setFocus(); logMes_2("ZUserInfo->initInterface: end"); }
WriteSketchNote::WriteSketchNote(QWidget* parent, const char* name, bool modal, WFlags fl) : QDialog(parent, name, modal, fl) { vlayout = new QVBoxLayout(this); vlayout->setSpacing(0); vlayout->setMargin(0); hlayout = new QHBoxLayout(this); hlayout->setSpacing(4); hlayout->setMargin(11); vlayout->addLayout(hlayout); // // Buttons chooseWidth = new QPushButton("Width", this); hlayout->addWidget(chooseWidth); sketch = new QSketch(this); sketch->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); sketch->setMinimumSize(1, 119); vlayout->addWidget(sketch); QPixmap *px = new QPixmap(7, 7); px->fill(sketch->getCurrentColor()); chooseColorB = new QPushButton(QIconSet(*px), "Color", this); hlayout->addWidget(chooseColorB); deleteStroke = new QPushButton("Delete", this); hlayout->addWidget(deleteStroke); moveB = new QPushButton("Move", this); moveB->setToggleButton(true); hlayout->addWidget(moveB); connect(chooseWidth, SIGNAL(clicked()), sketch, SLOT(chooseWidth())); connect(chooseColorB, SIGNAL(clicked()), this, SLOT(chooseColor())); connect(deleteStroke, SIGNAL(clicked()), sketch, SLOT(deleteLastStroke())); connect(moveB, SIGNAL(toggled(bool)), sketch, SLOT(setMoveMode(bool))); #ifdef DESKTOP hlayout2 = new QHBoxLayout(this); hlayout2->setSpacing(4); hlayout2->setMargin(11); vlayout->addLayout(hlayout2); QPushButton *okB = new QPushButton("&OK", this); QPushButton *cancelB = new QPushButton("&Cancel", this); connect(okB, SIGNAL(clicked()), this, SLOT(accept())); connect(cancelB, SIGNAL(clicked()), this, SLOT(reject())); hlayout2->addWidget(cancelB); hlayout2->addWidget(okB); #endif setCaption(tr("Sketch")); }
virtual QIconSet iconSet(const QString &key) const { #ifdef EMBED_IMAGES QPixmap pix(m_widgets[key].iconSet); #else QPixmap pix(locate( "data", QString::fromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet)); #endif return QIconSet(pix); }
void WriteSketchNote::chooseColor() { QPixmap *px = new QPixmap(7, 7); sketch->chooseColor(); px->fill(sketch->getCurrentColor()); chooseColorB->setIconSet(QIconSet(*px)); delete px; }
QIconSet WidgetDatabase::iconSet( int id ) { setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) return QIconSet(); #if !defined(UIC) && !defined(RESOURCE) if ( !r->icon ) { if ( r->iconSet.isEmpty() ) return QIconSet(); QPixmap pix = QPixmap::fromMimeSource( r->iconSet ); if ( pix.isNull() ) pix = QPixmap( r->iconSet ); r->icon = new QIconSet( pix ); } return *r->icon; #else return QIconSet(); #endif }