• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kmail

  • sources
  • kde-4.12
  • kdepim
  • kmail
kmsystemtray.h
Go to the documentation of this file.
1 /***************************************************************************
2  kmsystemtray.h - description
3  -------------------
4  begin : Fri Aug 31 22:38:44 EDT 2001
5  copyright : (C) 2001 by Ryan Breen
6  email : ryan@porivo.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef KMSYSTEMTRAY_H
19 #define KMSYSTEMTRAY_H
20 
21 #include <akonadi/collection.h>
22 #include <kicon.h>
23 #include <kstatusnotifieritem.h>
24 
25 #include <QAction>
26 #include <QAbstractItemModel>
27 
28 class QMenu;
29 
34 namespace KMail {
35 class KMSystemTray : public KStatusNotifierItem
36 {
37  Q_OBJECT
38 public:
40  explicit KMSystemTray(QObject *parent=0);
42  ~KMSystemTray();
43 
44  void setShowUnreadCount(bool showUnreadCount);
45 
51  void setSystrayIconNotificationsEnabled(bool enable);
52 
53  void setMode(int mode);
54  int mode() const;
55 
56  void hideKMail();
57  bool hasUnreadMail() const;
58 
59  void updateSystemTray();
60 
61 private slots:
62  void slotActivated();
63  void slotContextMenuAboutToShow();
64  void slotSelectCollection(QAction *act);
65  void initListOfCollection();
66  void slotCollectionStatisticsChanged( Akonadi::Collection::Id ,const Akonadi::CollectionStatistics &);
67 
68 private:
69  bool mainWindowIsOnCurrentDesktop();
70  bool buildPopupMenu();
71  void updateCount();
72  void fillFoldersMenu( QMenu *menu, const QAbstractItemModel *model, const QString& parentName = QString(), const QModelIndex& parentIndex = QModelIndex() );
73  void unreadMail( const QAbstractItemModel *model, const QModelIndex& parentIndex = QModelIndex() );
74  bool excludeFolder( const Akonadi::Collection &collection ) const;
75  bool ignoreNewMailInFolder(const Akonadi::Collection &collection);
76 
77 private:
78  KIcon mIcon;
79  int mDesktopOfMainWin;
80 
81  int mMode;
82  int mCount;
83 
84  bool mShowUnreadMailCount;
85  bool mIconNotificationsEnabled;
86 
87  QMenu *mNewMessagesPopup;
88  QAction *mSendQueued;
89 };
90 }
91 #endif
KMail::KMSystemTray::updateSystemTray
void updateSystemTray()
Definition: kmsystemtray.cpp:417
KMail::KMSystemTray::~KMSystemTray
~KMSystemTray()
destructor
Definition: kmsystemtray.cpp:142
KMail::KMSystemTray::setSystrayIconNotificationsEnabled
void setSystrayIconNotificationsEnabled(bool enable)
Use this method to disable any systray icon changing.
Definition: kmsystemtray.cpp:233
KMail::KMSystemTray
Definition: kmsystemtray.h:35
QObject
KMail::KMSystemTray::mode
int mode() const
Definition: kmsystemtray.cpp:174
KMail::KMSystemTray::hasUnreadMail
bool hasUnreadMail() const
Definition: kmsystemtray.cpp:400
KMail::KMSystemTray::setMode
void setMode(int mode)
Definition: kmsystemtray.cpp:154
QMenu
KMail::KMSystemTray::hideKMail
void hideKMail()
Definition: kmsystemtray.cpp:333
KStatusNotifierItem
KMail::KMSystemTray::setShowUnreadCount
void setShowUnreadCount(bool showUnreadCount)
Definition: kmsystemtray.cpp:146
KMail::KMSystemTray::KMSystemTray
KMSystemTray(QObject *parent=0)
construtor
Definition: kmsystemtray.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal