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

kmail

  • sources
  • kde-4.14
  • 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  void slotGeneralPaletteChanged();
68  void slotGeneralFontChanged();
69 
70 private:
71  bool mainWindowIsOnCurrentDesktop();
72  bool buildPopupMenu();
73  void updateCount();
74  void fillFoldersMenu( QMenu *menu, const QAbstractItemModel *model, const QString& parentName = QString(), const QModelIndex& parentIndex = QModelIndex() );
75  void unreadMail( const QAbstractItemModel *model, const QModelIndex& parentIndex = QModelIndex() );
76  bool excludeFolder( const Akonadi::Collection &collection ) const;
77  bool ignoreNewMailInFolder(const Akonadi::Collection &collection);
78 
79 private:
80  QColor mTextColor;
81  KIcon mIcon;
82  int mDesktopOfMainWin;
83 
84  int mMode;
85  int mCount;
86 
87  bool mShowUnreadMailCount;
88  bool mIconNotificationsEnabled;
89 
90  QMenu *mNewMessagesPopup;
91  QAction *mSendQueued;
92 };
93 }
94 #endif
QModelIndex
KMail::KMSystemTray::updateSystemTray
void updateSystemTray()
Definition: kmsystemtray.cpp:440
KMail::KMSystemTray::~KMSystemTray
~KMSystemTray()
destructor
Definition: kmsystemtray.cpp:147
KMail::KMSystemTray::setSystrayIconNotificationsEnabled
void setSystrayIconNotificationsEnabled(bool enable)
Use this method to disable any systray icon changing.
Definition: kmsystemtray.cpp:256
KMail::KMSystemTray
Definition: kmsystemtray.h:35
KMail::KMSystemTray::mode
int mode() const
Definition: kmsystemtray.cpp:179
QObject
QString
QColor
QMenu
KMail::KMSystemTray::hasUnreadMail
bool hasUnreadMail() const
Definition: kmsystemtray.cpp:423
KMail::KMSystemTray::setMode
void setMode(int mode)
Definition: kmsystemtray.cpp:159
QAction
KMail::KMSystemTray::hideKMail
void hideKMail()
Definition: kmsystemtray.cpp:356
QAbstractItemModel
KStatusNotifierItem
KMail::KMSystemTray::setShowUnreadCount
void setShowUnreadCount(bool showUnreadCount)
Definition: kmsystemtray.cpp:151
KMail::KMSystemTray::KMSystemTray
KMSystemTray(QObject *parent=0)
construtor
Definition: kmsystemtray.cpp:62
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:33 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
  • pimprint

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