Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3261 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Dec 23, 2004, 11:26:51 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/updater: better update presentation. only one sub-window

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

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/gui/orxonox_gui_update.cc

    r3259 r3261  
    3838{
    3939  this->updateFrame = new Frame ("Update-Options:");
     40  this->updateFrame->setGroupName ("update");
    4041  this->updateBox = new Box ('v');
    41   this->updateWindowCreate ();
    4242
    43   this->updateBox->fill(this->updateWindowGetButton());
     43  // the Button for autoUpdating
     44  this->autoUpdate = new CheckButton ("auto update");
     45  this->updateBox->fill(this->autoUpdate);
     46  this->autoUpdate->setFlagName ("update", "u", 0);
     47  this->autoUpdate->saveable = true;
     48
     49  this->updateSourceWindowCreate ();
     50  this->updateBox->fill(this->updateSourceWindowGetButton());
     51
     52  this->updateDataWindowCreate ();
     53  this->updateBox->fill(this->updateDataWindowGetButton());
    4454
    4555  this->updateFrame->fill(this->updateBox);
     
    5565}
    5666
    57 void OrxonoxGuiUpdate::updateWindowCreate (void)
     67void OrxonoxGuiUpdate::updateDataWindowCreate (void)
    5868{
    59   updateWindow = new Window ("dampfen::update");   
    60   Window::addWindow(updateWindow);
    61   updateWindowBox = new Box ('v');
     69  updateDataWindow = new Window ("update orxonox::Data");   
     70  updateDataBox = new Box ('v');
    6271
    63   updateDataWindowCreate();
    64   updateWindowBox->fill (updateDataWindowGetButton());
    65   updateSourceWindowCreate();
    66   updateWindowBox->fill (updateSourceWindowGetButton());
    67  
    6872  // the close-Button of the Update Window.
    69   updateWindowClose = new Button ("close");
     73  //  updateWindowClose = new Button ("close");
    7074#ifdef HAVE_GTK2
    71   updateWindowClose->connectSignal("button_press_event", updateWindow, Window::windowClose);
     75  //  updateWindowClose->connectSignal("button_press_event", updateWindow, Window::windowClose);
    7276#endif /* HAVE_GTK2 */
    73   updateWindowBox->fill(updateWindowClose);
    74   updateWindow->fill (updateWindowBox);
     77  //  updateWindowBox->fill(updateWindowClose);
    7578
     79  updateDataBar = new ProgressBar ();
     80  updateDataBox->fill(updateDataBar);
     81  updateDataWindow->fill (updateDataBox);
    7682
    77   // crating the button that opens the Update Options
     83  updateDataWindowButton = new Button ("update orxonox::Data");
    7884#ifdef HAVE_GTK2
    79   updateWindowButton = new Button ("update");
    80   updateWindowButton->connectSignal("button_press_event", updateWindow, Window::windowOpen);
    81   updateWindow->connectSignal("destroy", updateWindow, Window::windowClose);
    82   updateWindow->connectSignal("delete_event", updateWindow, Window::windowClose);
     85  updateDataWindowButton->connectSignal("button_press_event", updateDataWindow, Window::windowOpen);
     86  updateDataWindow->connectSignal("destroy", updateDataWindow, Window::windowClose);
     87  updateDataWindow->connectSignal("delete_event", updateDataWindow, Window::windowClose);
    8388#endif /* HAVE_GTK2 */
    84 
    8589
    8690}
     
    8993   \returns A Pointer to the Button of the UpdaterWindow
    9094*/
    91 Button* OrxonoxGuiUpdate::updateWindowGetButton(void)
    92 {
    93   return updateWindowButton;
    94 }
    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 
    10895Button* OrxonoxGuiUpdate::updateDataWindowGetButton(void)
    10996{
    110   return updateData;
     97  return updateDataWindowButton;
    11198}
    11299
     
    114101{
    115102  // the button, that opens this Window.
    116   updateSource = new Button ("update orxonox::Source");
     103  updateSourceWindowButton = new Button ("update orxonox::Source");
    117104
    118105  // the Window itself
    119106  updateSourceWindow = new Window ("update orxonox::Source");
     107
     108  updateSourceBox = new Box ();
     109
     110  updateSourceBar = new ProgressBar ();
     111  updateSourceBox->fill(updateSourceBar);
     112  test = new Button ("increment");
     113
     114#ifdef HAVE_GTK2
     115  test->connectSignal("button_press_event", updateSourceBar, updateSourceFunc);
     116#endif /* HAVE_GTK2 */
     117
     118  updateSourceBox->fill(test);
     119  updateSourceWindow->fill(updateSourceBox);
     120#ifdef HAVE_GTK2
     121  updateSourceWindowButton->connectSignal("button_press_event", updateSourceWindow, Window::windowOpen);
    120122  updateSourceWindow->connectSignal("destroy", updateSourceWindow, Window::windowClose);
    121123  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);
    133124#endif /* HAVE_GTK2 */
    134125
     
    137128Button* OrxonoxGuiUpdate::updateSourceWindowGetButton(void)
    138129{
    139   return updateSource;
     130  return updateSourceWindowButton;
    140131}
    141132
  • orxonox/branches/updater/src/gui/orxonox_gui_update.h

    r3259 r3261  
    1717  Frame* updateFrame;          //!< The Frame that holds the updateOptions.
    1818  Box* updateBox;              //!< The Box that holds the updateOptions.
     19  CheckButton* autoUpdate;     //!< A Checkbutton to enable the automatic Updating.
     20
    1921 
    20   Button* updateWindowButton;  //!< The Button that opens the update Window.
    21   Window* updateWindow;        //!< A Window to update orxonox.
    22   Box* updateWindowBox;        //!< A Box to hold the updateWindow-Optios.
    23   Button* updateData;          //!< A Button to update the Data of orxonox.
    24   Button* updateSource;        //!< A Button to update the Source of orxonox. \todo tricky
    25   Button* updateWindowClose;   //!< A Button to Close the update Window
     22  Button* updateDataWindowButton;//!< A Button to update the Data of orxonox.
     23  Window* updateDataWindow;    //!< A Window for the data-update.
     24  Box* updateDataBox;          //!< A Box for the Window for the Data-update.
    2625  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.
    2926
    3027
     28  Button* updateSourceWindowButton;//!< A Button to update the Source of orxonox. \todo tricky
    3129  Window* updateSourceWindow;  //!< A Window for the Source-update.
    32   Box* updateSourceWindowBox;  //!< A Box for the Window for the Source-update.
     30  Box* updateSourceBox;  //!< A Box for the Window for the Source-update.
     31  ProgressBar* updateSourceBar;//!< A Bar to display the progress of the download.
    3332
    3433  Button* test;  //!< will be deleted soon.
Note: See TracChangeset for help on using the changeset viewer.