diff options
author | Arno <am@disconnect.de> | 2010-11-21 11:04:42 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-11-21 11:04:42 +0100 |
commit | f4a99fc9a5bac76c6bfd10212a80d5ece3b41aac (patch) | |
tree | 02a201926099d106ccbb3a27463df69c27f3f8d0 /shemov.cpp | |
parent | 6a9b5c654aaf326cb078a701eb38b2d10786bf7c (diff) | |
download | SheMov-f4a99fc9a5bac76c6bfd10212a80d5ece3b41aac.tar.gz SheMov-f4a99fc9a5bac76c6bfd10212a80d5ece3b41aac.tar.bz2 SheMov-f4a99fc9a5bac76c6bfd10212a80d5ece3b41aac.zip |
Implemented mark as seen
Added new action to mark files as seen. Marked files have the foreground
color red.
For this the database connection is needed quite early, so I had to call
SmGlobals::instance() in the constructor of SheMov without using it.
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -50,6 +50,9 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla //application icon qApp->setWindowIcon(QIcon(":/shemov.png")); + //init database as early as possible + (void) SmGlobals::instance(); + //FileSystemWidget + TabWidget mFSWidget = new FilesystemWidget; setWindowTitle(mFSWidget->windowTitle()); @@ -336,6 +339,8 @@ void SheMov::createActions(){ mMountDvdA = new QAction(QIcon(":/diaper.png"), tr("(Un)mount DVD drive"), this); mMountDvdA->setCheckable(true); connect(mMountDvdA, SIGNAL(triggered()), mFSWidget, SLOT(dvdMount())); + mMarkA = new QAction(tr("Mark as (un)seen"), this); + connect(mMarkA, SIGNAL(triggered()), mFSWidget, SLOT(markSeen())); mConfigA = new QAction(QIcon(":/chastity_belt.png"), tr("Configure..."), this); connect(mConfigA, SIGNAL(triggered()), this, SLOT(configure())); @@ -481,6 +486,8 @@ void SheMov::createMenus(){ mEditFSMenu->addSeparator(); mEditFSMenu->addAction(mMountDvdA); mEditFSMenu->addSeparator(); + mEditFSMenu->addAction(mMarkA); + mEditFSMenu->addSeparator(); mEditFSMenu->addAction(mConfigA); mEditFSMenuA = menuBar()->addMenu(mEditFSMenu); @@ -527,6 +534,10 @@ void SheMov::createMenus(){ QAction *sep10 = new QAction(this); sep10->setSeparator(true); mFSWidget->fileView()->addAction(sep10); + mFSWidget->fileView()->addAction(mMarkA); + QAction *sep11 = new QAction(this); + sep11->setSeparator(true); + mFSWidget->fileView()->addAction(sep11); mFSWidget->fileView()->addAction(mArchiveSelectedA); //ArchiveTreeView context menu |