Commit d8bd4425 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[ADD] - skeleton for modifying white/blacklist in GUI

parent f958db62
......@@ -281,7 +281,11 @@ void WMainWindow::setupGUI()
QMenu* settingsMenu = m_menuBar->addMenu( "Settings" );
settingsMenu->addAction( m_autoDisplaySetting );
settingsMenu->addAction( "Configure Whitelist", this, SLOT( configureWhiteList() ) );
settingsMenu->addAction( "Configure Blacklist", this, SLOT( configureBlackList() ) );
settingsMenu->addSeparator();
settingsMenu->addAction( mtViews );
settingsMenu->addSeparator();
settingsMenu->addMenu( logLevels );
// a separate menu for some presets
......@@ -1076,3 +1080,16 @@ void WMainWindow::handleLogLevelUpdate( unsigned int logLevel )
{
WLogger::getLogger()->setDefaultLogLevel( static_cast< LogLevel >( logLevel ) );
}
void WMainWindow::configureBlackList()
{
// WQt4Gui::getSettings().setValue( "qt4gui/modules/whiteList", QString() );
// TODO(ebaum): implement me
}
void WMainWindow::configureWhiteList()
{
// WQt4Gui::getSettings().setValue( "qt4gui/modules/blackList", QString() );
// TODO(ebaum): implement me
}
......@@ -279,6 +279,17 @@ public slots:
* \param logLevel the new loglevel to set
*/
void handleLogLevelUpdate( unsigned int logLevel );
/**
* Uses a modal dialog to allow the user modifying its module black.
*/
void configureBlackList();
/**
* Uses a modal dialog to allow the user modifying its module whitelist.
*/
void configureWhiteList();
private:
/**
* The currently set compatibles toolbar
......
......@@ -29,13 +29,12 @@
#include <QtGui/QMenu>
#include "core/common/WPreferences.h"
#include "core/kernel/combiner/WApplyCombiner.h"
#include "core/kernel/combiner/WModuleOneToOneCombiner.h"
#include "core/kernel/WModule.h"
#include "core/kernel/WModuleCombiner.h"
#include "guiElements/WQtModuleOneToOneCombinerAction.h"
#include "WMainWindow.h"
#include "WQt4Gui.h"
#include "WQtCombinerActionList.h"
WQtCombinerActionList::WQtCombinerActionList( QWidget* parent, WIconManager* icons, WCombinerTypes::WCompatiblesList compatibles,
......@@ -43,13 +42,11 @@ WQtCombinerActionList::WQtCombinerActionList( QWidget* parent, WIconManager* ico
QList< QAction* >()
{
// These modules will be allowed to be shown.
std::string moduleWhiteListString;
WPreferences::getPreference( "modules.whiteList", &moduleWhiteListString );
std::string moduleWhiteListString = WQt4Gui::getSettings().value( "qt4gui/modules/whiteList", "" ).toString().toStdString();
std::vector< std::string > moduleWhiteList = string_utils::tokenize( moduleWhiteListString, "," );
// These modules will be forbidden to be shown.
std::string moduleBlackListString;
WPreferences::getPreference( "modules.blackList", &moduleBlackListString );
std::string moduleBlackListString = WQt4Gui::getSettings().value( "qt4gui/modules/blackList", "" ).toString().toStdString();
std::vector< std::string > moduleBlackList = string_utils::tokenize( moduleBlackListString, "," );
// create an action for each group:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment