FilterDialog.cpp
Go to the documentation of this file.
1/*
2* This file is part of ArmarX.
3*
4* ArmarX is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License version 2 as
6* published by the Free Software Foundation.
7*
8* ArmarX is distributed in the hope that it will be useful, but
9* WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
15*
16* @package ArmarX::Gui
17* @author Mirko Waechter ( mirko.waechter at kit dot edu)
18* @date 2012
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
23#include "FilterDialog.h"
24
26#include <ArmarXCore/interface/core/Log.h>
27
28#include <ArmarXGui/gui-plugins/LoggingPlugin/ui_FilterDialog.h>
30
31namespace armarx
32{
33 FilterDialog::FilterDialog(QWidget* parent) : QDialog(parent), ui(new Ui::FilterDialog)
34 {
35 ui->setupUi(this);
36
37 for (int i = 0; i < eLogLevelCount; i++)
38 {
39 ui->cbVerbosity->addItem(LogSender::levelToString((MessageTypeT)i).c_str());
40 }
41 }
42
44 {
45 delete ui;
46 }
47
48 void
50 {
51 if (ui->edtFilterName->text().length())
52 {
53 QDialog::accept();
54 }
55 else
56 {
57 ArmarXWidgetController::showMessageBox("Please enter a name for the filter!");
58 }
59 }
60} // namespace armarx
static int showMessageBox(const QString &msg)
void accept() override
FilterDialog(QWidget *parent=0)
Ui::FilterDialog * ui
static std::string levelToString(MessageTypeT type)
ArmarX Headers.
This file offers overloads of toIce() and fromIce() functions for STL container types.
MessageTypeT
Definition LogSender.h:46