1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
/* This file is part of the KDE project
Copyright (C) 2003 Aaron J. Seigo <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef __tom_h_
#define __tom_h_
#include <tqpixmap.h>
#include <kpanelmenu.h>
#include <klibloader.h>
class KPopupMenu;
class TQPopupMenu;
typedef TQPtrList<TQPopupMenu> PopupMenuList;
typedef TQMap<int, KService::Ptr> TaskMap;
class TOM : public KPanelMenu
{
Q_OBJECT
public:
TOM(TQWidget *parent = 0, const char *name = 0);
~TOM();
// for the side image
/*void setMinimumSize(const TQSize &);
void setMaximumSize(const TQSize &);
void setMinimumSize(int, int);
void setMaximumSize(int, int); */
protected slots:
void slotClear();
void slotExec(int);
//void configChanged();
void initialize();
void contextualizeRMBmenu(KPopupMenu* menu, int menuItem, TQPopupMenu* ctxMenu);
//void paletteChanged();
void clearRecentDocHistory();
void runCommand();
void runTask(int id);
void initializeRecentDocs();
void openRecentDocument(int id);
void logout();
/*
* slots for the RMB menu on task group
*/
void removeTask();
protected:
void reload();
int appendTaskGroup(TDEConfig& config, bool inSubMenu = true );
void initializeRecentApps(TQPopupMenu* menu);
//int insertTOMTitle(TQPopupMenu* menu, const TQString &text, int id = -1, int index = -1);
/*
* this stuff should be shared w/the kmenu
TQRect sideImageRect();
TQMouseEvent translateMouseEvent( TQMouseEvent* e );
void resizeEvent(TQResizeEvent *);
void paintEvent(TQPaintEvent *);
void mousePressEvent(TQMouseEvent *);
void mouseReleaseEvent(TQMouseEvent *);
void mouseMoveEvent(TQMouseEvent *);
bool loadSidePixmap();
TQPixmap m_sidePixmap;
TQPixmap m_sideTilePixmap;*/
PopupMenuList m_submenus;
TQFont m_largerFont;
int m_maxIndex;
bool m_isImmutable;
bool m_detailedTaskEntries;
bool m_detailedNamesFirst;
TaskMap m_tasks;
KPopupMenu* m_recentDocsMenu;
TQStringList m_recentDocURLs;
};
class TOMFactory : public KLibFactory
{
public:
TOMFactory(TQObject *parent = 0, const char *name = 0);
protected:
TQObject* createObject(TQObject *parent = 0, const char *name = 0,
const char *classname = TQOBJECT_OBJECT_NAME_STRING,
const TQStringList& args = TQStringList());
};
#endif
|