25 #ifndef WQTMODULECONFIG_H
26 #define WQTMODULECONFIG_H
34 #include <QListWidget>
38 #include "core/kernel/WModule.h"
54 WQtModuleConfig( QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags() );
68 bool operator()( std::string
const& name )
const;
std::shared_ptr< const WModule > ConstSPtr
Shared pointer to a const WModule.
A class which acts as a binary predicate to check exclusion of modules by name using a whitelist and ...
virtual void pathListSelectionChanged()
Call this notify the remove button whether something is selected in m_pathList or not.
QCheckBox * m_showThemAll
Checkbox controlling whether all modules should be shown all the time.
QPushButton * m_removePathButton
Button responsible for removing the currently selected path in m_pathList.
void configure()
Uses a modal dialog to allow the user modifying it.
QListWidget * m_list
This widget contains the allowed module list.
WQtModuleConfig(QWidget *parent=0, Qt::WindowFlags f=Qt::WindowFlags())
Constructs excluder dialog and loads needed settings.
QListWidget * m_pathList
This list widget contains all additional search paths.
virtual void removeModulePath()
Remove the selected item from m_pathList;.
void resetAllModuleCheckboxes()
Call this to reset all checkboxes in the list of modules.
QCheckBox * m_asBlackList
Control whether the list is interpreted as black list.
std::map< std::string, QCheckBox * > ModuleItemMapType
Maps between a name and a checkbox widget.
void showThemAllUpdated()
Triggered by the m_showThemAll checkbox.
std::vector< WModule::ConstSPtr > m_moduleList
The list of available modules.
static void initPathHelper()
This function initializes the path helper by loading the module path settings.
virtual void accept()
Hides the dialog, updates the internal lists and emits updated-signal.
bool operator()(std::string const &name) const
Checks exclusion by name.
void refreshComboboxItems()
Call this to refresh the combobox items.
void updated()
Signal getting emitted if the exclusion-lists changes.
void reset()
called by the reset button
virtual void addModulePath()
Add a path to m_pathList;.
QComboBox * m_selectPresetBlacklist
Combobox to select a black list.
void loadListsFromSettings(bool defaultModulePaths=false)
Reloads the whitelist and the blacklist from the QSettings.
virtual ~WQtModuleConfig()
Destructor.
std::vector< std::string > AllowedModuleList
List for all allowed/active modules.
QAction * getConfigureAction() const
Creates an action instance allowing the configuration.
QCheckBox * m_usePreset
Check if you want to use a preset module list.
virtual void reject()
Hides the dialog, does not update the internal lists.
void refreshModuleCheckboxes()
Call this to refresh the list of selected modules, e.g.
ModuleItemMapType m_moduleItemMap
Maps between module name and item.
AllowedModuleList m_allowedModules
The list of modules that are allowed.
void toggleComboboxVisibility(int)
Call this to show or hide the preset combobox.
void saveListToSettings()
Saves the whitelist and the blacklist to the settings.