Source Code (Use browser search to find items of interest.)
Class Index
kicker'ClockLabel (./kdebase/kicker/internalapplets/date/dateapplet.cpp:30)
class ClockLabel : public QLabel
{
public:
ClockLabel(QWidget *parent = 0, const char *name = 0)
: QLabel(parent, name)
{
rmbMenu = new QPopupMenu(this);
rmbMenu->insertItem(i18n("Change Date/Time"));
}
void mousePressEvent(QMouseEvent *e)
{
if (e->button() == RightButton) {
if (!KStandardDirs::findExe("kcmtime"))
return;
else {
int i = rmbMenu->exec(this->mapToGlobal(QPoint(0-rmbMenu->sizeHint().width(), 0)));
i = rmbMenu->indexOf(i);
if (i == 0) {
KProcess proc;
proc << KStandardDirs::findExe("kcmtime");
proc.start(KProcess::DontCare);
}
}
}
}
private:
QPopupMenu *rmbMenu;
};