32 #include <tdeapplication.h>
34 #include <twinmodule.h>
39 #include <tqfileinfo.h>
40 #include <tdeaction.h>
43 #include <tqpainter.h>
49 #include <tqobjectlist.h>
51 #include <tqstringlist.h>
52 #include <ksharedpixmap.h>
53 #include <tqvaluestack.h>
54 #include <dcopclient.h>
55 #include <tdepopupmenu.h>
58 #include <kiconloader.h>
59 #include <tdefiledialog.h>
63 #include <tqdatetime.h>
65 #include <tdeconfig.h>
67 #include <tqdragobject.h>
69 #include "karambarootpixmap.h"
72 #include "textlabel.h"
73 #include "imagelabel.h"
77 #include "clickarea.h"
79 #include "sensorparams.h"
80 #include "memsensor.h"
81 #include "datesensor.h"
82 #include "uptimesensor.h"
83 #include "memsensor.h"
84 #include "cpusensor.h"
85 #include "networksensor.h"
86 #include "xmmssensor.h"
87 #include "noatunsensor.h"
88 #include "programsensor.h"
89 #include "disksensor.h"
90 #include "sensorsensor.h"
91 #include "textfilesensor.h"
94 #include "rsssensor.h"
96 #include "taskmanager.h"
97 #include "showdesktop.h"
98 #include "systemtray.h"
99 #include "themefile.h"
112 class karamba :
public TQWidget
118 karamba(TQString fn, TQString name,
bool reloading =
false,
119 int instance = -1,
bool sub_theme =
false);
120 TQObjectList *menuList;
123 const ThemeFile& theme()
const {
return m_theme; };
125 TQObjectList *meterList;
126 TQObjectList *imageList;
127 TQObjectList *clickList;
128 void setSensor(
const LineParser& lineParser, Meter* meter);
129 TQString getSensor(Meter* meter);
130 TQString findSensorFromMap(Sensor* sensor);
131 void deleteMeterFromSensors(Meter* meter);
132 Sensor* findSensorFromList(Meter* meter);
133 TDEPopupMenu* keditpop;
135 TQBitmap* widgetMask;
139 TDEProcess* currProcess;
140 bool useSmoothTransforms();
142 void changeInterval(
int interval);
143 void setWidgetUpdate(
bool wu) { widgetUpdate = wu; };
144 bool getWidgetUpdate() {
return widgetUpdate; };
145 bool hasMeter(Meter* meter) {
return meterList->containsRef(meter) > 0; };
146 char getTempUnit() {
return tempUnit; };
147 void addMenuConfigOption(TQString key, TQString name);
148 bool setMenuConfigOption(TQString key,
bool value);
149 bool readMenuConfigOption(TQString key);
150 void writeConfigData();
151 TextField* getDefaultTextProps() {
return defaultTextField; };
152 int instance()
const {
return m_instance; };
153 void setInstance(
int instance) { m_instance = instance; };
154 void closeTheme(
bool reloading =
false);
155 void keyPressed(
const TQString& s,
const Meter* meter);
157 int numberOfConfMenuItems;
161 bool isSubTheme() {
return m_sub_theme; }
163 void toggleWidgetUpdate(
bool );
165 KWinModule* kWinModule;
167 TQString incomingData;
168 TQString getIncomingData() {
return incomingData; }
169 void _setIncomingData(TQString data) { incomingData = data; }
170 void setIncomingData(TQString theme, TQString data);
172 void themeNotify(TQString theme, TQString txt);
173 void callTheme(TQString theme, TQString txt);
175 double getUpdateTime() {
return update_time; }
176 void setUpdateTime(
double time) { update_time = time; }
181 void showMenuExtension();
182 void hideMenuExtension();
185 void mousePressEvent( TQMouseEvent *);
186 void wheelEvent( TQWheelEvent *);
187 void mouseReleaseEvent( TQMouseEvent *);
188 void mouseDoubleClickEvent( TQMouseEvent *);
189 void mouseMoveEvent( TQMouseEvent *);
190 void keyPressEvent ( TQKeyEvent * e );
191 void closeEvent ( TQCloseEvent *);
192 void paintEvent ( TQPaintEvent *);
193 void saveProperties(TDEConfig *);
194 void readProperties(TDEConfig *);
195 void dragEnterEvent(TQDragEnterEvent* event);
196 void dropEvent(TQDropEvent* event);
200 bool repaintInProgress;
202 bool want_right_button;
203 bool want_meter_wheel_event;
216 void passClick( TQMouseEvent* );
217 void passWheelClick( TQWheelEvent* );
218 void meterClicked(TQMouseEvent*, Meter*);
220 TQMap<TQString, Sensor*> sensorMap;
221 TQObjectList *sensorList;
222 TQObjectList *timeList;
228 TDEPopupMenu* themeConfMenu;
229 TDEPopupMenu* toDesktopMenu;
230 TDEPopupMenu* kglobal;
240 TDEActionCollection* accColl;
241 TDEActionCollection* menuAccColl;
242 TDEToggleAction *toggleLocked;
244 TDEToggleAction *toggleFastTransforms;
247 KarambaPython* pythonIface;
253 int trayMenuSeperatorId;
255 int trayMenuToggleId;
263 void updateSensors();
264 void currentDesktopChanged(
int);
265 void currentWallpaperChanged(
int);
266 void slotToggleConfigOption(TQString key,
bool);
267 void updateBackground(TDESharedPixmap*);
268 void passMenuOptionChanged(TQString key,
bool);
269 void passMenuItemClicked(
int);
270 void processExited (TDEProcess *proc);
271 void receivedStdout (TDEProcess *proc,
char *buffer,
int buflen);
272 void toDesktop(
int desktopid,
int menuid);
273 const char *getPrettyName() {
return prettyName.ascii(); }
276 void systrayUpdated();
282 void taskAdded(
Task*);
283 void taskRemoved(
Task*);
284 void activeTaskChanged(
Task*);
287 void setAlwaysOnTop(
bool stay);
293 void setWantRightButton(
bool yesno) { want_right_button = yesno; }
295 void setWantMeterWheelEvent(
bool yesno) { want_meter_wheel_event = yesno; }
300 void management_popup(
void );
309 void initPythonInterface();
313 void slotToggleLocked();
314 void slotToggleFastTransforms();
315 void popupNotify(
int);
316 void slotFileChanged(
const TQString & );
318 void slotToggleSystemTray();
320 void slotShowTheme();
327 class DesktopChangeSlot :
public TQObject
333 DesktopChangeSlot(TQObject *parent,
int desktop_id);
336 void setMenuId(
int id);
354 SignalBridge(TQObject* parent, TQString, TDEActionCollection*);
357 void enabled(TQString,
bool);
363 TDEActionCollection* collection;
366 #endif // _KARAMBA_H_
Represents a task which is in the process of starting.
A generic API for task managers.
SignalBridge is an ungulate that lives in the forests of wild Wisconsin.
A dynamic interface to a task (main window).