KoSelectAction.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Peter Simonsson <psn@linux.se>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19#ifndef KOSELECTACTION_H
20#define KOSELECTACTION_H
21
22#include <tdeaction.h>
23#include <koffice_export.h>
24class TDEPopupMenu;
25class TQPoint;
26
31class KOFFICEUI_EXPORT KoSelectAction : public TDEAction
32{
33 TQ_OBJECT
34
35 public:
42 KoSelectAction(const TQString& text, const TQString& icon, TQObject* parent = 0, const char* name = 0);
51 KoSelectAction(const TQString& text, const TQString& icon, const TQObject* receiver,
52 const char* slot, TQObject* parent, const char* name = 0);
54
56 TDEPopupMenu* popupMenu() const;
60 void popup(const TQPoint& global);
61
62 virtual int plug(TQWidget* widget, int index = -1);
63
65 virtual int currentSelection();
66
68 void setShowCurrentSelection(bool show);
69
70 signals:
73
74 public slots:
78 virtual void setCurrentSelection(int index);
79
80 protected slots:
84 virtual void execute(int index);
85
86 private:
87 class KoSelectActionPrivate;
88 KoSelectActionPrivate* d;
89};
90
91#endif
An action that provides a menu with items that can be selected.
void selectionChanged(int)
Emited when the selection changed.
virtual int plug(TQWidget *widget, int index=-1)