Receptacle
 All Classes Files Functions Variables Pages
job_selection_form.h
1 /*
2 
3 Copyright 2014 William Wedler
4 
5 This file is part of Receptacle
6 
7 Receptacle is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Receptacle is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16 
17 You should have received a copy of the GNU Lesser General Public License
18 along with Receptacle. If not, see <http://www.gnu.org/licenses/>.
19 
20 */
21 
22 
23 #ifndef JOB_SELECTION_FORM_H
24 #define JOB_SELECTION_FORM_H
25 
26 
27 #include <QtGui>
28 #include <QWidget>
29 #include <QLabel>
30 #include <QHBoxLayout>
31 #include <QPushButton>
32 #include <QComboBox>
33 #include <QString>
34 #include <QShortcut>
35 #include "widgets/label_for.h"
36 #include "util_collection.h"
37 
38 class JobSelectionForm: public QWidget{
39  Q_OBJECT
40 
41 public:
42  JobSelectionForm(QWidget *parent=0);
43  bool populate_command_options(UtilCollection* utils);
44 
45  static const char WARN_INDICATION_STYLE[];
46  static const char ERR_INDICATION_STYLE[];
47 
48 signals:
49  void command_selected(QString commmand);
50  void command_unrecognized(QString command);
51  void command_unspecified();
52 
53 public slots:
54  void btn_pressed_handler();
55  bool command(QString cmd);
56 
62  void indicate_msg_level(QtMsgType type);
63 
64 protected:
65  LabelFor* label;
66  QHBoxLayout* layout;
67  QPushButton* btn;
68  QComboBox* box;
69  UtilCollection* utils;
70  QShortcut *returnShortcut;
71 
72 };
73 
74 #endif // JOB_SELECTION_FORM_H
Definition: util_collection.h:34
void indicate_msg_level(QtMsgType type)
Visual indication that the message type has been published.
Definition: job_selection_form.cpp:103
Definition: label_for.h:29
Definition: job_selection_form.h:38