Re-add Data Grid

This commit is contained in:
Timothy Warren 2012-03-28 15:13:34 -04:00
parent 7075ae51fa
commit 382fb8e711
2 changed files with 44 additions and 5 deletions

43
sys/common/data_grid.php Normal file
View File

@ -0,0 +1,43 @@
<?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 to simplify dealing with GtkTreeView
*/
class Data_Grid extends GtkTreeView {
protected $model;
/**
* Create the object
*/
public function __construct()
{
$this->model = new GtkTreeStore(Gobject::TYPE_PHP_VALUE, Gobject::TYPE_PHP_VALUE);
parent::__construct($this->model);
}
// --------------------------------------------------------------------------
/**
* Get the value of the cell at the provided coordinate array
*
* @param array $coord
* @return mixed
*/
public function get(array $coord)
{
// @todo implement
}
}

View File

@ -150,7 +150,7 @@ class Main extends GtkWindow {
$scrolled_win = new GtkScrolledWindow();
$scrolled_win->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
//$scrolled_win->add(new DataGrid());
$scrolled_win->add(new Data_Grid());
// Add the connection sidebar
$this->connection_sidebar =& Connection_Sidebar::get_instance();
@ -189,10 +189,6 @@ class Main extends GtkWindow {
//File Menu
{
//Set up the open item
//$open = new GtkImageMenuItem(GTK::STOCK_OPEN);
//$file_menu->append($open);
//Set up the quit item
$quit = new GtkImageMenuItem(GTK::STOCK_QUIT);
$quit->connect_simple('activate', array($this, 'quit'));