2
* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License as
6
* published by the Free Software Foundation; version 2 of the
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19
#ifndef _GRTDB_OBJECT_FILTER_H_
20
#define _GRTDB_OBJECT_FILTER_H_
22
#include "grt/grt_manager.h"
23
#include "grtdb/db_object_filter.h"
25
#include "mforms/panel.h" // TODO: use class pointers and forward decls to avoid including all these headers.
26
#include "mforms/box.h"
27
#include "mforms/table.h"
28
#include "mforms/imagebox.h"
29
#include "mforms/checkbox.h"
30
#include "mforms/label.h"
31
#include "mforms/button.h"
32
#include "mforms/textentry.h"
33
#include "mforms/selector.h"
34
#include "mforms/listbox.h"
35
#include "mforms/form.h"
40
class WBPUBLICBACKEND_PUBLIC_FUNC DBObjectFilterFrame : public mforms::Panel, public base::trackable
43
DBObjectFilterFrame(bec::GRTManager *grtm);
45
void set_object_class(const std::string &oclass, const std::string &caption_format);
46
void set_models(bec::GrtStringListModel *model, bec::GrtStringListModel *excl_model);
48
void set_active(bool flag);
52
bec::DBObjectFilterBE _filter_be;
54
bec::GrtStringListModel *_model;
55
bec::GrtStringListModel *_exclude_model;
59
mforms::Table _summary_table;
61
mforms::ImageBox _icon;
63
mforms::CheckBox _check;
65
mforms::Label _summary_label;
67
mforms::Button _show_button;
70
mforms::Table _detailed_table;
72
mforms::Label _filter_help_label;
73
mforms::Label _search_label;
74
mforms::Label _filter_label;
75
mforms::TextEntry _search_text;
76
mforms::Selector _filter_combo;
77
mforms::Button _add_button;
78
mforms::Button _remove_button;
80
mforms::ListBox _object_list;
81
mforms::ListBox _mask_list;
83
mforms::Button _add1_button;
84
mforms::Button _add2_button;
85
mforms::Button _del1_button;
86
mforms::Button _del2_button;
87
mforms::Button _mask_button;
89
void toggle_enabled();
90
void toggle_detailed();
92
void update_button_enabled();
97
void add_clicked(bool all);
98
void del_clicked(bool all);
102
#endif /* _GRTDB_OBJECT_FILTER_H_ */