File indexing completed on 2025-01-19 03:50:47

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2013-05-13
0007  * Description : Table view column helpers: Audio/video properties
0008  *
0009  * SPDX-FileCopyrightText: 2017-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2013      by Michael G. Hansen <mike at mghansen dot de>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_TABLE_VIEW_COLUMN_AUDIOVIDEO_H
0017 #define DIGIKAM_TABLE_VIEW_COLUMN_AUDIOVIDEO_H
0018 
0019 // Qt includes
0020 
0021 #include <QStringList>
0022 
0023 // Local includes
0024 
0025 #include "tableview_columnfactory.h"
0026 
0027 namespace Digikam
0028 {
0029 
0030 namespace TableViewColumns
0031 {
0032 
0033 class ColumnAudioVideoProperties : public TableViewColumn
0034 {
0035     Q_OBJECT
0036 
0037 public:
0038 
0039     enum SubColumn
0040     {
0041         SubColumnAudioBitRate     = 0,
0042         SubColumnAudioChannelType = 1,
0043         SubColumnAudioCodec       = 2,
0044         SubColumnDuration         = 3,
0045         SubColumnFrameRate        = 4,
0046         SubColumnVideoCodec       = 5
0047     };
0048 
0049 public:
0050 
0051     explicit ColumnAudioVideoProperties(TableViewShared* const tableViewShared,
0052                                         const TableViewColumnConfiguration& pConfiguration,
0053                                         const SubColumn pSubColumn,
0054                                         QObject* const parent = nullptr);
0055     ~ColumnAudioVideoProperties() override;
0056 
0057     QString getTitle()                                                                                const override;
0058     ColumnFlags getColumnFlags()                                                                      const override;
0059     QVariant data(TableViewModel::Item* const item, const int role)                                   const override;
0060     ColumnCompareResult compare(TableViewModel::Item* const itemA, TableViewModel::Item* const itemB) const override;
0061     void setConfiguration(const TableViewColumnConfiguration& newConfiguration) override;
0062 
0063     static TableViewColumnDescription getDescription();
0064     static QStringList getSubColumns();
0065 
0066 private:
0067 
0068     SubColumn subColumn;
0069 };
0070 
0071 } // namespace TableViewColumns
0072 
0073 } // namespace Digikam
0074 
0075 #endif // DIGIKAM_TABLE_VIEW_COLUMN_AUDIOVIDEO_H