summaryrefslogtreecommitdiff
path: root/src/modlistcontextmenu.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/modlistcontextmenu.h
parent86bb01ba9eac879d3685c439ac9da0028bc4bc80 (diff)
Apply clang-format.
Diffstat (limited to 'src/modlistcontextmenu.h')
-rw-r--r--src/modlistcontextmenu.h37
1 files changed, 15 insertions, 22 deletions
diff --git a/src/modlistcontextmenu.h b/src/modlistcontextmenu.h
index 8a6ce3df..320ece93 100644
--- a/src/modlistcontextmenu.h
+++ b/src/modlistcontextmenu.h
@@ -18,39 +18,37 @@ class ModListGlobalContextMenu : public QMenu
{
Q_OBJECT
public:
-
- ModListGlobalContextMenu(OrganizerCore& core, ModListView* view, QWidget* parent = nullptr);
+ ModListGlobalContextMenu(OrganizerCore& core, ModListView* view,
+ QWidget* parent = nullptr);
protected:
-
friend class ModListContextMenu;
// populate the menu
void populate(OrganizerCore& core, ModListView* view, const QModelIndex& index);
// creates a "All mods" context menu for the given index (can be invalid).
- ModListGlobalContextMenu(OrganizerCore& core, ModListView* view, const QModelIndex& index, QWidget* parent = nullptr);
-
+ ModListGlobalContextMenu(OrganizerCore& core, ModListView* view,
+ const QModelIndex& index, QWidget* parent = nullptr);
};
class ModListChangeCategoryMenu : public QMenu
{
Q_OBJECT
public:
-
- ModListChangeCategoryMenu(
- CategoryFactory& categories, ModInfo::Ptr mod, QMenu* parent = nullptr);
+ ModListChangeCategoryMenu(CategoryFactory& categories, ModInfo::Ptr mod,
+ QMenu* parent = nullptr);
// return a list of pair <category id, enabled> from the menu
//
std::vector<std::pair<int, bool>> categories() const;
private:
-
// populate the tree with the category, using the enabled/disabled state from the
// given mod
//
- bool populate(QMenu* menu, CategoryFactory& categories, ModInfo::Ptr mod, int targetId = 0);
+ bool populate(QMenu* menu, CategoryFactory& categories, ModInfo::Ptr mod,
+ int targetId = 0);
// internal implementation of categories() for recursion
//
@@ -61,19 +59,17 @@ class ModListPrimaryCategoryMenu : public QMenu
{
Q_OBJECT
public:
-
- ModListPrimaryCategoryMenu(CategoryFactory& categories, ModInfo::Ptr mod, QMenu* parent = nullptr);
+ ModListPrimaryCategoryMenu(CategoryFactory& categories, ModInfo::Ptr mod,
+ QMenu* parent = nullptr);
// return the selected primary category
//
int primaryCategory() const;
private:
-
// populate the categories
//
void populate(const CategoryFactory& categories, ModInfo::Ptr mod);
-
};
class ModListContextMenu : public QMenu
@@ -81,14 +77,13 @@ class ModListContextMenu : public QMenu
Q_OBJECT
public:
-
- // creates a new context menu, the given index is the one for the click and should be valid
+ // creates a new context menu, the given index is the one for the click and should be
+ // valid
//
- ModListContextMenu(
- const QModelIndex& index, OrganizerCore& core, CategoryFactory& categories, ModListView* modListView);
+ ModListContextMenu(const QModelIndex& index, OrganizerCore& core,
+ CategoryFactory& categories, ModListView* modListView);
private:
-
// adds the "Send to... " context menu
//
void addSendToContextMenu();
@@ -101,7 +96,6 @@ private:
//
void addMenuAsPushButton(QMenu* menu);
-
// add actions/menus to this menu for each type of mod
//
void addOverwriteActions(ModInfo::Ptr mod);
@@ -115,8 +109,7 @@ private:
QModelIndex m_index;
QModelIndexList m_selected;
ModListView* m_view;
- ModListViewActions& m_actions; // shortcut for m_view->actions()
-
+ ModListViewActions& m_actions; // shortcut for m_view->actions()
};
#endif