Added start of db view/manipulation interface
This commit is contained in:
parent
87b5c2aede
commit
4542d9f210
37
src/common/datagrid.php
Normal file
37
src/common/datagrid.php
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* OpenSQLManager
|
||||||
|
*
|
||||||
|
* Free Database manager for Open Source Databases
|
||||||
|
*
|
||||||
|
* @author Timothy J. Warren
|
||||||
|
* @copyright Copyright (c) 2012
|
||||||
|
* @link https://github.com/aviat4ion/OpenSQLManager
|
||||||
|
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||||
|
*/
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class for controlling database views
|
||||||
|
*/
|
||||||
|
class DataGrid extends GtkTreeView{
|
||||||
|
|
||||||
|
protected $model, $view;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->model = new GtkTreeStore(GObject::TYPE_PHP_VALUE, GObject::TYPE_STRING);
|
||||||
|
parent::__construct($this->model);
|
||||||
|
}
|
||||||
|
|
||||||
|
function __get($key)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function __set($key, $val)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -161,6 +161,9 @@ class firebird {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Database manipulation class
|
||||||
|
*/
|
||||||
class firebird_manip extends firebird {
|
class firebird_manip extends firebird {
|
||||||
|
|
||||||
function __construct($db, $user="sysdba", $pass="masterkey")
|
function __construct($db, $user="sysdba", $pass="masterkey")
|
||||||
|
@ -48,7 +48,7 @@ class Main extends GtkWindow {
|
|||||||
$dlg = new GtkAboutDialog();
|
$dlg = new GtkAboutDialog();
|
||||||
$dlg->set_transient_for($this);
|
$dlg->set_transient_for($this);
|
||||||
|
|
||||||
$dlg->set_name($this->get_title());
|
$dlg->set_program_name($this->get_title());
|
||||||
$dlg->set_version('0.1.0pre');
|
$dlg->set_version('0.1.0pre');
|
||||||
|
|
||||||
$dlg->set_copyright("Copyright (c) ".date('Y')." Timothy J. Warren");
|
$dlg->set_copyright("Copyright (c) ".date('Y')." Timothy J. Warren");
|
||||||
@ -60,12 +60,12 @@ class Main extends GtkWindow {
|
|||||||
|
|
||||||
$dlg->set_authors(array(
|
$dlg->set_authors(array(
|
||||||
'Timothy J. Warren',
|
'Timothy J. Warren',
|
||||||
'Nathan Dupuie',
|
//'Nathan Dupuie',
|
||||||
));
|
));
|
||||||
|
|
||||||
$dlg->set_artists(array(
|
/*$dlg->set_artists(array(
|
||||||
'Nathan Dupuie',
|
'Nathan Dupuie',
|
||||||
));
|
));*/
|
||||||
|
|
||||||
$dlg->run();
|
$dlg->run();
|
||||||
|
|
||||||
@ -108,9 +108,11 @@ class Main extends GtkWindow {
|
|||||||
// Add the main interface area hbox
|
// Add the main interface area hbox
|
||||||
$main_vbox->pack_start($hpane);
|
$main_vbox->pack_start($hpane);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Add the left column to the hpane
|
// Add the left column to the hpane
|
||||||
$hpane->pack1($this->_connection_sidebar(), FALSE);
|
$hpane->pack1($this->_connection_sidebar(), FALSE);
|
||||||
$hpane->pack2(new GtkVBox());
|
$hpane->pack2(new DataGrid());
|
||||||
|
|
||||||
// Add the Vbox, and show the window
|
// Add the Vbox, and show the window
|
||||||
$this->add($main_vbox);
|
$this->add($main_vbox);
|
||||||
|
Reference in New Issue
Block a user