本文整理汇总了C++中KPopupMenu::removeItemAt方法的典型用法代码示例。如果您正苦于以下问题:C++ KPopupMenu::removeItemAt方法的具体用法?C++ KPopupMenu::removeItemAt怎么用?C++ KPopupMenu::removeItemAt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KPopupMenu
的用法示例。
在下文中一共展示了KPopupMenu::removeItemAt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KLAidWidgetBase
/**
* @short Initialize
* @author Rene Schmidt <[email protected]>
* @version 0.1
*/
KLAidWidget::KLAidWidget(QWidget* parent, const char* name, WFlags fl)
: KLAidWidgetBase(parent,name,fl)
{
this->setCaption(i18n("K Learning Aid %1").arg(VER));
cfgOkay = FALSE;
oldRepVal = 1;
// Center window
QDesktopWidget *d = QApplication::desktop();
int dW = d->width(); int dH = d->height();
int wW = this->width(); int wH = this->height();
this->setGeometry((dW-wW)/2, (dH-wH)/2, wW, wH);
// Create tray icon
tray = new KSystemTray(this, "TimerTray");
tray->setPixmap(SmallIcon("ktimer"));
tray->show();
QToolTip::add(tray, i18n("K Learning Aid %1").arg(VER));
// Create logic backend
aut = new KLAid(this);
aut->desktopWidth = d->width();
aut->setCentralWidget(tray);
QObject::connect(aut, SIGNAL(loopExpired()), this, SLOT(reportExpired()));
QObject::connect(aut, SIGNAL(popNow( QString&, QString&, uint&)),
this, SLOT(showPopUp(QString&, QString&, uint&)));
// Add some tray menu items
KPopupMenu * TrayMenu = tray->contextMenu();
enPopAction = new KToggleAction( i18n("&Enable PopUps"),
0,
this,
SLOT(toggleTimer()),
parentWidget(),
TOGGLE_ITEM);
KAction * AboutAction = new KAction( i18n("&About"),
0,
this,
SLOT(about()),
parentWidget(),
ABOUT_ITEM);
TrayMenu->removeItemAt(0);
TrayMenu->insertTitle(SmallIcon("ktimer"), QString("KLAid"), 0, 0);
enPopAction->plug(TrayMenu, 1);
enPopAction->setEnabled(FALSE);
AboutAction->plug(TrayMenu, 2);
connect(popUpInterval, SIGNAL(valueChanged(const QString&)), this, SLOT(sanitizeMinStay()));
connect(urlLine, SIGNAL(urlSelected(const QString&)), this, SLOT(enableOKButton()));
connect(minStay, SIGNAL(valueChanged(const QString&)), this, SLOT(sanitizeMinStay()));
connect(pIntvalUnit, SIGNAL(activated(const QString&)), this, SLOT(sanitizeMinStay()));
connect(overlapPops, SIGNAL(stateChanged(int)), this, SLOT(sanitizeMinStay()));
connect(rndSeqBox, SIGNAL(stateChanged(int)), this, SLOT(turnOffUniq()));
connect(repModeBox, SIGNAL(activated(const QString&)), this, SLOT(changeRepMode()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelClicked()));
connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked()));
// connect(defaultsButton, SIGNAL(clicked()), this, SLOT(resetConfig()));
// Set default fonts for popups
fntCaption = new QFont();
fntCaption->setBold(TRUE);
kFontRequester1->setFont(*fntCaption);
fntBody = new QFont();
kFontRequester2->setFont(*fntBody);
// Set default fonts for popups
tmpFgColor = new QColor(this->foregroundColor());
tmpBgColor = new QColor(this->backgroundColor());
fgCol->setColor(this->foregroundColor());
bgCol->setColor(this->backgroundColor());
this->_readConfig();
this->show();
}