Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3259 in orxonox.OLD for orxonox/branches/updater/src/gui


Ignore:
Timestamp:
Dec 23, 2004, 3:40:04 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/updater: ProgressBar works, just a funny play-thing…

Location:
orxonox/branches/updater/src/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/gui/Makefile.in

    r3250 r3259  
    228228          esac; \
    229229        done; \
    230         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/gui/Makefile'; \
     230        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/gui/Makefile'; \
    231231        cd $(top_srcdir) && \
    232           $(AUTOMAKE) --gnu  src/gui/Makefile
     232          $(AUTOMAKE) --foreign  src/gui/Makefile
    233233.PRECIOUS: Makefile
    234234Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc

    r3244 r3259  
    11861186   \brief Sets the Total size of the Bar. (ex. The maximum one can download)
    11871187*/
    1188 void setTotalSize (double totalSize)
    1189 {
    1190  
     1188void ProgressBar::setTotalSize (double totalSize)
     1189{
     1190  this->totalSize = totalSize;
    11911191}
    11921192
  • orxonox/branches/updater/src/gui/orxonox_gui_update.cc

    r3258 r3259  
    5959  updateWindow = new Window ("dampfen::update");   
    6060  Window::addWindow(updateWindow);
    61  
    6261  updateWindowBox = new Box ('v');
    6362
    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());
    7667 
    7768  // the close-Button of the Update Window.
     
    10394}
    10495
     96void 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
     108Button* OrxonoxGuiUpdate::updateDataWindowGetButton(void)
     109{
     110  return updateData;
     111}
     112
     113void 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
     137Button* OrxonoxGuiUpdate::updateSourceWindowGetButton(void)
     138{
     139  return updateSource;
     140}
     141
    105142
    106143#ifdef HAVE_GTK2
     
    122159   \param button The Button, that triggered this event.
    123160*/
    124 gint OrxonoxGuiUpdate::updateSourceFunc(GtkWidget* w, GdkEventKey* event, void* button)
     161gint OrxonoxGuiUpdate::updateSourceFunc(GtkWidget* w, GdkEventKey* event, void* bar)
    125162{
    126 
     163  ProgressBar* tmpBar = static_cast<ProgressBar*>(bar);
     164  tmpBar->setTotalSize(20);
     165  tmpBar->setProgress(tmpBar->getProgress()+1);
    127166}
    128167
  • orxonox/branches/updater/src/gui/orxonox_gui_update.h

    r3257 r3259  
    1717  Frame* updateFrame;          //!< The Frame that holds the updateOptions.
    1818  Box* updateBox;              //!< The Box that holds the updateOptions.
    19 
     19 
    2020  Button* updateWindowButton;  //!< The Button that opens the update Window.
    2121  Window* updateWindow;        //!< A Window to update orxonox.
     
    2424  Button* updateSource;        //!< A Button to update the Source of orxonox. \todo tricky
    2525  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.
    2629
     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 
    2736#ifdef HAVE_GTK2
    28   static gint updateDataFunc (GtkWidget* w, GdkEventKey* event, void* button);
    29   static gint updateSourceFunc (GtkWidget* w, GdkEventKey* event, void* button);
     37  static gint updateDataFunc (GtkWidget* w, GdkEventKey* event, void* bar);
     38  static gint updateSourceFunc (GtkWidget* w, GdkEventKey* event, void* bar);
    3039#endif /* HAVE_GTK2 */
    3140
     
    4049  Button* updateWindowGetButton(void);
    4150
     51  void updateDataWindowCreate (void);
     52  Button* updateDataWindowGetButton(void);
     53
     54  void updateSourceWindowCreate (void);
     55  Button* updateSourceWindowGetButton(void);
    4256};
    4357
Note: See TracChangeset for help on using the changeset viewer.