Changeset 3259 in orxonox.OLD for orxonox/branches/updater/src/gui
- Timestamp:
- Dec 23, 2004, 3:40:04 PM (20 years ago)
- Location:
- orxonox/branches/updater/src/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/Makefile.in
r3250 r3259 228 228 esac; \ 229 229 done; \ 230 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- gnusrc/gui/Makefile'; \230 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gui/Makefile'; \ 231 231 cd $(top_srcdir) && \ 232 $(AUTOMAKE) -- gnusrc/gui/Makefile232 $(AUTOMAKE) --foreign src/gui/Makefile 233 233 .PRECIOUS: Makefile 234 234 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc
r3244 r3259 1186 1186 \brief Sets the Total size of the Bar. (ex. The maximum one can download) 1187 1187 */ 1188 void setTotalSize (double totalSize)1189 { 1190 1188 void ProgressBar::setTotalSize (double totalSize) 1189 { 1190 this->totalSize = totalSize; 1191 1191 } 1192 1192 -
orxonox/branches/updater/src/gui/orxonox_gui_update.cc
r3258 r3259 59 59 updateWindow = new Window ("dampfen::update"); 60 60 Window::addWindow(updateWindow); 61 62 61 updateWindowBox = new Box ('v'); 63 62 64 updateData = new Button ("update orxonox::Data"); 65 66 #ifdef HAVE_GTK2 67 updateData->connectSignal("button_press_event", updateData, updateDataFunc); 68 #endif /* HAVE_GTK2 */ 69 updateWindowBox->fill (updateData); 70 71 updateSource = new Button ("update orxonox::Source"); 72 #ifdef HAVE_GTK2 73 updateSource->connectSignal("button_press_event", updateData, updateSourceFunc); 74 #endif /* HAVE_GTK2 */ 75 updateWindowBox->fill (updateSource); 63 updateDataWindowCreate(); 64 updateWindowBox->fill (updateDataWindowGetButton()); 65 updateSourceWindowCreate(); 66 updateWindowBox->fill (updateSourceWindowGetButton()); 76 67 77 68 // the close-Button of the Update Window. … … 103 94 } 104 95 96 void OrxonoxGuiUpdate::updateDataWindowCreate (void) 97 { 98 99 updateData = new Button ("update orxonox::Data"); 100 101 #ifdef HAVE_GTK2 102 updateData->connectSignal("button_press_event", updateData, updateDataFunc); 103 #endif /* HAVE_GTK2 */ 104 105 106 } 107 108 Button* OrxonoxGuiUpdate::updateDataWindowGetButton(void) 109 { 110 return updateData; 111 } 112 113 void OrxonoxGuiUpdate::updateSourceWindowCreate (void) 114 { 115 // the button, that opens this Window. 116 updateSource = new Button ("update orxonox::Source"); 117 118 // the Window itself 119 updateSourceWindow = new Window ("update orxonox::Source"); 120 updateSourceWindow->connectSignal("destroy", updateSourceWindow, Window::windowClose); 121 updateSourceWindow->connectSignal("delete_event", updateSourceWindow, Window::windowClose); 122 123 updateSourceWindowBox = new Box (); 124 125 updateSourceBar = new ProgressBar (); 126 updateSourceWindowBox->fill(updateSourceBar); 127 test = new Button ("increment"); 128 test->connectSignal("button_press_event", updateSourceBar, updateSourceFunc); 129 updateSourceWindowBox->fill(test); 130 updateSourceWindow->fill(updateSourceWindowBox); 131 #ifdef HAVE_GTK2 132 updateSource->connectSignal("button_press_event", updateSourceWindow, Window::windowOpen); 133 #endif /* HAVE_GTK2 */ 134 135 } 136 137 Button* OrxonoxGuiUpdate::updateSourceWindowGetButton(void) 138 { 139 return updateSource; 140 } 141 105 142 106 143 #ifdef HAVE_GTK2 … … 122 159 \param button The Button, that triggered this event. 123 160 */ 124 gint OrxonoxGuiUpdate::updateSourceFunc(GtkWidget* w, GdkEventKey* event, void* b utton)161 gint OrxonoxGuiUpdate::updateSourceFunc(GtkWidget* w, GdkEventKey* event, void* bar) 125 162 { 126 163 ProgressBar* tmpBar = static_cast<ProgressBar*>(bar); 164 tmpBar->setTotalSize(20); 165 tmpBar->setProgress(tmpBar->getProgress()+1); 127 166 } 128 167 -
orxonox/branches/updater/src/gui/orxonox_gui_update.h
r3257 r3259 17 17 Frame* updateFrame; //!< The Frame that holds the updateOptions. 18 18 Box* updateBox; //!< The Box that holds the updateOptions. 19 19 20 20 Button* updateWindowButton; //!< The Button that opens the update Window. 21 21 Window* updateWindow; //!< A Window to update orxonox. … … 24 24 Button* updateSource; //!< A Button to update the Source of orxonox. \todo tricky 25 25 Button* updateWindowClose; //!< A Button to Close the update Window 26 ProgressBar* updateDataBar; //!< A Bar to display the progress of the download. 27 ProgressBar* updateSourceBar;//!< A Bar to display the progress of the download. 28 Window* updateDataWindow; //!< A Window for the data-update. 26 29 30 31 Window* updateSourceWindow; //!< A Window for the Source-update. 32 Box* updateSourceWindowBox; //!< A Box for the Window for the Source-update. 33 34 Button* test; //!< will be deleted soon. 35 27 36 #ifdef HAVE_GTK2 28 static gint updateDataFunc (GtkWidget* w, GdkEventKey* event, void* b utton);29 static gint updateSourceFunc (GtkWidget* w, GdkEventKey* event, void* b utton);37 static gint updateDataFunc (GtkWidget* w, GdkEventKey* event, void* bar); 38 static gint updateSourceFunc (GtkWidget* w, GdkEventKey* event, void* bar); 30 39 #endif /* HAVE_GTK2 */ 31 40 … … 40 49 Button* updateWindowGetButton(void); 41 50 51 void updateDataWindowCreate (void); 52 Button* updateDataWindowGetButton(void); 53 54 void updateSourceWindowCreate (void); 55 Button* updateSourceWindowGetButton(void); 42 56 }; 43 57
Note: See TracChangeset
for help on using the changeset viewer.