removed the content from template.docbook, which is completly unrelated to kmobiletools
[kdepim.git] / korn / dockeditem.h
blob4ea581ef72d62db4c74d269f16c8189459c5dbe1
1 /*
2 * Copyright (C) 2004, Mart Kelder (mart.kde@hccnet.nl)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef MK_DOCKEDITEM_H
20 #define MK_DOCKEDITEM_H
22 /**
23 * @file
25 * This file contains the class DocketItem.
28 #include "boxcontaineritem.h"
30 class SystemTray;
32 class KConfig;
34 template< class T > class QList;
36 /**
37 * This class is an implementation of a BoxContainerItem for the
38 * systemtray view. If also is a KSystemTray reimplementation.
40 * @see BoxContainerItem
41 * @author Mart Kelder <mart.kde@hccnet.nl>
43 class DockedItem : public BoxContainerItem
44 { Q_OBJECT
45 public:
46 /**
47 * This contructor gives all it parameters to its parents.
49 * @param parent the parent window
51 DockedItem( QWidget * parent = 0 );
52 /**
53 * Empty destructor; does nothing at the moment
55 ~DockedItem();
57 /**
58 * This functions shows the element in the systay.
60 virtual void showBox();
62 /**
63 * This functions reads the config. It used the parent
64 * version for the main things, but it is possible to
65 * add some configurations over here.
67 * @param config The KConfig-instance which contains the settings of this tray-item.
68 * @param index The index of the box in the configuration file
70 virtual void readConfig( BoxSettings *config, BoxSettings *config_settings, const int index );
72 public slots:
73 /**
74 * This functions sets the number of messages to be displayed, and warns if there are new messages waiting.
76 * @param count The number of messages waiting
77 * @param newMessages if true than the settings for displaying new messages will be used.
79 virtual void setCount( const int count, const bool newMessages ) ;
81 /**
82 * This function sets the tooltip @p string to a box.
84 * @param string The tooltip to be added.
86 virtual void setTooltip( const QString& string );
88 /**
89 * This function displays a passive popup containing some headers of a number of messages.
91 * @param list the list which contains some headers of the new messages
92 * @param total the total number of messages
93 * @param date true is the date should also be printed; false otherwise
94 * @param name the name of the account
96 void slotShowPassivePopup( QList< KornMailSubject >* list, int total, bool date, const QString& name );
98 /**
99 * This function displays an error message in a passive popup.
101 * @param error the error string
102 * @param name the name of the account
104 void slotShowPassivePopup( const QString& error, const QString& name );
106 protected:
108 * This function popup's the KMenu inmideately.
110 virtual void doPopup();
112 private:
113 void setAnimIcon( const QString& anim );
115 private:
116 SystemTray *_systemtray;
119 #endif //MK_DOCKEDITEM_H