20#ifndef __KOCONTEXTHELPACTION_H__
21#define __KOCONTEXTHELPACTION_H__
25#include <tqdockwindow.h>
28#include <koffice_export.h>
31class TQSimpleRichText;
33class KoVerticalLabel :
public TQWidget
39 KoVerticalLabel( TQWidget* parent = 0,
const char* name = 0 );
43 void setText(
const TQString& text );
46 void paintEvent( TQPaintEvent* );
52class KoHelpNavButton :
public TQWidget
63 KoHelpNavButton( NavDirection d, TQWidget* parent );
70 void paintEvent( TQPaintEvent* );
71 void enterEvent( TQEvent* );
72 void leaveEvent( TQEvent* );
79class KoTinyButton :
public TQWidget
90 KoTinyButton( Action a, TQWidget* parent );
97 void paintEvent( TQPaintEvent* );
98 void mousePressEvent( TQMouseEvent* );
99 void mouseReleaseEvent( TQMouseEvent* );
108class KoHelpView :
public TQWidget
114 KoHelpView( TQWidget* parent );
117 void setText(
const TQString& text );
118 bool eventFilter( TQObject* watched, TQEvent* e );
121 void linkClicked(
const TQString& link );
124 virtual void mousePressEvent( TQMouseEvent* e );
125 virtual void mouseReleaseEvent( TQMouseEvent* e );
126 virtual void mouseMoveEvent( TQMouseEvent* e );
127 virtual void paintEvent( TQPaintEvent* e );
130 TQSimpleRichText* currentText;
131 TQString currentAnchor;
134class KoHelpWidget :
public TQWidget
140 KoHelpWidget( TQString help, TQWidget* parent );
142 void setText( TQString text );
143 void timerEvent( TQTimerEvent* );
144 void updateButtons();
147 void linkClicked(
const TQString& link );
152 void startScrollingUp();
153 void startScrollingDown();
154 void stopScrolling();
157 void resizeEvent( TQResizeEvent* );
162 TQWidget* m_helpViewport;
163 KoHelpView* m_helpView;
164 KoHelpNavButton* m_upButton;
165 KoHelpNavButton* m_downButton;
171class KoContextHelpPopup :
public TQWidget
177 KoContextHelpPopup( TQWidget* parent = 0 );
178 ~KoContextHelpPopup();
181 void setContextHelp(
const TQString& title,
const TQString& text,
const TQPixmap* icon = 0 );
182 void setSticky(
bool sticky ) { m_isSticky = sticky; }
185 virtual void mousePressEvent( TQMouseEvent* );
186 virtual void mouseMoveEvent( TQMouseEvent* );
187 virtual void resizeEvent( TQResizeEvent* );
188 virtual void paintEvent( TQPaintEvent* );
189 virtual void windowActivationChange(
bool );
190 virtual void keyPressEvent ( TQKeyEvent* );
191 virtual void keyReleaseEvent ( TQKeyEvent* );
194 void wantsToBeClosed();
201 KoHelpWidget* m_helpViewer;
202 KoVerticalLabel* m_helpTitle;
204 KoTinyButton* m_close;
205 KoTinyButton* m_sticky;
224 virtual ~KoContextHelpAction();
227 void updateHelp(
const TQString& title,
const TQString&
text,
const TQPixmap* icon = 0 );
240class KoContextHelpWidget :
public TQWidget
246 KoContextHelpWidget( TQWidget* parent = 0,
const char* name = 0 );
247 ~KoContextHelpWidget();
250 void setContextHelp(
const TQString& title,
const TQString& text,
const TQPixmap* icon = 0 );
256 void linkClicked(
const TQString& link );
259 KoHelpWidget* m_helpViewer;
260 KoVerticalLabel* m_helpTitle;
264class KoContextHelpDocker :
public TQDockWindow
270 KoContextHelpDocker( TQWidget* parent = 0,
const char* name = 0 );
271 ~KoContextHelpDocker();
274 void setContextHelp(
const TQString& title,
const TQString& text,
const TQPixmap* icon = 0 );
280 void linkClicked(
const TQString& link );
283 KoHelpWidget* m_helpViewer;
284 KoVerticalLabel* m_helpTitle;
void linkClicked(const TQString &link)
Connect to this signal to receive the href value of the links clicked.
virtual TQString text() const
TDEToggleAction(const TQString &text, const TDEShortcut &cut=TDEShortcut(), TQObject *parent=0, const char *name=0)