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

« back to all changes in this revision

Viewing changes to backend/wbpublic/grtdb/db_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, 2010, 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 _DB_OBJECT_FILTER_BE_H_
 
20
#define _DB_OBJECT_FILTER_BE_H_
 
21
 
 
22
#include "grt/grt_manager.h"
 
23
 
 
24
#include "grts/structs.db.h"
 
25
#include "grts/structs.db.mgmt.h"
 
26
 
 
27
#include "wbpublic_public_interface.h"
 
28
 
 
29
namespace bec {
 
30
 
 
31
  class GrtStringListModel;
 
32
 
 
33
  class WBPUBLICBACKEND_PUBLIC_FUNC DBObjectFilterBE
 
34
  {
 
35
  public:
 
36
    DBObjectFilterBE(GRTManager *grtm);
 
37
 
 
38
    virtual void set_object_type_name(const std::string &type_name);
 
39
    virtual const std::string & get_full_type_name() const;
 
40
    bec::IconId icon_id(bec::IconSize icon_size);
 
41
 
 
42
    void filter_model(GrtStringListModel *filter_model) { _filter_model= filter_model; }
 
43
    GrtStringListModel * filter_model() { return _filter_model; }
 
44
    void add_stored_filter_set(const std::string &name);
 
45
    void remove_stored_filter_set(int index);
 
46
    void load_stored_filter_set(int index);
 
47
    int stored_filter_set_index(const std::string &name);
 
48
    void load_stored_filter_set_list(std::list<std::string> &names);
 
49
 
 
50
  protected:
 
51
    GRTManager *_grtm;
 
52
    std::string _grt_type_name;
 
53
    std::string _full_type_name;
 
54
    grt::DictRef _stored_filter_sets;
 
55
    std::string _stored_filter_sets_filepath;
 
56
    GrtStringListModel *_filter_model;
 
57
  };
 
58
 
 
59
};
 
60
 
 
61
 
 
62
 
 
63
#endif /* _DB_OBJECT_FILTER_BE_H_ */