Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
799f2447
Commit
799f2447
authored
Jun 14, 2011
by
Sebastian Eichelbaum
Browse files
[ADD] - added basic edit dialogs for the whie and black list
parent
c860dddd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
4 deletions
+49
-4
src/qt4gui/qt4/WMainWindow.cpp
src/qt4gui/qt4/WMainWindow.cpp
+33
-4
src/qt4gui/qt4/WMainWindow.h
src/qt4gui/qt4/WMainWindow.h
+12
-0
src/qt4gui/qt4/controlPanel/WQtControlPanel.cpp
src/qt4gui/qt4/controlPanel/WQtControlPanel.cpp
+4
-0
No files found.
src/qt4gui/qt4/WMainWindow.cpp
View file @
799f2447
...
...
@@ -44,6 +44,7 @@
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
#include <QtCore/QSettings>
#include <QtGui/QInputDialog>
#include "core/common/WColor.h"
#include "core/common/WIOTools.h"
...
...
@@ -1083,13 +1084,41 @@ void WMainWindow::handleLogLevelUpdate( unsigned int logLevel )
void
WMainWindow
::
configureBlackList
()
{
// WQt4Gui::getSettings().setValue( "qt4gui/modules/whiteList", QString() );
// TODO(ebaum): implement me
bool
ok
;
QString
currentList
=
WQt4Gui
::
getSettings
().
value
(
"qt4gui/modules/blackList"
,
""
).
toString
();
QString
nexList
=
QInputDialog
::
getText
(
this
,
"Edit Blacklist"
,
"<b>Blacklist</b> - exclude modules from all the module lists in OpenWalnut. <br> This can be useful to exclude modules explicitly, "
"which are not needed."
"<ul>"
"<li> Comma-separated"
"<li> Regular expressions allowed"
"</ul>"
,
QLineEdit
::
Normal
,
currentList
,
&
ok
);
if
(
ok
)
{
WQt4Gui
::
getSettings
().
setValue
(
"qt4gui/modules/blackList"
,
nexList
);
emit
blackListChanged
();
}
}
void
WMainWindow
::
configureWhiteList
()
{
// WQt4Gui::getSettings().setValue( "qt4gui/modules/blackList", QString() );
// TODO(ebaum): implement me
bool
ok
;
QString
currentList
=
WQt4Gui
::
getSettings
().
value
(
"qt4gui/modules/whiteList"
,
""
).
toString
();
QString
nexList
=
QInputDialog
::
getText
(
this
,
"Edit Whitelist"
,
"<b>Whitelist</b> - exclude modules from all the module lists in OpenWalnut, which are not listed here. <br>"
"This can be useful to exclude modules implicitly by only listing modules which are needed."
"<ul>"
"<li> Comma-separated"
"<li> Regular expressions allowed"
"</ul>"
,
QLineEdit
::
Normal
,
currentList
,
&
ok
);
if
(
ok
)
{
WQt4Gui
::
getSettings
().
setValue
(
"qt4gui/modules/whiteList"
,
nexList
);
emit
whiteListChanged
();
}
}
src/qt4gui/qt4/WMainWindow.h
View file @
799f2447
...
...
@@ -139,6 +139,18 @@ public:
* \return settings object.
*/
static
QSettings
&
getSettings
();
signals:
/**
* Signal, which is emitted if the module whitelist has changed.
*/
void
whiteListChanged
();
/**
* Signal, which is emitted if the module blacklist has changed.
*/
void
blackListChanged
();
protected:
/**
...
...
src/qt4gui/qt4/controlPanel/WQtControlPanel.cpp
View file @
799f2447
...
...
@@ -170,6 +170,10 @@ WQtControlPanel::~WQtControlPanel()
void
WQtControlPanel
::
connectSlots
()
{
// if the user changes some white/blacklist setting: update.
connect
(
m_mainWindow
,
SIGNAL
(
whiteListChanged
()
),
this
,
SLOT
(
selectTreeItem
()
)
);
connect
(
m_mainWindow
,
SIGNAL
(
blackListChanged
()
),
this
,
SLOT
(
selectTreeItem
()
)
);
connect
(
m_moduleTreeWidget
,
SIGNAL
(
itemSelectionChanged
()
),
this
,
SLOT
(
selectTreeItem
()
)
);
connect
(
m_moduleTreeWidget
,
SIGNAL
(
itemClicked
(
QTreeWidgetItem
*
,
int
)
),
this
,
SLOT
(
changeTreeItem
(
QTreeWidgetItem
*
,
int
)
)
);
connect
(
m_moduleTreeWidget
,
SIGNAL
(
itemClicked
(
QTreeWidgetItem
*
,
int
)
),
m_roiTreeWidget
,
SLOT
(
clearSelection
()
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment