SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MainWindowCollaborators.h
Go to the documentation of this file.
1 /*
2  For more information, please see: http://software.sci.utah.edu
3 
4  The MIT License
5 
6  Copyright (c) 2012 Scientific Computing and Imaging Institute,
7  University of Utah.
8 
9  License for the specific language governing rights and limitations under
10  Permission is hereby granted, free of charge, to any person obtaining a
11  copy of this software and associated documentation files (the "Software"),
12  to deal in the Software without restriction, including without limitation
13  the rights to use, copy, modify, merge, publish, distribute, sublicense,
14  and/or sell copies of the Software, and to permit persons to whom the
15  Software is furnished to do so, subject to the following conditions:
16 
17  The above copyright notice and this permission notice shall be included
18  in all copies or substantial portions of the Software.
19 
20  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26  DEALINGS IN THE SOFTWARE.
27 */
28 
29 #ifndef INTERFACE_APPLICATION_MAINWINDOWCOLLABORATORS_H
30 #define INTERFACE_APPLICATION_MAINWINDOWCOLLABORATORS_H
31 
34 
35 class QTextEdit;
36 class QTreeWidget;
37 class QComboBox;
38 
39 namespace SCIRun {
40 namespace Gui {
41 
43  {
44  public:
45  explicit TextEditAppender(QTextEdit* text) : text_(text) {}
46 
47  void log(const QString& message) const;
48 
49  virtual void error(const std::string& msg) const;
50  virtual void warning(const std::string& msg) const;
51  virtual void remark(const std::string& msg) const;
52  virtual void status(const std::string& msg) const;
53  private:
54  QTextEdit* text_;
55  };
56 
58  {
59  public:
60  explicit TreeViewModuleGetter(QTreeWidget& tree) : tree_(tree) {}
61  virtual QString text() const;
62  virtual bool isModule() const;
63  private:
64  QTreeWidget& tree_;
65  };
66 
68  {
69  public:
70  explicit ComboBoxDefaultNotePositionGetter(QComboBox& combo) : combo_(combo) {}
71  virtual NotePosition position() const;
72  private:
73  QComboBox& combo_;
74  };
75 
76 }
77 }
78 #endif
Definition: MainWindowCollaborators.h:42
#define msg(m)
Definition: PiecewiseInterp.h:55
TreeViewModuleGetter(QTreeWidget &tree)
Definition: MainWindowCollaborators.h:60
virtual void status(const std::string &msg) const
Definition: MainWindowCollaborators.cc:55
Definition: LoggerInterface.h:43
virtual QString text() const
Definition: MainWindowCollaborators.cc:60
Definition: MainWindowCollaborators.h:57
virtual NotePosition position() const
Definition: MainWindowCollaborators.cc:71
NotePosition
Definition: Note.h:47
Definition: MainWindowCollaborators.h:67
virtual bool isModule() const
Definition: MainWindowCollaborators.cc:65
TextEditAppender(QTextEdit *text)
Definition: MainWindowCollaborators.h:45
void log(const QString &message) const
Definition: MainWindowCollaborators.cc:35
virtual void warning(const std::string &msg) const
Definition: MainWindowCollaborators.cc:45
virtual void error(const std::string &msg) const
Definition: MainWindowCollaborators.cc:40
ComboBoxDefaultNotePositionGetter(QComboBox &combo)
Definition: MainWindowCollaborators.h:70
Definition: NetworkEditor.h:54
virtual void remark(const std::string &msg) const
Definition: MainWindowCollaborators.cc:50
Definition: NetworkEditor.h:63