summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/ttdeaction.h
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-02-01 17:25:32 -0600
committerTimothy Pearson <[email protected]>2013-02-01 17:25:32 -0600
commit78bc9664ef5f23a7b405b5d940bc891a0ebbf841 (patch)
treeeb72094f71bcf2208ed0547b078612fa06819c51 /lib/kofficeui/ttdeaction.h
parentaea627236e4de24599c3e30617cf264c3c1b7d40 (diff)
downloadkoffice-78bc9664ef5f23a7b405b5d940bc891a0ebbf841.tar.gz
koffice-78bc9664ef5f23a7b405b5d940bc891a0ebbf841.zip
Fix FTBFS
Diffstat (limited to 'lib/kofficeui/ttdeaction.h')
-rw-r--r--lib/kofficeui/ttdeaction.h126
1 files changed, 126 insertions, 0 deletions
diff --git a/lib/kofficeui/ttdeaction.h b/lib/kofficeui/ttdeaction.h
new file mode 100644
index 00000000..736bb141
--- /dev/null
+++ b/lib/kofficeui/ttdeaction.h
@@ -0,0 +1,126 @@
+/*
+ * Kivio - Visual Modelling and Flowcharting
+ * Copyright (C) 2000 theKompany.com
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+#ifndef TKACTION_H
+#define TKACTION_H
+
+#include <kaction.h>
+#include <tqstringlist.h>
+#include <koffice_export.h>
+namespace TK {
+ enum IconMode { IconOnly, IconAndText, TextOnly };
+}
+
+class TTDEToolBarButton;
+class TKComboBox;
+
+class KOFFICEUI_EXPORT TTDEAction : public TDEAction
+{ Q_OBJECT
+
+public:
+ TTDEAction(TQObject* parent, const char* name);
+ ~TTDEAction();
+
+ virtual int plug(TQWidget* widget, int index = -1);
+
+ TK::IconMode iconMode();
+
+protected:
+ virtual void initToolBarButton(TTDEToolBarButton*);
+
+ TQWidget* createLayout(TQWidget* parent, TQWidget* children);
+ void updateLayout();
+ virtual void updateLayout(TQWidget*);
+
+public slots:
+ virtual void setIconMode(TK::IconMode);
+ void setText(const TQString&);
+ void setIcon(const TQString&);
+
+private:
+ TK::IconMode m_imode;
+ class TTDEActionPrivate;
+ TTDEActionPrivate *d;
+};
+/******************************************************************************/
+class KOFFICEUI_EXPORT TKBaseSelectAction : public TTDEAction
+{ Q_OBJECT
+
+friend class TTDESelectAction;
+public:
+ TKBaseSelectAction(TQObject* parent, const char* name);
+ ~TKBaseSelectAction();
+
+ virtual int plug(TQWidget* widget, int index = -1);
+
+ int currentItem();
+ bool isEditable();
+
+ void activate(int);
+
+protected:
+ virtual void initComboBox(TKComboBox*);
+
+public slots:
+ virtual void setCurrentItem(int index);
+ virtual void setEditable(bool);
+
+protected slots:
+ virtual void slotActivated(int);
+
+signals:
+ void activated(int);
+
+private:
+ int m_current;
+ bool m_editable;
+ class TKBaseSelectActionPrivate;
+ TKBaseSelectActionPrivate *d;
+};
+/******************************************************************************/
+class KOFFICEUI_EXPORT TTDESelectAction : public TKBaseSelectAction
+{ Q_OBJECT
+
+public:
+ TTDESelectAction(TQObject* parent, const char* name);
+ ~TTDESelectAction();
+
+ TQStringList items() const;
+
+public slots:
+ virtual void setItems(const TQStringList& );
+ virtual void setEditText(const TQString&);
+ virtual void clear();
+
+protected:
+ virtual void initComboBox(TKComboBox*);
+
+protected slots:
+ void slotActivated(const TQString&);
+
+signals:
+ void activated(const TQString&);
+
+private:
+ TQStringList m_list;
+ class TTDESelectActionPrivate;
+ TTDESelectActionPrivate *d;
+};
+/******************************************************************************/
+#endif