• 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
kopetestatusmanager.h
Go to the documentation of this file.
1 /*
2  kopetestatusmanager.h - Kopete Status Manager
3 
4  Copyright (c) 2008 by Roman Jarosz <kedgedev@centrum.cz>
5  Kopete (c) 2008 by the Kopete developers <kopete-devel@kde.org>
6 
7  *************************************************************************
8  * *
9  * This library is free software; you can redistribute it and/or *
10  * modify it under the terms of the GNU Lesser General Public *
11  * License as published by the Free Software Foundation; either *
12  * version 2 of the License, or (at your option) any later version. *
13  * *
14  *************************************************************************
15 */
16 #ifndef KOPETESTATUSMANAGER_H
17 #define KOPETESTATUSMANAGER_H
18 
19 #include <QtCore/QObject>
20 
21 #include "kopete_export.h"
22 #include "kopetestatusmessage.h"
23 
24 class QDomElement;
25 
26 namespace Kopete {
27 
28 class Account;
29 class OnlineStatus;
30 
31 namespace Status {
32  class StatusGroup;
33  class StatusItem;
34 }
35 
44 class KOPETE_EXPORT StatusManager : public QObject
45 {
46  Q_OBJECT
47 public:
52  static StatusManager *self();
53 
54  ~StatusManager();
55 
59  void saveXML();
60 
64  void loadXML();
65 
69  void setRootGroup( Status::StatusGroup * rootGroup );
70 
74  Status::StatusGroup *getRootGroup() const;
75 
79  Status::StatusGroup *copyRootGroup() const;
80 
84  const Status::StatusItem *itemForUid( const QString &uid ) const;
85 
91  static QDomElement storeStatusItem( const Status::StatusItem *item );
92 
98  static Status::StatusItem *parseStatusItem( QDomElement element );
99 
103  void setGlobalStatus( uint category, const Kopete::StatusMessage &statusMessage = Kopete::StatusMessage() );
104 
108  void setGlobalStatusMessage( const Kopete::StatusMessage &statusMessage = Kopete::StatusMessage() );
109 
113  Kopete::StatusMessage globalStatusMessage() const;
114 
118  uint globalStatusCategory() const;
119 
123  bool autoAway();
124 
128  bool globalAway();
129 
130 public Q_SLOTS:
134  void setActive();
135 
139  void askAndSetActive();
140 
144  void setAutoAway();
145 
146 Q_SIGNALS:
150  void changed();
151 
155  void globalStatusChanged();
156 
157 private Q_SLOTS:
158  void accountUnregistered( const Kopete::Account *account );
159  void checkIdleTimer();
160  void loadSettings();
161  void loadBehaviorSettings();
162 
163 private:
164  StatusManager();
165  void updateUidHash( Status::StatusItem *item );
166 
167  Status::StatusGroup *defaultStatuses() const;
168 
169  static StatusManager *instance;
170 
171  class Private;
172  Private * const d;
173 };
174 
175 }
176 
177 #endif
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::StatusMessage
This class encapsulate a status message.
Definition: kopetestatusmessage.h:48
Kopete::Status::StatusGroup
StatusGroup represents a group that can contain other StatusItems.
Definition: kopetestatusitems.h:130
Kopete::Status::StatusItem
StatusItem is a base class for all status items.
Definition: kopetestatusitems.h:42
QObject
kopetestatusmessage.h
kopete_export.h
QString
Kopete::StatusManager
StatusManager manages status items that are used to build status menu.
Definition: kopetestatusmanager.h:44
QDomElement
Kopete::Account
The Kopete::Account class handles one account.
Definition: kopeteaccount.h:72
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