You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdewebdev/kommander/working/plugintemplate/widget.h

48 lines
1.2 KiB

%{H_TEMPLATE}
#ifndef %{APPNAMEUC}_WIDGET_H
#define %{APPNAMEUC}_WIDGET_H
#include <tqwidget.h>
#include <tqstring.h>
#include <kparts/part.h>
#include <kommanderwidget.h>
class TQStringList;
//replace TQWidget with the widget you want to derive from
class %{APPNAME}: public TQWidget, public KommanderWidget
{
Q_OBJECT
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