1 | /*************************************************************************** |
---|---|
2 | krulersystemtray.cpp - description |
3 | ------------------- |
4 | Copyright : (C) 2009 by Montel Laurent <montel@kde.org> |
5 | ***************************************************************************/ |
6 | |
7 | /*************************************************************************** |
8 | * * |
9 | * This program is free software; you can redistribute it and/or modify * |
10 | * it under the terms of the GNU General Public License as published by * |
11 | * the Free Software Foundation; either version 2 of the License, or * |
12 | * (at your option) any later version. * |
13 | * * |
14 | ***************************************************************************/ |
15 | |
16 | #include "krulersystemtray.h" |
17 | |
18 | #include <KLocale> |
19 | #include <KMenu> |
20 | |
21 | KRulerSystemTray::KRulerSystemTray( const QString& iconName, QWidget *parent, KActionCollection *actions) |
22 | : KStatusNotifierItem( parent ) |
23 | { |
24 | setIconByName( iconName ); |
25 | setStatus(KStatusNotifierItem::Active); |
26 | setToolTip( iconName, i18n( "KDE Screen Ruler"), QString() ); |
27 | KMenu *cm = contextMenu(); |
28 | cm->addAction( actions->action( QLatin1String( "preferences") ) ); |
29 | } |
30 |