summaryrefslogtreecommitdiffstats
path: root/sigtools/PluginDelegate.h
diff options
context:
space:
mode:
Diffstat (limited to 'sigtools/PluginDelegate.h')
-rw-r--r--sigtools/PluginDelegate.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/sigtools/PluginDelegate.h b/sigtools/PluginDelegate.h
new file mode 100644
index 00000000..0fb0c6ad
--- /dev/null
+++ b/sigtools/PluginDelegate.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2009 Ben Boeckel <MathStuf@gmail.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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SIGTOOLS_PLUGINDELEGATE
+#define SIGTOOLS_PLUGINDELEGATE
+
+// Sigtools includes
+#include "Global.h"
+
+// Qt includes
+#include <QtGui/QAbstractItemDelegate>
+
+namespace Sigtools
+{
+// Forward declarations
+class PluginTree;
+
+class SIGTOOLS_NO_EXPORT PluginDelegate : public QAbstractItemDelegate
+{
+ Q_OBJECT
+
+ public:
+ PluginDelegate(PluginTree* parent);
+
+ void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
+ QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
+ private:
+ PluginTree* m_view;
+};
+}
+
+#endif