summaryrefslogtreecommitdiffstats
path: root/kommander/working/plugintemplate/widget.h
blob: 328ebe3b552e12fd6e160d56c2c3647d596642f0 (plain)
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
%{H_TEMPLATE}
#ifndef %{APPNAMEUC}_WIDGET_H
#define %{APPNAMEUC}_WIDGET_H

#include <tqwidget.h>
#include <tqstring.h>

#include <tdeparts/part.h>

#include <kommanderwidget.h>

class TQStringList;

//replace TQWidget with the widget you want to derive from
class %{APPNAME}: public TQWidget, public KommanderWidget
{
  TQ_OBJECT
  

  TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
  TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
  TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)

public:  
  %{APPNAME}(TQWidget *parent, const char* name);
  ~%{APPNAME}();

  virtual bool isKommanderWidget() const;
  virtual void setAssociatedText(const TQStringList&);
  virtual TQStringList associatedText() const;
  virtual TQString currentState() const;
  virtual TQString populationText() const;
  virtual void setPopulationText(const TQString&);
  virtual void populate();

  virtual TQString handleDCOP(int function, const TQStringList& args);
  virtual bool isFunctionSupported(int function);

signals:
  void contextMenuRequested(int xpos, int ypos);

protected:
  void contextMenuEvent( TQContextMenuEvent * e );
};


#endif