kivio
kivioarrowheadaction.h
00001 /* This file is part of the KDE project 00002 Copyright (C) 2003 Peter Simonsson <psn@linux.se>, 00003 theKompany.com & Dave Marotti 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KIVIOARROWHEADACTION_H 00022 #define KIVIOARROWHEADACTION_H 00023 00024 00025 #include <kaction.h> 00026 00027 class KPopupMenu; 00028 00029 class KivioArrowHeadAction : public KActionMenu 00030 { 00031 Q_OBJECT 00032 public: 00033 KivioArrowHeadAction(const QString &text, const QString &pix, 00034 QObject* parent = 0, const char *name = 0); 00035 ~KivioArrowHeadAction(); 00036 00037 KPopupMenu* popupMenu() const; 00038 void popup( const QPoint& global ); 00039 00040 virtual int plug( QWidget* widget, int index = -1 ); 00041 00042 int currentStartArrow(); 00043 int currentEndArrow(); 00044 00045 public slots: 00046 void setCurrentStartArrow(int c); 00047 void setCurrentEndArrow(int c); 00048 void setEmitSignals(bool e) { m_emitSignals = e; } 00049 00050 signals: 00051 void startChanged(int); 00052 void endChanged(int); 00053 00054 protected: 00055 void loadArrowHeads(KPopupMenu* combo); 00056 00057 protected: 00058 KPopupMenu* m_popup; 00059 KPopupMenu* m_startPopup; 00060 KPopupMenu* m_endPopup; 00061 int m_currentStart; 00062 int m_currentEnd; 00063 bool m_emitSignals; 00064 }; 00065 00066 #endif