klamav: Added menubar and basic menu srtucture.

The appropriate slots will be implemented in later commits.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/24/head
Mavridis Philippe 4 years ago
parent 93c87f6fd5
commit dafba97d4e
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -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() {

@ -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();

Loading…
Cancel
Save