summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2021-01-14 16:59:21 +0200
committerMavridis Philippe <[email protected]>2021-01-14 16:59:21 +0200
commitdafba97d4e5f68dec7f9ab2f1904cf2648efafd0 (patch)
treebd6359518102d0a49b4fe38af07dbca277a5dca7
parent93c87f6fd56fc4b3c8189ce234a887cc55e4ee01 (diff)
downloadklamav-dafba97d4e5f68dec7f9ab2f1904cf2648efafd0.tar.gz
klamav-dafba97d4e5f68dec7f9ab2f1904cf2648efafd0.zip
klamav: Added menubar and basic menu srtucture.
The appropriate slots will be implemented in later commits. Signed-off-by: Mavridis Philippe <[email protected]>
-rw-r--r--src/klamav.cpp34
-rw-r--r--src/klamav.h8
2 files changed, 42 insertions, 0 deletions
diff --git a/src/klamav.cpp b/src/klamav.cpp
index c03312e..eb909f0 100644
--- a/src/klamav.cpp
+++ b/src/klamav.cpp
@@ -24,6 +24,7 @@
#include <tqtooltip.h>
#include <tqlayout.h>
#include <ksystemtray.h>
+#include <tdemenubar.h>
#include <tdepopupmenu.h>
#include <kdebug.h>
#include <tdemessagebox.h>
@@ -76,6 +77,28 @@ Klamav::Klamav()
firstRunWizard();
}
+ // Menus
+ TDEPopupMenu *scanner_menu = new TDEPopupMenu(this);
+ scanner_menu->insertItem( i18n("Scan &File..."), this, SLOT(slotScanFile()), CTRL+Key_O );
+ scanner_menu->insertItem( i18n("Scan &Directory..."), this, SLOT(slotScanDir()) );
+ scanner_menu->insertSeparator();
+ scanner_menu->insertItem( i18n("&Schedule scan..."), this, SLOT(slotScheduleScan()) );
+ scanner_menu->insertItem( i18n("&Options..."), this, SLOT(slotOptions()) );
+
+ TDEPopupMenu *tabs_menu = new TDEPopupMenu(this);
+ tabs_menu->setCheckable(true);
+ tabs_menu->insertItem( i18n("Show &Welcome tab"), this, SLOT(slotToggleWelcome()) );
+ tabs_menu->insertItem( i18n("Show &Quarantine tab"), this, SLOT(slotToggleWelcome()) );
+ tabs_menu->insertItem( i18n("Show &Virus Browser tab"), this, SLOT(slotToggleDBViewer()) );
+ tabs_menu->insertItem( i18n("Show &Events tab"), this, SLOT(slotToggleEvents()) );
+
+
+ // Menu bar
+ KMenuBar *menubar = this->menuBar();
+ menubar->insertItem( i18n("&Scanner"), scanner_menu );
+ menubar->insertItem( i18n("&Tabs"), tabs_menu );
+ menubar->insertItem( i18n("&Help"), customHelpMenu(false) );
+
activityviewer = new Activityviewer(this);
klamscan = new Klamscan(this);
@@ -164,6 +187,17 @@ void Klamav::clamdStopped() {
_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
}
+// Menu slots
+void Klamav::slotScanFile() {}
+void Klamav::slotScanDir() {}
+void Klamav::slotScheduleScan() {}
+void Klamav::slotOptions() {}
+
+void Klamav::slotToggleWelcome() {}
+void Klamav::slotToggleQuarantine() {}
+void Klamav::slotToggleDBViewer() {}
+void Klamav::slotToggleEvents() {}
+
void Klamav::contextUpdateFK() {
diff --git a/src/klamav.h b/src/klamav.h
index 04067fb..8c0858c 100644
--- a/src/klamav.h
+++ b/src/klamav.h
@@ -106,6 +106,14 @@ public slots:
void clamdStopped();
void slotConfigKlamav( const TQCString& page );
private slots:
+ void slotScanFile();
+ void slotScanDir();
+ void slotScheduleScan();
+ void slotOptions();
+ void slotToggleWelcome();
+ void slotToggleQuarantine();
+ void slotToggleDBViewer();
+ void slotToggleEvents();
void contextEnableFK();
void contextUpdateFK();
void contextDisableFK();