From fb462998b436c5003eb9e13012ecfe358f1b9b1a Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 30 Mar 2012 14:52:46 -0400 Subject: [PATCH] Move datagrid class --- sys/common/data_grid.php | 86 ---------------------------------------- 1 file changed, 86 deletions(-) delete mode 100644 sys/common/data_grid.php diff --git a/sys/common/data_grid.php b/sys/common/data_grid.php deleted file mode 100644 index be51e97..0000000 --- a/sys/common/data_grid.php +++ /dev/null @@ -1,86 +0,0 @@ -model = ( ! is_null($model)) - ? $model - : new GtkTreeStore(Gobject::TYPE_PHP_VALUE, Gobject::TYPE_PHP_VALUE); - - parent::__construct($this->model); - } - - // -------------------------------------------------------------------------- - - /** - * Get the value of the model for the current selection - * - * @param int pos - * @return mixed - */ - public function get($pos = 0) - { - // Get the selection object of the row - $sel = $this->get_selection(); - - // Get the model and iterator for the selected row - list($model, $iter) = $sel->get_selected(); - - // Get the data from the model - return $model->get_value($iter, $pos); - } - - // -------------------------------------------------------------------------- - - /** - * Set the value of the cell at the provided coordinate array - * - * @param array $coord - * @param mixed $val - */ - public function set(array $coord, $val) - { - // @todo implement - } - - // -------------------------------------------------------------------------- - - /** - * Empty the model - */ - public function reset() - { - $this->model->clear(); - - $cols = $this->get_columns(); - - foreach($cols as $c) - { - $this->remove_column($c); - } - } -} -// End of data_grid.php \ No newline at end of file