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

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
kopeteonlinestatusmanager.h
Go to the documentation of this file.
1 /*
2  kopeteonlinestatusmanager.h
3 
4  Copyright (c) 2004-2005 by Olivier Goffart <ogoffart@kde.org>
5 
6  Kopete (c) 2004-2005 by the Kopete developers <kopete-devel@kde.org>
7 
8  *************************************************************************
9  * *
10  * This library is free software; you can redistribute it and/or *
11  * modify it under the terms of the GNU Lesser General Public *
12  * License as published by the Free Software Foundation; either *
13  * version 2 of the License, or (at your option) any later version. *
14  * *
15  *************************************************************************
16 */
17 
18 #ifndef kopeteonlinestatusmanager_h__
19 #define kopeteonlinestatusmanager_h__
20 
21 #include "kopete_export.h"
22 
23 #include <QtCore/QObject>
24 #include <QtCore/QFlags>
25 #include <QtCore/QMap>
26 
27 class QPixmap;
28 class QColor;
29 class KIcon;
30 
31 namespace Kopete
32 {
33  class OnlineStatus;
34  class Protocol;
35 
36 
42 class KOPETE_EXPORT OnlineStatusManager : public QObject
43 {
44  Q_OBJECT
45 public:
46  static OnlineStatusManager* self();
47  ~OnlineStatusManager();
48 
58  //please be carrefull when modifying values of status. read comment in onlineStatus()
59  enum Category
60  {
61  Idle=1<<8, ExtendedAway=1<<9 , Invisible=1<<10,
62  // \ / __________/
63  /*1<<4*/ Busy=1<<5, FreeForChat=1<<6, /* 1<<7*/
64  // \ / /
65  Away=1<<2, /* 1<<3 */
66  // \ /
67  Online=1<<1,
68  Offline=1
69  };
70  Q_DECLARE_FLAGS(Categories, Category)
71 
72 
73 
76  enum Option
77  {
79  HasStatusMessage = 0x01,
83  DisabledIfOffline = 0x02,
86  HideFromMenu = 0x04
87  };
88  Q_DECLARE_FLAGS(Options, Option)
89 
90 
104  void registerOnlineStatus(const OnlineStatus& status);
105 
111  OnlineStatus onlineStatus(Protocol *protocol, Categories category) const;
112 
116  QList<OnlineStatus> registeredStatusList( Protocol *protocol ) const;
117 
121  static KIcon pixmapForCategory( Categories category );
122 
128  Kopete::OnlineStatusManager::Category initialStatus() const;
129 
130 private:
131  friend class OnlineStatus;
132  friend class OnlineStatusIconEngine;
133  QPixmap cacheLookupByObject( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle = false);
134  QPixmap cacheLookupByMimeSource( const QString &mimeSource );
135  QString fingerprint( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle = false);
136  QPixmap* renderIcon( const OnlineStatus &statusFor, const QString& baseicon, int size, QColor color, bool idle = false) const;
137 
138 signals:
139  void iconsChanged();
140 
141 private slots:
142  void slotIconsChanged();
143 
144 private:
145  OnlineStatusManager();
146  class Private;
147  Private * const d;
148 };
149 
150 Q_DECLARE_OPERATORS_FOR_FLAGS(OnlineStatusManager::Categories)
151 Q_DECLARE_OPERATORS_FOR_FLAGS(OnlineStatusManager::Options)
152 
153 } //END namespace Kopete
154 
155 #endif
156 
157 // vim: set noet ts=4 sts=4 sw=4:
158 
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::OnlineStatus
Definition: kopeteonlinestatus.h:68
status
OnlineStatus::StatusType status
Definition: kopeteonlinestatus.cpp:103
Kopete::Protocol
base class of every protocol.
Definition: kopeteprotocol.h:62
Kopete::OnlineStatusManager::Category
Category
Kopete will uses categories to have a more general system than simply globally away.
Definition: kopeteonlinestatusmanager.h:59
Kopete::OnlineStatusManager::Option
Option
Definition: kopeteonlinestatusmanager.h:76
QObject
NetworkStatus::Online
Definition: networkstatuscommon.h:9
kopete_export.h
QString
QList
QColor
QPixmap
NetworkStatus::Offline
Definition: networkstatuscommon.h:9
Kopete::OnlineStatusManager
OnlineStatusManager is a singleton which manage OnlineStatus.
Definition: kopeteonlinestatusmanager.h:42
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

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