~ubuntu-branches/ubuntu/quantal/glom/quantal

« back to all changes in this revision

Viewing changes to glom/box_db_table.h

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane
  • Date: 2009-01-11 17:12:01 UTC
  • mfrom: (1.1.39 upstream)
  • Revision ID: james.westby@ubuntu.com-20090111171201-0ov9zh1fxfueshxc
Tags: 1.8.5-0ubuntu1
* New upstream release (LP: #256701), fixes LP bugs: 
  + Clear the text in property dialogs for text items (LP: #309147)
  + Don't crash when showing and then hiding the grid (LP: #303453)
  + Temporarily remember the sort order so it is the same when navigating 
    away and back (LP: #303422)
  + Use the list's sort order for the top-level records in the report 
    (LP: #303425)
  + Users/Groups: Disable drag-and-drop for the treeview, because it is
    useless and confusing (LP: #299573)
  + Import: Sort the fields list alphabetically (LP: #306593)
  + delete primary key make unusuable the database (LP: #299549)
  + Spanish translate incomplete (LP: #299556)
  + import date format error (LP: #299591)
  + can't delete data from table list view (LP: #299853)
  + Field definition: default value not saved (LP: #299896)
  + reports crashing (LP: #300054)
  + Year error with date fields (LP: #300057)
  + list view: 2 records added instead of 1 (LP: #300819)
* debian/control: Refreshed dependencies for libglom-dev.
* debian/control: Updated build-deps to match configure checks. goocavnasmm
  build-dep bumped to version without .la files.
* debian/rules: Don't delete the directory containing the templates.
* debian/control, debian/rules, debian/glom-doc.*: Split out
  arch-independent manual and examples into separate package glom-doc, which
  is now recommended by glom (glom will still work if they're not available)
* debian/copyright: Rewritten to new machine-readable format. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#ifndef BOX_DB_TABLE_H
23
23
#define BOX_DB_TABLE_H
24
24
 
25
 
#include "box_db.h"
 
25
#include <glom/box_withbuttons.h>
 
26
#include <glom/base_db_table.h>
26
27
#include <glom/libglom/data_structure/field.h>
 
28
#include <libglademm.h>
27
29
#include <algorithm> //find_if used in various places.
28
30
 
29
31
namespace Glom
30
32
{
31
33
 
32
 
class Box_DB_Table : public Box_DB
 
34
/** A Box that has access to a database table's structure.
 
35
 */
 
36
class Box_DB_Table
 
37
: public Box_WithButtons,
 
38
  public Base_DB_Table
33
39
{
34
40
public: 
35
41
  Box_DB_Table();
36
42
  Box_DB_Table(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
37
43
  virtual ~Box_DB_Table();
38
 
 
39
 
  virtual bool init_db_details(const Glib::ustring& table_name);
40
 
  virtual bool refresh_data_from_database();
41
 
 
42
 
  virtual Glib::ustring get_table_name();
43
 
 
44
 
  //TODO: Put this somewhere more sensible:
45
 
  typedef std::map<GType, Glib::ustring> type_map_valuetypes;
46
 
 
47
 
protected:
48
 
 
49
 
  //virtual Glib::RefPtr<Gnome::Gda::DataModel> record_new(Gnome::Gda::Value primary_key_value);
50
 
 
51
 
  Gnome::Gda::Value get_entered_field_data_field_only(const sharedptr<const Field>& field) const;
52
 
  virtual Gnome::Gda::Value get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const;
53
 
 
54
 
  //static sharedptr<Field> get_field_primary_key(const type_vecFields& fields);
55
 
 
56
 
  unsigned long get_last_auto_increment_value(const Glib::RefPtr<Gnome::Gda::DataModel>& data_model, const Glib::ustring& field_name);
57
 
 
58
 
 
59
 
  //static type_vecFields get_fields_for_datamodel(const Glib::RefPtr<Gnome::Gda::DataModel>& data_model); 
60
 
  static Glib::ustring postgres_get_field_definition_for_sql(const Glib::RefPtr<const Gnome::Gda::Column>& field_info);
61
 
 
62
 
  Glib::ustring m_table_name;
 
44
    
 
45
  Gtk::Window* get_app_window();
 
46
  const Gtk::Window* get_app_window() const;
63
47
};
64
48
 
65
49
} //namespace Glom