BALL  1.5.0
atomOverview.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_VIEW_DIALOGS_ATOMOVERVIEW_H
6 #define BALL_VIEW_DIALOGS_ATOMOVERVIEW_H
7 
8 #ifndef BALL_COMMON_GLOBAL_H
9 # include <BALL/COMMON/global.h>
10 #endif
11 
12 #ifndef BALL_CONCEPT_COMPOSITE_H
13 # include <BALL/CONCEPT/composite.h>
14 #endif
15 
16 #include <BALL/VIEW/UIC/ui_atomOverview.h>
17 
18 namespace BALL
19 {
20  class AtomContainer;
21 
22  namespace VIEW
23  {
24  class MainControl;
25 
33  : public QDialog,
34  public Ui_AtomOverviewData
35  {
36  Q_OBJECT
37 
38  public:
39 
42  : public UnaryProcessor<Composite>
43  {
44  public:
45 
47 
48 
50 
52  OverviewProcessor(const OverviewProcessor& model_processor);
53 
55  virtual ~OverviewProcessor();
56 
58  Processor::Result operator() (Composite& composite);
59 
61  void setTable(QTableWidget* widget) { table_ = widget;}
62 
64  void showOnlySelection(bool state) {only_selection_ = state;}
65 
66  protected:
67 
70  };
71 
74  : public UnaryProcessor<Composite>
75  {
76  public:
77 
79 
80 
82 
84  ApplyProcessor(const ApplyProcessor& model_processor);
85 
87  virtual ~ApplyProcessor();
88 
90  Processor::Result operator() (Composite& composite);
91 
93  void setTable(QTableWidget* widget) { table_ = widget; row_ = 0;}
94 
96  void setMainControl(MainControl* main_control) {main_control_ = main_control;}
97 
99  void showOnlySelection(bool state) {only_selection_ = state;}
100 
101  protected:
102 
107  };
108 
109 
113 
118  AtomOverview(QWidget *parent = NULL, const char *name = "AtomOverview");
119 
121 
124 
127  virtual ~AtomOverview();
128 
130 
133 
135  void setParent(AtomContainer* ac);
136 
138  void showOnlySelection(bool state) {only_selection_ = state;}
139 
141 
144 
145  protected Q_SLOTS:
146 
152  virtual void accept();
153 
154  void itemChanged(QTableWidgetItem* item);
155  void itemActivated(QTableWidgetItem* item);
156 
157  protected:
158 
159  void restoreItem_(QTableWidgetItem* item);
160 
165  bool ignore_;
167  };
168 
169 } } // namespaces
170 
171 #endif // BALL_VIEW_DIALOGS_AtomOverview_H
BALL::VIEW::AtomOverview::item_backup_
String item_backup_
Definition: atomOverview.h:164
BALL::VIEW::AtomOverview::ApplyProcessor::only_selection_
bool only_selection_
Definition: atomOverview.h:105
BALL::VIEW::AtomOverview::ApplyProcessor::setTable
void setTable(QTableWidget *widget)
Definition: atomOverview.h:93
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
BALL::VIEW::AtomOverview::OverviewProcessor::only_selection_
bool only_selection_
Definition: atomOverview.h:69
BALL::VIEW::AtomOverview::ignore_
bool ignore_
Definition: atomOverview.h:165
QWidget
QDialog
BALL::VIEW::AtomOverview::showOnlySelection
void showOnlySelection(bool state)
Definition: atomOverview.h:138
BALL::VIEW::AtomOverview::ApplyProcessor::table_
QTableWidget * table_
Definition: atomOverview.h:103
BALL::AtomContainer
Definition: atomContainer.h:29
BALL_SIZE_TYPE
BALL::VIEW::AtomOverview::OverviewProcessor::setTable
void setTable(QTableWidget *widget)
Definition: atomOverview.h:61
BALL
Definition: constants.h:12
BALL::VIEW::AtomOverview::only_selection_
bool only_selection_
Definition: atomOverview.h:166
QTableWidget
BALL::VIEW::AtomOverview::ApplyProcessor::row_
Position row_
Definition: atomOverview.h:104
BALL::VIEW::AtomOverview::OverviewProcessor
Definition: atomOverview.h:41
BALL::String
Definition: string.h:56
BALL::VIEW::AtomOverview::apply_processor_
ApplyProcessor apply_processor_
Definition: atomOverview.h:163
BALL::VIEW::AtomOverview::ApplyProcessor::setMainControl
void setMainControl(MainControl *main_control)
Definition: atomOverview.h:96
BALL::VIEW::MainControl
Definition: mainControl.h:114
BALL::VIEW::AtomOverview::parent_
AtomContainer * parent_
Definition: atomOverview.h:161
BALL::VIEW::AtomOverview::OverviewProcessor::table_
QTableWidget * table_
Definition: atomOverview.h:68
BALL::VIEW::AtomOverview::processor_
OverviewProcessor processor_
Definition: atomOverview.h:162
composite.h
BALL::VIEW::AtomOverview::OverviewProcessor::showOnlySelection
void showOnlySelection(bool state)
Definition: atomOverview.h:64
BALL::UnaryProcessor
Definition: processor.h:58
global.h
BALL::Composite
Definition: composite.h:71
BALL::VIEW::AtomOverview::ApplyProcessor
Definition: atomOverview.h:73
BALL::VIEW::AtomOverview::ApplyProcessor::main_control_
MainControl * main_control_
Definition: atomOverview.h:106
BALL::Processor::Result
int Result
Definition: processor.h:36
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL::VIEW::AtomOverview::ApplyProcessor::showOnlySelection
void showOnlySelection(bool state)
Definition: atomOverview.h:99
BALL::VIEW::AtomOverview
Definition: atomOverview.h:32