~ubuntu-branches/ubuntu/quantal/mysql-workbench/quantal

« back to all changes in this revision

Viewing changes to backend/wbpublic/grtui/grtdb_object_filter.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2012-03-01 21:57:30 UTC
  • Revision ID: package-import@ubuntu.com-20120301215730-o7y8av8y38n162ro
Tags: upstream-5.2.38+dfsg
ImportĀ upstreamĀ versionĀ 5.2.38+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
 
3
 *
 
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
 
7
 * License.
 
8
 * 
 
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.
 
13
 * 
 
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
 
17
 * 02110-1301  USA
 
18
 */
 
19
#ifndef _GRTDB_OBJECT_FILTER_H_
 
20
#define _GRTDB_OBJECT_FILTER_H_
 
21
 
 
22
#include "grt/grt_manager.h"
 
23
#include "grtdb/db_object_filter.h"
 
24
 
 
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"
 
36
 
 
37
namespace grtui
 
38
{
 
39
  
 
40
  class WBPUBLICBACKEND_PUBLIC_FUNC DBObjectFilterFrame : public mforms::Panel, public base::trackable
 
41
  {
 
42
  public:
 
43
    DBObjectFilterFrame(bec::GRTManager *grtm);
 
44
 
 
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);
 
47
    
 
48
    void set_active(bool flag);
 
49
    bool get_active();
 
50
 
 
51
  protected:
 
52
    bec::DBObjectFilterBE _filter_be;
 
53
 
 
54
    bec::GrtStringListModel *_model;
 
55
    bec::GrtStringListModel *_exclude_model;
 
56
    
 
57
    mforms::Box _box;
 
58
 
 
59
    mforms::Table _summary_table;
 
60
 
 
61
    mforms::ImageBox _icon;
 
62
 
 
63
    mforms::CheckBox _check;
 
64
    
 
65
    mforms::Label _summary_label;
 
66
 
 
67
    mforms::Button _show_button;
 
68
    
 
69
 
 
70
    mforms::Table _detailed_table;
 
71
 
 
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;
 
79
 
 
80
    mforms::ListBox _object_list;
 
81
    mforms::ListBox _mask_list;
 
82
    
 
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;
 
88
    
 
89
    void toggle_enabled();
 
90
    void toggle_detailed();
 
91
 
 
92
    void update_button_enabled();
 
93
    
 
94
    void refresh();
 
95
 
 
96
    void add_mask();
 
97
    void add_clicked(bool all);
 
98
    void del_clicked(bool all);
 
99
  };
 
100
};
 
101
 
 
102
#endif /* _GRTDB_OBJECT_FILTER_H_ */