diff options
| author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2018-02-22 16:54:34 +0100 |
|---|---|---|
| committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2018-02-22 16:54:34 +0100 |
| commit | 5e5c9c07291f6b09623d31c92b1fb61c4ede576e (patch) | |
| tree | 0684c123db375336e0e03f0240155a12e744db16 /src/genericicondelegate.cpp | |
| parent | 5ad912e1934061b38825801a27f7c12933878005 (diff) | |
Applied clang-format on source
Diffstat (limited to 'src/genericicondelegate.cpp')
| -rw-r--r-- | src/genericicondelegate.cpp | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/src/genericicondelegate.cpp b/src/genericicondelegate.cpp index 1e00f0e9..98917c33 100644 --- a/src/genericicondelegate.cpp +++ b/src/genericicondelegate.cpp @@ -3,37 +3,25 @@ #include <QList>
#include <QPixmapCache>
+GenericIconDelegate::GenericIconDelegate(QObject* parent, int role, int logicalIndex, int compactSize)
+ : IconDelegate(parent), m_Role(role), m_LogicalIndex(logicalIndex), m_CompactSize(compactSize), m_Compact(false) {}
-GenericIconDelegate::GenericIconDelegate(QObject *parent, int role, int logicalIndex, int compactSize)
- : IconDelegate(parent)
- , m_Role(role)
- , m_LogicalIndex(logicalIndex)
- , m_CompactSize(compactSize)
- , m_Compact(false)
-{
-}
-
-void GenericIconDelegate::columnResized(int logicalIndex, int, int newSize)
-{
- if (logicalIndex == m_LogicalIndex) {
- m_Compact = newSize < m_CompactSize;
- }
+void GenericIconDelegate::columnResized(int logicalIndex, int, int newSize) {
+ if (logicalIndex == m_LogicalIndex) {
+ m_Compact = newSize < m_CompactSize;
+ }
}
-QList<QString> GenericIconDelegate::getIcons(const QModelIndex &index) const
-{
- QList<QString> result;
- if (index.isValid()) {
- for (const QVariant &var : index.data(m_Role).toList()) {
- if (!m_Compact || !var.toString().isEmpty()) {
- result.append(var.toString());
- }
+QList<QString> GenericIconDelegate::getIcons(const QModelIndex& index) const {
+ QList<QString> result;
+ if (index.isValid()) {
+ for (const QVariant& var : index.data(m_Role).toList()) {
+ if (!m_Compact || !var.toString().isEmpty()) {
+ result.append(var.toString());
+ }
+ }
}
- }
- return result;
+ return result;
}
-size_t GenericIconDelegate::getNumIcons(const QModelIndex &index) const
-{
- return index.data(m_Role).toList().count();
-}
+size_t GenericIconDelegate::getNumIcons(const QModelIndex& index) const { return index.data(m_Role).toList().count(); }
|
