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 #include <ArmarXGui/gui-plugins/LoggingPlugin/ui_FilterDialog.h>
26 
28 #include <ArmarXCore/interface/core/Log.h>
29 
30 namespace armarx
31 {
32  FilterDialog::FilterDialog(QWidget* parent) :
33  QDialog(parent),
34  ui(new Ui::FilterDialog)
35  {
36  ui->setupUi(this);
37 
38  for (int i = 0; i < eLogLevelCount; i++)
39  {
40  ui->cbVerbosity->addItem(LogSender::levelToString((MessageTypeT)i).c_str());
41  }
42  }
43 
45  {
46  delete ui;
47  }
48 
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 }
armarx::FilterDialog::FilterDialog
FilterDialog(QWidget *parent=0)
Definition: FilterDialog.cpp:32
armarx::MessageTypeT
MessageTypeT
Definition: LogSender.h:45
armarx::FilterDialog::accept
void accept() override
Definition: FilterDialog.cpp:49
armarx::FilterDialog::ui
Ui::FilterDialog * ui
Definition: FilterDialog.h:45
FilterDialog.h
armarx::FilterDialog
Definition: FilterDialog.h:36
Ui
ArmarX Headers.
Definition: ArmarXMainWindow.h:54
armarx::ArmarXWidgetController::showMessageBox
static int showMessageBox(const QString &msg)
Definition: ArmarXWidgetController.cpp:166
ArmarXWidgetController.h
LogSender.h
armarx::FilterDialog::~FilterDialog
~FilterDialog() override
Definition: FilterDialog.cpp:44
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::LogSender::levelToString
static std::string levelToString(MessageTypeT type)
Definition: LogSender.cpp:611