From 5e5c9c07291f6b09623d31c92b1fb61c4ede576e Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Thu, 22 Feb 2018 16:54:34 +0100 Subject: Applied clang-format on source --- src/downloadlistwidgetcompact.h | 114 +++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 61 deletions(-) (limited to 'src/downloadlistwidgetcompact.h') diff --git a/src/downloadlistwidgetcompact.h b/src/downloadlistwidgetcompact.h index bf855d5f..2b016cf1 100644 --- a/src/downloadlistwidgetcompact.h +++ b/src/downloadlistwidgetcompact.h @@ -20,103 +20,95 @@ along with Mod Organizer. If not, see . #ifndef DOWNLOADLISTWIDGETCOMPACT_H #define DOWNLOADLISTWIDGETCOMPACT_H -#include +#include "downloadmanager.h" #include #include #include #include -#include "downloadmanager.h" - +#include namespace Ui { class DownloadListWidgetCompact; } -class DownloadListWidgetCompact : public QWidget -{ - Q_OBJECT - +class DownloadListWidgetCompact : public QWidget { + Q_OBJECT + public: - explicit DownloadListWidgetCompact(QWidget *parent = 0); - ~DownloadListWidgetCompact(); + explicit DownloadListWidgetCompact(QWidget* parent = 0); + ~DownloadListWidgetCompact(); private: - Ui::DownloadListWidgetCompact *ui; - int m_ContextRow; + Ui::DownloadListWidgetCompact* ui; + int m_ContextRow; }; class DownloadManager; -class DownloadListWidgetCompactDelegate : public QItemDelegate -{ +class DownloadListWidgetCompactDelegate : public QItemDelegate { - Q_OBJECT + Q_OBJECT public: + DownloadListWidgetCompactDelegate(DownloadManager* manager, bool metaDisplay, QTreeView* view, QObject* parent = 0); + ~DownloadListWidgetCompactDelegate(); - DownloadListWidgetCompactDelegate(DownloadManager *manager, bool metaDisplay, QTreeView *view, QObject *parent = 0); - ~DownloadListWidgetCompactDelegate(); - - virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; - virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; + virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; + virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; signals: - void installDownload(int index); - void queryInfo(int index); - void removeDownload(int index, bool deleteFile); - void restoreDownload(int index); - void cancelDownload(int index); - void pauseDownload(int index); - void resumeDownload(int index); + void installDownload(int index); + void queryInfo(int index); + void removeDownload(int index, bool deleteFile); + void restoreDownload(int index); + void cancelDownload(int index); + void pauseDownload(int index); + void resumeDownload(int index); protected: - - bool editorEvent(QEvent *event, QAbstractItemModel *model, - const QStyleOptionViewItem &option, const QModelIndex &index); + bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, + const QModelIndex& index); private: - - void drawCache(QPainter *painter, const QStyleOptionViewItem &option, const QPixmap &cache) const; - void paintPendingDownload(int downloadIndex) const; - void paintRegularDownload(int downloadIndex) const; + void drawCache(QPainter* painter, const QStyleOptionViewItem& option, const QPixmap& cache) const; + void paintPendingDownload(int downloadIndex) const; + void paintRegularDownload(int downloadIndex) const; private slots: - void issueInstall(); - void issueDelete(); - void issueRemoveFromView(); - void issueRestoreToView(); - void issueCancel(); - void issuePause(); - void issueResume(); - void issueDeleteAll(); - void issueDeleteCompleted(); - void issueRemoveFromViewAll(); - void issueRemoveFromViewCompleted(); - void issueQueryInfo(); - - void stateChanged(int row, DownloadManager::DownloadState); - void resetCache(int); -private: - - DownloadListWidgetCompact *m_ItemWidget; - DownloadManager *m_Manager; + void issueInstall(); + void issueDelete(); + void issueRemoveFromView(); + void issueRestoreToView(); + void issueCancel(); + void issuePause(); + void issueResume(); + void issueDeleteAll(); + void issueDeleteCompleted(); + void issueRemoveFromViewAll(); + void issueRemoveFromViewCompleted(); + void issueQueryInfo(); + + void stateChanged(int row, DownloadManager::DownloadState); + void resetCache(int); - bool m_MetaDisplay; +private: + DownloadListWidgetCompact* m_ItemWidget; + DownloadManager* m_Manager; - QLabel *m_NameLabel; - QLabel *m_SizeLabel; - QProgressBar *m_Progress; - QLabel *m_DoneLabel; + bool m_MetaDisplay; - QModelIndex m_ContextIndex; + QLabel* m_NameLabel; + QLabel* m_SizeLabel; + QProgressBar* m_Progress; + QLabel* m_DoneLabel; - QTreeView *m_View; + QModelIndex m_ContextIndex; - mutable QMap m_Cache; + QTreeView* m_View; + mutable QMap m_Cache; }; #endif // DOWNLOADLISTWIDGETCOMPACT_H - -- cgit v1.3.1