kivioarrowheadaction.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Peter Simonsson <psn@linux.se>,
3 theKompany.com & Dave Marotti
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KIVIOARROWHEADACTION_H
22#define KIVIOARROWHEADACTION_H
23
24
25#include <tdeaction.h>
26
27class TDEPopupMenu;
28
29class KivioArrowHeadAction : public TDEActionMenu
30{
31 TQ_OBJECT
32
33 public:
34 KivioArrowHeadAction(const TQString &text, const TQString &pix,
35 TQObject* parent = 0, const char *name = 0);
36 ~KivioArrowHeadAction();
37
38 TDEPopupMenu* popupMenu() const;
39 void popup( const TQPoint& global );
40
41 virtual int plug( TQWidget* widget, int index = -1 );
42
43 int currentStartArrow();
44 int currentEndArrow();
45
46 public slots:
47 void setCurrentStartArrow(int c);
48 void setCurrentEndArrow(int c);
49 void setEmitSignals(bool e) { m_emitSignals = e; }
50
51 signals:
52 void startChanged(int);
53 void endChanged(int);
54
55 protected:
56 void loadArrowHeads(TDEPopupMenu* combo);
57
58 protected:
59 TDEPopupMenu* m_popup;
60 TDEPopupMenu* m_startPopup;
61 TDEPopupMenu* m_endPopup;
62 int m_currentStart;
63 int m_currentEnd;
64 bool m_emitSignals;
65};
66
67#endif