• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • superkaramba
 

superkaramba

  • superkaramba
  • src
meter.h
1/***************************************************************************
2 * Copyright (C) 2003 by Hans Karlsson *
3 * karlsson.h@home.se *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
10#ifndef METER_H
11#define METER_H
12
13#include <tqpixmap.h>
14#include <tqpainter.h>
15#include <tqstring.h>
16#include <tqstringlist.h>
17#include <tqobject.h>
18
19#include <tqfileinfo.h>
20
21class karamba;
22
23class Meter : public TQObject
24{
25TQ_OBJECT
26
27public:
28
29 Meter(karamba* k, int ix,int iy,int iw,int ih);
30 Meter(karamba* k);
31 virtual ~Meter();
32 virtual int getX();
33 virtual int getY();
34 virtual int getWidth();
35 virtual int getHeight();
36 virtual void setX(int);
37 virtual void setY(int);
38 virtual void setWidth(int);
39 virtual void setHeight(int);
40
41 virtual void setSize(int ix, int iy, int iw, int ih);
42
43 virtual void setMax(long max) { maxValue = max; };
44 virtual void setMin(long min) { minValue = min; };
45 virtual long getMax() { return minValue; };
46 virtual long getMin() { return maxValue; };
47
48 void setThemePath( TQString );
49
50 virtual void mUpdate(TQPainter *)=0 ;
51
52 virtual void setValue(long) {};
53 virtual long getValue() { return -1; };
54 virtual void setValue(TQString) {};
55 virtual TQString getStringValue() const { return TQString(); };
56 virtual void recalculateValue() {};
57
58 virtual void setColor(TQColor clr) { color = clr; };
59 virtual TQColor getColor() { return color; };
60
61 virtual void show() { hidden = 0; };
62 virtual void hide() { hidden = 1; };
63
64 TQRect getBoundingBox();
65
66 // true when given coordinate point is inside the meters
67 // active reagion and meter is enabled
68 virtual bool insideActiveArea(int, int);
69
70 // returns true when callback meterClicked should be called.
71 virtual bool click( TQMouseEvent* );
72
73 void setEnabled(bool);
74 bool isEnabled();
75
76 /*
77 void setOnClick( TQString );
78 void setOnMiddleClick( TQString );
79 */
80
81protected: // Protected attributes
82 TQString themePath;
83
84 TQRect boundingBox;
85
86 // Actions to execute when clicked on meter
87 TQString leftButtonAction;
88 TQString middleButtonAction;
89 TQString rightButtonAction;
90
91 bool clickable;
92 int hidden;
93 long minValue;
94 long maxValue;
95
96 TQColor color;
97 karamba* m_karamba;
98};
99
100#endif // METER_H

superkaramba

Skip menu "superkaramba"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

superkaramba

Skip menu "superkaramba"
  • kcalc
  •   knumber
  • superkaramba
Generated for superkaramba by doxygen 1.9.4
This website is maintained by Timothy Pearson.