summaryrefslogtreecommitdiff
path: root/src/overwriteinfodialog.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2022-05-17 11:47:01 +0200
committerMikaël Capelle <capelle.mikael@gmail.com>2023-07-09 17:20:40 +0200
commitd13f6bb870cdda71257f665367be8ef9fca86255 (patch)
tree52e214718478f1e52856572f5aa1a2ac58537f9f /src/overwriteinfodialog.h
parent86bb01ba9eac879d3685c439ac9da0028bc4bc80 (diff)
Apply clang-format.
Diffstat (limited to 'src/overwriteinfodialog.h')
-rw-r--r--src/overwriteinfodialog.h49
1 files changed, 24 insertions, 25 deletions
diff --git a/src/overwriteinfodialog.h b/src/overwriteinfodialog.h
index c62455fe..e9fa3439 100644
--- a/src/overwriteinfodialog.h
+++ b/src/overwriteinfodialog.h
@@ -24,7 +24,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QDialog>
#include <QFileSystemModel>
-namespace Ui {
+namespace Ui
+{
class OverwriteInfoDialog;
}
@@ -33,17 +34,19 @@ class OverwriteFileSystemModel : public QFileSystemModel
Q_OBJECT;
public:
- OverwriteFileSystemModel(QObject *parent)
- : QFileSystemModel(parent), m_RegularColumnCount(0) {}
+ OverwriteFileSystemModel(QObject* parent)
+ : QFileSystemModel(parent), m_RegularColumnCount(0)
+ {}
- virtual int columnCount(const QModelIndex &parent) const {
+ virtual int columnCount(const QModelIndex& parent) const
+ {
m_RegularColumnCount = QFileSystemModel::columnCount(parent);
return m_RegularColumnCount;
}
- virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const {
- if ((orientation == Qt::Horizontal) &&
- (section >= m_RegularColumnCount)) {
+ virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
+ {
+ if ((orientation == Qt::Horizontal) && (section >= m_RegularColumnCount)) {
if (role == Qt::DisplayRole) {
return tr("Overwrites");
} else {
@@ -54,7 +57,8 @@ public:
}
}
- virtual QVariant data(const QModelIndex &index, int role) const {
+ virtual QVariant data(const QModelIndex& index, int role) const
+ {
if (index.column() == m_RegularColumnCount + 0) {
if (role == Qt::DisplayRole) {
return tr("not implemented");
@@ -70,14 +74,12 @@ private:
mutable int m_RegularColumnCount;
};
-
class OverwriteInfoDialog : public QDialog
{
Q_OBJECT
public:
-
- explicit OverwriteInfoDialog(ModInfo::Ptr modInfo, QWidget *parent = 0);
+ explicit OverwriteInfoDialog(ModInfo::Ptr modInfo, QWidget* parent = 0);
~OverwriteInfoDialog();
ModInfo::Ptr modInfo() const { return m_ModInfo; }
@@ -94,10 +96,9 @@ protected:
void showEvent(QShowEvent* e) override;
private:
-
- void openFile(const QModelIndex &index);
- bool recursiveDelete(const QModelIndex &index);
- void deleteFile(const QModelIndex &index);
+ void openFile(const QModelIndex& index);
+ bool recursiveDelete(const QModelIndex& index);
+ void deleteFile(const QModelIndex& index);
private slots:
@@ -109,20 +110,18 @@ private slots:
void createDirectoryTriggered();
void on_explorerButton_clicked();
- void on_filesView_customContextMenuRequested(const QPoint &pos);
+ void on_filesView_customContextMenuRequested(const QPoint& pos);
private:
-
- Ui::OverwriteInfoDialog *ui;
- QFileSystemModel *m_FileSystemModel;
+ Ui::OverwriteInfoDialog* ui;
+ QFileSystemModel* m_FileSystemModel;
QModelIndexList m_FileSelection;
- QAction *m_DeleteAction;
- QAction *m_RenameAction;
- QAction *m_OpenAction;
- QAction *m_NewFolderAction;
+ QAction* m_DeleteAction;
+ QAction* m_RenameAction;
+ QAction* m_OpenAction;
+ QAction* m_NewFolderAction;
ModInfo::Ptr m_ModInfo;
-
};
-#endif // OVERWRITEINFODIALOG_H
+#endif // OVERWRITEINFODIALOG_H