#include "vapiGtkInterface.h"
#include "vapiIO.h"
#include "vapiIOList.h"
#include "vapiGtkOptions.h"
#include "vapiGtkWindowIOConfigure.h"
Diagrama de dependências de inclusão para vapiGtkWindowIOConfigure.h:
Este grafo mostra quais são os ficheiros que incluem directamente ou indirectamente este ficheiro:
Ir para o código fonte deste ficheiro.
Funções | |
GtkWidget * | vapiGtkWindowIOConfiguredGetActiveTable () |
void | vapiGtkWindowIOConfiguredList () |
void | vapiGtkWindowIOConfiguredRemove (GtkWidget *widget, gpointer user_data) |
void | vapiGtkWindowIOConfiguredSaveChanges (GtkWidget *widget, gpointer user_data) |
void | vapiGtkWindowIOConfiguredSelect (GtkWidget *widget, GtkTreePath *path, GtkTreeIter *iter, gpointer data) |
void | vapiGtkWindowIOConfiguredTablesInit () |
void | vapiGtkWindowIOConfigureInit () |
GtkWidget* vapiGtkWindowIOConfiguredGetActiveTable | ( | ) |
Definido na linha 259 do ficheiro vapiGtkWindowIOConfigure.c.
Referências NumberOfIOTypes, tvIOConfiguredList, v_debug e vapiGtkTableGetSelectedRow().
Referenciado por vapiGtkWindowIOConfiguredRemove(), vapiGtkWindowIOConfiguredSaveChanges() e vapiGtkWindowIOConfiguredSelect().
00260 { 00261 int selectedRow, i; 00262 for (i = 0; i <= NumberOfIOTypes; i++) 00263 { 00264 selectedRow = 00265 vapiGtkTableGetSelectedRow (tvIOConfiguredList[i]); 00266 00267 if (selectedRow >= 0) 00268 { 00269 v_debug ("é a tabela numero %d", i); 00270 return tvIOConfiguredList[i]; 00271 } 00272 } 00273 return NULL; 00274 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkWindowIOConfiguredList | ( | ) |
Definido na linha 82 do ficheiro vapiGtkWindowIOConfigure.c.
Referências GlobalIOListConfigured, _vIOConfigured::IO, _vIO::IOname, _vIO::IOtype, NumberOfIOTypes, NumberOfIOTypesPlusPlus, SelectedIOConfigured, tvIOConfiguredList, v_debug, v_error(), v_list_count_elements(), v_list_get(), vapiIOTypeToString(), vInput, vInputN, vIOBoth, vIOBothN, vOutput e vOutputN.
Referenciado por vapiGtkWindowIOAdd_Add(), vapiGtkWindowIOConfiguredRemove() e vapiGtkWindowIOConfigureInit().
00083 { 00084 00085 int i, ConfiguredListSize, type; 00086 vIOConfigured *IOConfigured; 00087 GtkTreeIter iter; 00088 GtkTreeStore *treeStore[NumberOfIOTypesPlusPlus]; 00089 00090 /* 00091 * Iniciar variaveis e treeStores. 00092 */ 00093 SelectedIOConfigured = -1; 00094 00095 for (i = 0; i <= NumberOfIOTypes; i++) 00096 { 00097 treeStore[i] = 00098 gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING, 00099 G_TYPE_STRING); 00100 } 00101 00102 ConfiguredListSize = v_list_count_elements (GlobalIOListConfigured); 00103 00104 if (ConfiguredListSize > 0) 00105 { 00106 00107 for (i = 0; i < ConfiguredListSize; i++) 00108 { 00109 IOConfigured = 00110 (vIOConfigured *) 00111 v_list_get (GlobalIOListConfigured, i); 00112 /* 00113 * Adicionar Nova linha na tabela. 00114 */ 00115 v_debug ("aqui %d", IOConfigured->IO->IOtype); 00116 switch (IOConfigured->IO->IOtype) 00117 { 00118 case vInput: 00119 case vInputN: 00120 { 00121 type = 0; 00122 break; 00123 } 00124 00125 case vOutput: 00126 case vOutputN: 00127 { 00128 type = 1; 00129 break; 00130 } 00131 case vIOBoth: 00132 case vIOBothN: 00133 { 00134 type = 2; 00135 break; 00136 } 00137 default: 00138 { 00139 type = NumberOfIOTypes; 00140 v_error ("Tipo de IO não definido"); 00141 break; 00142 } 00143 } 00144 v_debug ("ali %d", type); 00145 if (type >= 0 && type < NumberOfIOTypes) 00146 { 00147 v_debug ("Type of IO %d", type); 00148 gtk_tree_store_append (treeStore[type], &iter, 00149 NULL); 00150 gtk_tree_store_set (treeStore[type], &iter, 0, 00151 i, 1, 00152 vapiIOTypeToString 00153 (IOConfigured->IO-> 00154 IOtype), 2, 00155 IOConfigured->IO->IOname, 00156 -1); 00157 00158 gtk_tree_store_append (treeStore 00159 [NumberOfIOTypes], 00160 &iter, NULL); 00161 gtk_tree_store_set (treeStore 00162 [NumberOfIOTypes], &iter, 00163 0, i, 1, 00164 vapiIOTypeToString 00165 (IOConfigured->IO-> 00166 IOtype), 2, 00167 IOConfigured->IO->IOname, 00168 -1); 00169 } 00170 } 00171 } 00172 for (i = 0; i <= NumberOfIOTypes; i++) 00173 { 00174 gtk_tree_view_set_model (GTK_TREE_VIEW 00175 (tvIOConfiguredList[i]), 00176 GTK_TREE_MODEL (treeStore[i])); 00177 } 00178 00179 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkWindowIOConfiguredRemove | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Definido na linha 277 do ficheiro vapiGtkWindowIOConfigure.c.
Referências vapiGtkTableGetValueFromSelection(), vapiGtkWindowIOConfiguredGetActiveTable(), vapiGtkWindowIOConfiguredList(), vapiIOConfiguredDelete() e vapiIOConfiguredToXML().
Referenciado por vapiGtkWindowIOConfigureInit().
00278 { 00279 GtkWidget *Table; 00280 GValue gvalue = { 00281 0, 00282 }; 00283 00284 int IOConfiguredIndex; 00285 00286 Table = vapiGtkWindowIOConfiguredGetActiveTable (); 00287 if (Table == NULL) 00288 { 00289 return; 00290 } 00291 vapiGtkTableGetValueFromSelection (Table, &gvalue, 0); 00292 IOConfiguredIndex = (int) g_value_get_int (&gvalue); 00293 00294 vapiIOConfiguredDelete (IOConfiguredIndex); 00295 00296 vapiGtkWindowIOConfiguredList (); 00297 vapiIOConfiguredToXML (); 00298 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkWindowIOConfiguredSaveChanges | ( | GtkWidget * | widget, | |
gpointer | user_data | |||
) |
Definido na linha 301 do ficheiro vapiGtkWindowIOConfigure.c.
Referências GlobalIOListConfigured, _vIOConfigured::IO, IOConfOptionsData, _vIOConfigured::Options, _vIO::OptionsSettings, v_list_get(), vapiGtkOptionsGetOptions(), vapiGtkTableGetValueFromSelection(), vapiGtkWindowIOConfiguredGetActiveTable(), vapiIOConfiguredToXML(), vapiOptionsInit() e vOptionsFree().
Referenciado por vapiGtkWindowIOConfigureInit().
00302 { 00303 vOptions *Options; 00304 GtkWidget *Table; 00305 GValue gvalue = { 0, }; 00306 int IOConfiguredIndex; 00307 vIOConfigured *IOConfigured; 00308 Table = vapiGtkWindowIOConfiguredGetActiveTable (); 00309 00310 if (Table == NULL) 00311 { 00312 return; 00313 } 00314 vapiGtkTableGetValueFromSelection (Table, &gvalue, 0); 00315 IOConfiguredIndex = (int) g_value_get_int (&gvalue); 00316 IOConfigured = v_list_get (GlobalIOListConfigured, IOConfiguredIndex); 00317 00318 Options = vapiOptionsInit (IOConfigured->IO->OptionsSettings); 00319 vapiGtkOptionsGetOptions (Options, IOConfigured->IO->OptionsSettings, 00320 NULL, &IOConfOptionsData); 00321 vOptionsFree (IOConfigured->Options, 00322 IOConfigured->IO->OptionsSettings, NULL); 00323 IOConfigured->Options=Options; 00324 00325 vapiIOConfiguredToXML (); 00326 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkWindowIOConfiguredSelect | ( | GtkWidget * | widget, | |
GtkTreePath * | path, | |||
GtkTreeIter * | iter, | |||
gpointer | data | |||
) |
Definido na linha 182 do ficheiro vapiGtkWindowIOConfigure.c.
Referências GlobalIOListConfigured, _vIOConfigured::IO, ListsConfigured, _vIOConfigured::Options, OptionsIOConfiguredContainer, _vIO::OptionsSettings, SelectedIOConfigured, v_list_get(), vapiGtkOptionsCreate(), vapiGtkTableGetValueFromSelection(), vapiGtkWindowIOConfiguredGetActiveTable() e vboxIOConfiguredOptionsContainer.
Referenciado por vapiGtkWindowIOConfiguredTablesInit().
00184 { 00185 vIOConfigured *IOConfigured; 00186 GtkWidget *Table; 00187 GValue gvalue = { 0, }; 00188 if (path == NULL) 00189 { 00190 return; 00191 } 00192 Table = vapiGtkWindowIOConfiguredGetActiveTable (); 00193 00194 if (Table == NULL) 00195 { 00196 return; 00197 } 00198 00199 vapiGtkTableGetValueFromSelection (Table, &gvalue, 0); 00200 SelectedIOConfigured = (int) g_value_get_int (&gvalue); 00201 IOConfigured = v_list_get (GlobalIOListConfigured, SelectedIOConfigured); 00202 00203 vapiGtkOptionsCreate 00204 (vboxIOConfiguredOptionsContainer, 00205 &OptionsIOConfiguredContainer, 00206 ListsConfigured, IOConfigured->Options, 00207 IOConfigured->IO->OptionsSettings, NULL, NULL, NULL); 00208 00209 gtk_box_reorder_child ((GtkBox *) vboxIOConfiguredOptionsContainer, 00210 OptionsIOConfiguredContainer, 1); 00211 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkWindowIOConfiguredTablesInit | ( | ) |
Definido na linha 214 do ficheiro vapiGtkWindowIOConfigure.c.
Referências NumberOfIOTypes, tvIOConfiguredList e vapiGtkWindowIOConfiguredSelect().
Referenciado por vapiGtkWindowIOConfigureInit().
00215 { 00216 GtkCellRenderer *renderer; 00217 int i; 00218 00219 for (i = 0; i <= NumberOfIOTypes; i++) 00220 { 00221 00222 renderer = gtk_cell_renderer_text_new (); 00223 gtk_tree_selection_set_mode (gtk_tree_view_get_selection 00224 (GTK_TREE_VIEW 00225 (tvIOConfiguredList[i])), 00226 GTK_SELECTION_SINGLE); 00227 00228 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 00229 (tvIOConfiguredList 00230 [i]), -1, "id", 00231 renderer, "text", 00232 0, NULL); 00233 00234 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 00235 (tvIOConfiguredList 00236 [i]), -1, 00237 "Tipo", renderer, 00238 "text", 1, NULL); 00239 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 00240 (tvIOConfiguredList 00241 [i]), -1, 00242 "Nome", renderer, 00243 "text", 2, NULL); 00244 00245 g_signal_connect (G_OBJECT (tvIOConfiguredList[i]), 00246 "row_activated", 00247 G_CALLBACK 00248 (vapiGtkWindowIOConfiguredSelect), NULL); 00249 00250 } 00251 00252 00253 g_signal_connect (G_OBJECT (tvIOConfiguredList[NumberOfIOTypes]), 00254 "row_activated", 00255 G_CALLBACK (vapiGtkWindowIOConfiguredSelect), NULL); 00256 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkWindowIOConfigureInit | ( | ) |