Changeset 67


Ignore:
Timestamp:
14/04/07 19:00:14 (7 years ago)
Author:
guyru
Message:

added some code documentation

Location:
trunk/OpenYahtzee
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/OpenYahtzee/openyahtzee.kdevelop.pcs

    • Property svn:eol-style deleted
    • Property svn:mime-type set to application/octet-stream
  • trunk/OpenYahtzee/openyahtzee.kdevses

    r65 r67  
    1010  </Doc1> 
    1111  <Doc2 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/MainFrame.cpp" > 
    12    <View0 line="641" Type="Source" /> 
     12   <View0 line="158" Type="Source" /> 
    1313  </Doc2> 
    1414  <Doc3 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/ObjectsID.h" > 
    15    <View0 line="74" Type="Source" /> 
     15   <View0 Type="Source" /> 
    1616  </Doc3> 
    1717  <Doc4 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/MainFrame.h" > 
    18    <View0 line="63" Type="Source" /> 
     18   <View0 Type="Source" /> 
    1919  </Doc4> 
    2020  <Doc5 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/wxDynamicBitmap.cpp" > 
    21    <View0 line="80" Type="Source" /> 
     21   <View0 Type="Source" /> 
    2222  </Doc5> 
    2323  <Doc6 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/wxDynamicBitmap.h" > 
  • trunk/OpenYahtzee/src/MainFrame.cpp

    r65 r67  
    157157        wxFlexGridSizer* lowergrid = new wxFlexGridSizer(2, 0, 10); 
    158158 
    159          
     159        //BEGIN layout for the upper section of the score board 
    160160        uppergrid->Add(new wxButton(panel,ID_ACES,wxT("Aces")),0,wxALL,SPACE_SIZE); 
    161161        uppergrid->Add(new wxTextCtrl(panel, ID_ACESTEXT),1,wxALL,SPACE_SIZE); 
     
    176176        uppergrid->Add(new wxStaticText(panel, wxID_ANY, wxT("Total of upper section:")),0,wxALL,SPACE_SIZE); 
    177177        uppergrid->Add(new wxTextCtrl(panel, ID_UPPERTOTAL),1,wxALL,SPACE_SIZE); 
    178  
    179  
     178        //END layout for the upper section of the score board 
     179 
     180        //BEGIN layout for the lower section of the score board 
    180181        lowergrid->Add(new wxButton(panel,ID_THREEOFAKIND,wxT("3 of a kind")),0,wxALL,SPACE_SIZE); 
    181182        lowergrid->Add(new wxTextCtrl(panel, ID_THREEOFAKINDTEXT),1,wxALL,SPACE_SIZE); 
     
    198199        lowergrid->Add(new wxStaticText(panel, wxID_ANY, wxT("Grand Total:")),0,wxALL,SPACE_SIZE); 
    199200        lowergrid->Add(new wxTextCtrl(panel, ID_GRANDTOTAL),1,wxALL,SPACE_SIZE); 
     201        //END layout for the lower section of the score board 
    200202 
    201203        uppersection->Add(uppergrid); 
     
    204206        sectionsSizer->Add(lowersection,0,wxALL,5); 
    205207 
     208        //BEGIN layout for the dice section of the score board 
    206209        diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE1,*bitmap_dices[0]),0,wxALL,3); 
    207210        diceSizer->Add(new wxCheckBox(panel, ID_DICE1KEEP, wxT("Keep")),0,wxBOTTOM,10); 
     
    215218        diceSizer->Add(new wxCheckBox(panel, ID_DICE5KEEP, wxT("Keep")),0,wxBOTTOM,10); 
    216219        diceSizer->Add(new wxButton(panel, ID_ROLL, wxT("Roll")),0,wxALL,3); 
     220        /*===> END layout for the dice section of the score board *******/ 
    217221 
    218222         
     
    242246        /***************************************/ 
    243247         
    244         /***Connect Menu items***/ 
     248        //BEGIN connecting the menu items' events 
    245249        Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnQuit)); 
    246250        Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnAbout)); 
     
    251255        Connect(ID_SHOWHIGHSCORE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnShowHighscore)); 
    252256        Connect(ID_SETTINGS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnSettings)); 
     257        //END connecting the menu items' events 
     258 
    253259        Connect(ID_ROLL, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (MainFrame::OnRollButton)); 
    254260 
     261        //BEGIN connecting the scoreboard buttons to the events 
    255262        Connect(ID_ACES,ID_SIXES, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (MainFrame::OnUpperButtons)); 
    256263        Connect(ID_THREEOFAKIND, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (MainFrame::On3ofakindButton)); 
     
    262269        Connect(ID_CHANCE, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (MainFrame::OnChanceButton)); 
    263270        Connect(ID_DICE1,ID_DICE5, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (MainFrame::OnDiceClick)); 
    264          
     271        //END connecting the scoreboard buttons to the event 
     272 
    265273        /*** End of Event Table ***/ 
    266274 
     
    282290} 
    283291 
    284 void MainFrame::OnCheckForUpdates (wxCommandEvent& event){ 
     292/** 
     293 * Connects to the Open Yahtzee website on sourceforge.net and checks for  
     294 * updates to the game. 
     295 * \param event  
     296 */ 
     297void MainFrame::OnCheckForUpdates (wxCommandEvent& event) 
     298{ 
    285299         
    286300        wxString link = wxT("http://openyahtzee.sourceforge.net/update.php?version="); 
     
    291305} 
    292306 
    293 void MainFrame::OnSendComment (wxCommandEvent& event){ 
    294          
     307 
     308/** 
     309 * Starts up the user browser and connects to the Open Yahtzee website's 
     310 * feedback page. 
     311 * \param event  
     312 */ 
     313void MainFrame::OnSendComment (wxCommandEvent& event) 
     314{ 
    295315        wxString link = wxT("http://openyahtzee.sourceforge.net/feedback.php"); 
    296316         
     
    304324} 
    305325 
     326/** 
     327 * This is the event handler of the New Game menu item. It starts a new  
     328 * game and clears the board from the last game. 
     329 * \param event  
     330 */ 
    306331void MainFrame::OnNewGame(wxCommandEvent& event) 
    307332{ 
     
    318343} 
    319344 
    320 ///This function handles the undo events 
     345/** 
     346 * This function handles the undo events. It's connected to the Undo menu item. 
     347 * 
     348 * Note that the function only allows undoing of scoring actions and not dice 
     349 * rolls. Also it won't allow the undoing of the last move of the game because 
     350 * of a technical problem relating to the case an high-score was made and then 
     351 * the user undo the last move and rescore another high-score and so on. 
     352 * @param event  
     353 */ 
    321354void MainFrame::OnUndo(wxCommandEvent& event) 
    322355{ 
Note: See TracChangeset for help on using the changeset viewer.