summaryrefslogtreecommitdiffstats
path: root/InstanceDelegate.h
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2013-12-30 18:45:40 +0100
committerJan Dalheimer <jan@dalheimer.de>2013-12-30 18:45:40 +0100
commit4662fbd29891ccb9120df82d17a34a7619242827 (patch)
tree91332b6388f547a0c641edab163e216a58cc79b7 /InstanceDelegate.h
parent01092206783f74ce14f31d328cdac025fd90fe16 (diff)
downloadMultiMC-4662fbd29891ccb9120df82d17a34a7619242827.tar
MultiMC-4662fbd29891ccb9120df82d17a34a7619242827.tar.gz
MultiMC-4662fbd29891ccb9120df82d17a34a7619242827.tar.lz
MultiMC-4662fbd29891ccb9120df82d17a34a7619242827.tar.xz
MultiMC-4662fbd29891ccb9120df82d17a34a7619242827.zip
Make the MultiMC delegate fully usable. Dynamic row heights.
Diffstat (limited to 'InstanceDelegate.h')
-rw-r--r--InstanceDelegate.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/InstanceDelegate.h b/InstanceDelegate.h
new file mode 100644
index 00000000..6f924405
--- /dev/null
+++ b/InstanceDelegate.h
@@ -0,0 +1,27 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <QStyledItemDelegate>
+
+class ListViewDelegate : public QStyledItemDelegate
+{
+public:
+ explicit ListViewDelegate ( QObject* parent = 0 );
+protected:
+ void paint ( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
+ QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const;
+};