24 #ifndef DIGIKAM_TABLE_VIEW_COLUMNFACTORY_H
25 #define DIGIKAM_TABLE_VIEW_COLUMNFACTORY_H
39 class QStyleOptionViewItem;
59 QString
getSetting(
const QString& key,
const QString& defaultValue = QString())
const
94 const QString& settingKey = QString(),
95 const QString& settingValue = QString())
102 if (!settingKey.isEmpty())
137 return configuration;
151 while (!leftToSearch.isEmpty())
157 *resultDescription = desc;
182 QWidget*
const parent =
nullptr);
226 QObject*
const parent =
nullptr);
249 template<
class MyType>
264 template<
typename columnClass>
265 static bool getSubColumnIndex(
const QString& subColumnId,
typename columnClass::SubColumn*
const subColumn)
267 const int index = columnClass::getSubColumns().indexOf(subColumnId);
274 *subColumn =
typename columnClass::SubColumn(index);
279 template<
typename columnClass>
283 QObject*
const parent)
285 typename columnClass::SubColumn subColumn;
287 if (!getSubColumnIndex<columnClass>(pConfiguration.
columnId, &subColumn))
292 *pNewColumn =
new columnClass(tableViewShared, pConfiguration, subColumn, parent);
344 Q_DECLARE_OPERATORS_FOR_FLAGS(Digikam::TableViewColumn::ColumnFlags)
Definition: coredbchangesets.h:48
Definition: tableview_columnfactory.h:50
QString getSetting(const QString &key, const QString &defaultValue=QString()) const
Definition: tableview_columnfactory.h:59
QHash< QString, QString > columnSettings
Definition: tableview_columnfactory.h:75
void saveSettings(KConfigGroup &configGroup) const
Definition: tableview_columnfactory.cpp:325
void loadSettings(const KConfigGroup &configGroup)
Definition: tableview_columnfactory.cpp:308
QString columnId
Definition: tableview_columnfactory.h:74
TableViewColumnConfiguration(const QString &id=QString())
Definition: tableview_columnfactory.h:53
Definition: tableview_columnfactory.h:81
void addSetting(const QString &key, const QString &value)
Definition: tableview_columnfactory.h:125
QString columnIcon
Definition: tableview_columnfactory.h:114
TableViewColumnConfiguration toConfiguration() const
Definition: tableview_columnfactory.h:130
static bool FindInListById(const TableViewColumnDescription::List &listToSearch, const QString &targetId, TableViewColumnDescription *const resultDescription)
Definition: tableview_columnfactory.h:147
TableViewColumnDescription()
Definition: tableview_columnfactory.h:84
QList< TableViewColumnDescription > subColumns
Definition: tableview_columnfactory.h:116
TableViewColumnDescription setIcon(const QString &iconName)
Definition: tableview_columnfactory.h:140
TableViewColumnDescription(const QString &id, const QString &title, const QString &settingKey=QString(), const QString &settingValue=QString())
Definition: tableview_columnfactory.h:93
QHash< QString, QString > columnSettings
Definition: tableview_columnfactory.h:115
QList< TableViewColumnDescription > List
Definition: tableview_columnfactory.h:110
void addSubColumn(const TableViewColumnDescription &subColumnDescription)
Definition: tableview_columnfactory.h:120
QString columnTitle
Definition: tableview_columnfactory.h:113
QString columnId
Definition: tableview_columnfactory.h:112
Definition: tableview_columnfactory.h:306
TableViewColumn * getColumn(const TableViewColumnConfiguration &columnConfiguration)
Definition: tableview_columnfactory.cpp:62
static QList< TableViewColumnDescription > getColumnDescriptionList()
Definition: tableview_columnfactory.cpp:104
TableViewColumnFactory(TableViewShared *const tableViewShared, QObject *const parent=nullptr)
Definition: tableview_columnfactory.cpp:55
Definition: tableview_columnfactory.h:324
QByteArray headerState
Definition: tableview_columnfactory.h:337
void saveSettings(KConfigGroup &configGroup)
Definition: tableview_columnfactory.cpp:290
~TableViewColumnProfile()
Definition: tableview_columnfactory.cpp:223
QList< TableViewColumnConfiguration > columnConfigurationList
Definition: tableview_columnfactory.h:335
QString name
Definition: tableview_columnfactory.h:336
TableViewColumnProfile()
Definition: tableview_columnfactory.cpp:219
void loadSettings(const KConfigGroup &configGroup)
Definition: tableview_columnfactory.cpp:227
Definition: tableview_columnfactory.h:196
ColumnCompareResult
Definition: tableview_columnfactory.h:216
@ CmpABiggerB
Definition: tableview_columnfactory.h:218
@ CmpEqual
Definition: tableview_columnfactory.h:217
@ CmpALessB
Definition: tableview_columnfactory.h:219
virtual QVariant data(TableViewModel::Item *const item, const int role) const
Definition: tableview_columnfactory.cpp:138
TableViewColumnConfiguration configuration
Definition: tableview_columnfactory.h:202
static bool getSubColumnIndex(const QString &subColumnId, typename columnClass::SubColumn *const subColumn)
Definition: tableview_columnfactory.h:265
virtual QSize sizeHint(const QStyleOptionViewItem &option, TableViewModel::Item *const item) const
Definition: tableview_columnfactory.cpp:130
static bool compareHelperBoolFailCheck(const bool okA, const bool okB, ColumnCompareResult *const result)
Definition: tableview_columnfactory.cpp:186
static bool CreateFromConfiguration(TableViewShared *const tableViewShared, const TableViewColumnConfiguration &pConfiguration, TableViewColumn **const pNewColumn, QObject *const parent)
Definition: tableview_columnfactory.h:280
virtual ColumnCompareResult compare(TableViewModel::Item *const itemA, TableViewModel::Item *const itemB) const
Definition: tableview_columnfactory.cpp:160
virtual TableViewColumnConfigurationWidget * getConfigurationWidget(QWidget *const parentWidget) const
Definition: tableview_columnfactory.cpp:170
static TableViewColumnDescription getDescription()
static ColumnCompareResult compareHelper(const MyType &A, const MyType &B)
Definition: tableview_columnfactory.h:250
TableViewShared *const s
Definition: tableview_columnfactory.h:201
~TableViewColumn() override
Definition: tableview_columnfactory.cpp:49
virtual void setConfiguration(const TableViewColumnConfiguration &newConfiguration)
Definition: tableview_columnfactory.cpp:177
void signalAllDataChanged()
TableViewColumn(TableViewShared *const tableViewShared, const TableViewColumnConfiguration &pConfiguration, QObject *const parent=nullptr)
Definition: tableview_columnfactory.cpp:40
virtual bool columnAffectedByChangeset(const ImageChangeset &imageChangeset) const
Definition: tableview_columnfactory.cpp:212
virtual void updateThumbnailSize()
Definition: tableview_columnfactory.cpp:182
void signalDataChanged(const qlonglong imageId)
virtual QString getTitle() const =0
virtual TableViewColumnConfiguration getConfiguration() const
Definition: tableview_columnfactory.cpp:151
ColumnFlag
Definition: tableview_columnfactory.h:207
@ ColumnHasConfigurationWidget
Definition: tableview_columnfactory.h:211
@ ColumnCustomPainting
Definition: tableview_columnfactory.h:209
@ ColumnNoFlags
Definition: tableview_columnfactory.h:208
@ ColumnCustomSorting
Definition: tableview_columnfactory.h:210
virtual bool paint(QPainter *const painter, const QStyleOptionViewItem &option, TableViewModel::Item *const item) const
Definition: tableview_columnfactory.cpp:121
virtual ColumnFlags getColumnFlags() const
Definition: tableview_columnfactory.cpp:146
Definition: tableview_model.h:71
Definition: tableview_shared.h:44
Definition: piwigotalker.h:48
qulonglong value
Definition: itemviewutilities.cpp:592
Definition: datefolderview.cpp:43