summaryrefslogtreecommitdiff
path: root/dgedit/filelist.cc
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2014-05-02 17:30:05 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2014-05-02 17:30:05 +0200
commitb6405171c6a74a5227555a9b75c03f88a5f21ed2 (patch)
treef1dea3760f10c461c29e831efe1e1e3570a09f4c /dgedit/filelist.cc
parenta5ea8e72059ec9fb7145c7117bd9ea77dee0eee7 (diff)
Added remove all files action to filelist.
Diffstat (limited to 'dgedit/filelist.cc')
-rw-r--r--dgedit/filelist.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/dgedit/filelist.cc b/dgedit/filelist.cc
index d956c9c..c4e5c4b 100644
--- a/dgedit/filelist.cc
+++ b/dgedit/filelist.cc
@@ -99,9 +99,15 @@ void FileList::createMenus()
removeAction = new QAction("Remove", this);
connect(removeAction, SIGNAL(triggered()), this, SLOT(removeFile()));
+ removeAllAction = new QAction("Remove all", this);
+ connect(removeAllAction, SIGNAL(triggered()), this, SLOT(removeAllFiles()));
+
menu->addAction(setMasterAction);
menu->addAction(editAction);
menu->addAction(removeAction);
+ menu->addSeparator();
+ menu->addAction(removeAllAction);
+
}
void FileList::popupMenu(const QPoint & pos)
@@ -129,6 +135,15 @@ void FileList::removeFile()
emit fileRemoved(file, name);
}
+void FileList::removeAllFiles()
+{
+ activeItem = NULL;
+
+ clear();
+
+ emit allFilesRemoved();
+}
+
void FileList::editName()
{
ItemEditor *e = new ItemEditor(activeItem, itemName(activeItem));