diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-08-21 01:07:54 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-08-21 01:07:54 +0200 |
commit | b78123166627139777fbd206866ee0d1c8bcd040 (patch) | |
tree | 9ea910562faae1be208cfda68f9c4f6795040524 /logic/ModList.h | |
parent | 524fbcdd3e359e07c1ff6e8ae05e03bc35977259 (diff) | |
download | MultiMC-b78123166627139777fbd206866ee0d1c8bcd040.tar MultiMC-b78123166627139777fbd206866ee0d1c8bcd040.tar.gz MultiMC-b78123166627139777fbd206866ee0d1c8bcd040.tar.lz MultiMC-b78123166627139777fbd206866ee0d1c8bcd040.tar.xz MultiMC-b78123166627139777fbd206866ee0d1c8bcd040.zip |
Contiguous selection and keyboard input for mod lists.
Tweak console to take up the sides.
You can reorder mods from the keyboard.
Diffstat (limited to 'logic/ModList.h')
-rw-r--r-- | logic/ModList.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/logic/ModList.h b/logic/ModList.h index 04ddaa8e..3cba69f5 100644 --- a/logic/ModList.h +++ b/logic/ModList.h @@ -45,16 +45,31 @@ public: /** * Adds the given mod to the list at the given index - if the list supports custom ordering */ - virtual bool installMod(const QFileInfo& filename, size_t index = 0); + virtual bool installMod(const QFileInfo& filename, int index = 0); /// Deletes the mod at the given index. - virtual bool deleteMod(size_t index); + virtual bool deleteMod(int index); + + /// Deletes all the selected mods + virtual bool deleteMods( int first, int last ); /** * move the mod at index to the position N * 0 is the beginning of the list, length() is the end of the list. */ - virtual bool moveMod(size_t from, size_t to); + virtual bool moveModTo(int from, int to); + + /** + * move the mod at index one position upwards + */ + virtual bool moveModUp(int from); + virtual bool moveModsUp( int first, int last ); + + /** + * move the mod at index one position downwards + */ + virtual bool moveModDown(int from); + virtual bool moveModsDown( int first, int last ); /// flags, mostly to support drag&drop virtual Qt::ItemFlags flags(const QModelIndex& index) const; @@ -67,7 +82,6 @@ public: /// what drag actions do we support? virtual Qt::DropActions supportedDragActions() const; - virtual bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()); /// what drop actions do we support? virtual Qt::DropActions supportedDropActions() const; |