diff options
author | Saturneric <[email protected]> | 2021-05-11 22:09:22 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-05-11 22:09:22 +0000 |
commit | 8a63cb095c5a6b488e0bbf19269ab7aae492bfcc (patch) | |
tree | 13dd8241e6267b4fae6bb1356d3789e7de40ea37 /include/attachmenttablemodel.h | |
parent | Qt5 & Cmake Supported. (diff) | |
download | GpgFrontend-8a63cb095c5a6b488e0bbf19269ab7aae492bfcc.tar.gz GpgFrontend-8a63cb095c5a6b488e0bbf19269ab7aae492bfcc.zip |
Change CXX Standard to C++14
Headers Tidy and Reformat
Diffstat (limited to '')
-rw-r--r-- | include/attachmenttablemodel.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/include/attachmenttablemodel.h b/include/attachmenttablemodel.h index bb019dea..987f75f6 100644 --- a/include/attachmenttablemodel.h +++ b/include/attachmenttablemodel.h @@ -23,29 +23,27 @@ #define __ATTACHMENTTABLEMODEL_H__ #include "mime.h" -#include <QIcon> -#include <QFile> -#include <QAbstractTableModel> -QT_BEGIN_NAMESPACE -class QStandardItem; -QT_END_NAMESPACE - -class AttachmentTableModel : public QAbstractTableModel -{ - Q_OBJECT +class AttachmentTableModel : public QAbstractTableModel { +Q_OBJECT public: - AttachmentTableModel(QObject *parent = 0); - AttachmentTableModel(QList<MimePart> mimeparts, QObject *parent = 0); + explicit AttachmentTableModel(QObject *parent = nullptr); + + explicit AttachmentTableModel(QList<MimePart> mimeparts, QObject *parent = nullptr); + + int rowCount(const QModelIndex &parent) const override; + + int columnCount(const QModelIndex &parent) const override; - int rowCount(const QModelIndex &parent) const; - int columnCount(const QModelIndex &parent) const; - QVariant data(const QModelIndex &index, int role) const; - QVariant headerData(int section, Qt::Orientation orientation, int role) const; + QVariant data(const QModelIndex &index, int role) const override; + + QVariant headerData(int section, Qt::Orientation orientation, int role) const override; void add(MimePart mp); + MimePart getSelectedMimePart(QModelIndex index); + MimePart getMimePart(int index); //QList<MimePart> getSelectedMimeParts(QModelIndexList indexes); |