summaryrefslogtreecommitdiffstats
path: root/kopete/kopete/chatwindow/kopeteemoticonaction.h
blob: f43a690567e9b462cee02aba37a0c3c0f3795715 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
    kopeteemoticonaction.h

    TDEAction to show the emoticon selector

    Copyright (c) 2002      by Stefan Gehn            <metz AT gehn.net>
    Copyright (c) 2003      by Martijn Klingens       <klingens@kde.org>

    Kopete    (c) 2002-2003 by the Kopete developers  <kopete-devel@kde.org>

    *************************************************************************
    *                                                                       *
    * This program is free software; you can redistribute it and/or modify  *
    * it under the terms of the GNU General Public License as published by  *
    * the Free Software Foundation; either version 2 of the License, or     *
    * (at your option) any later version.                                   *
    *                                                                       *
    *************************************************************************
*/

#ifndef _KOPETEEMOTICONACTION_H_
#define _KOPETEEMOTICONACTION_H_

#include <tdeaction.h>

class KopeteEmoticonAction : public TDEAction
{
	Q_OBJECT
  

	TQ_PROPERTY( bool delayed READ delayed WRITE setDelayed )
	TQ_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu )

public:
	KopeteEmoticonAction( TQObject *parent = 0, const char *name = 0 );
	virtual ~KopeteEmoticonAction();

	TDEPopupMenu * popupMenu() const;
	void popup( const TQPoint &global );

	/**
	* Returns true if this action creates a delayed popup menu
	* when plugged in a TDEToolbar.
	*/
	bool delayed() const;

	/**
	* If set to true, this action will create a delayed popup menu
	* when plugged in a TDEToolbar. Otherwise it creates a normal popup.
	* Default: delayed
	*
	* Remember that if the "main" action (the toolbar button itself)
	* cannot be clicked, then you should call setDelayed(false).
	*
	* On the opposite, if the main action can be clicked, it can only happen
	* in a toolbar: in a menu, the parent of a submenu can't be activated.
	* To get a "normal" menu item when plugged a menu (and no submenu)
	* use TDEToolBarPopupAction.
	*/
	void setDelayed( bool delayed );

	/**
	* Returns true if this action creates a sticky popup menu.
	* See @ref setStickyMenu.
	*/
	bool stickyMenu() const;

	/**
	* If set to true, this action will create a sticky popup menu
	* when plugged in a TDEToolbar.
	* "Sticky", means it's visible until a selection is made or the mouse is
	* clicked elsewhere. This feature allows you to make a selection without
	* having to press and hold down the mouse while making a selection.
	* Default: sticky.
	*/
	void setStickyMenu( bool sticky );

	virtual int plug( TQWidget* widget, int index = -1 );

signals:
	void activated( const TQString &item );

private:
	class KopeteEmoticonActionPrivate;
	KopeteEmoticonActionPrivate *d;
};

#endif