Changeset 28
- Timestamp:
- 19/12/06 21:32:15 (6 years ago)
- Location:
- trunk/OpenYahtzee
- Files:
-
- 5 edited
-
openyahtzee.kdevelop.pcs (modified) (previous)
-
openyahtzee.kdevses (modified) (3 diffs)
-
src/HighScoreTableDB.cpp (modified) (1 diff)
-
src/HighScoreTableDB.h (modified) (1 diff)
-
src/MainFrame.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/OpenYahtzee/openyahtzee.kdevses
r25 r28 2 2 <!DOCTYPE KDevPrjSession> 3 3 <KDevPrjSession> 4 <DocsAndViews NumberOfDocuments=" 9" >4 <DocsAndViews NumberOfDocuments="11" > 5 5 <Doc0 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsDB.h" > 6 <View0 Type="Source" />6 <View0 line="0" Type="Source" /> 7 7 </Doc0> 8 8 <Doc1 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/openyahtzee.cpp" > … … 10 10 </Doc1> 11 11 <Doc2 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/MainFrame.cpp" > 12 <View0 Type="Source" />12 <View0 line="64" Type="Source" /> 13 13 </Doc2> 14 14 <Doc3 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/ObjectsID.h" > … … 16 16 </Doc3> 17 17 <Doc4 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/MainFrame.h" > 18 <View0 Type="Source" />18 <View0 line="0" Type="Source" /> 19 19 </Doc4> 20 20 <Doc5 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/DBwrapper.h" > 21 <View0 line="26"Type="Source" />21 <View0 Type="Source" /> 22 22 </Doc5> 23 23 <Doc6 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/HighScoreTableDB.cpp" > 24 <View0 line="72" Type="Source" /> 25 </Doc6> 26 <Doc7 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsDialog.cpp" > 24 27 <View0 line="0" Type="Source" /> 25 </Doc6>26 <Doc7 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/HighScoreDialog.cpp" >27 <View0 line="32" Type="Source" />28 28 </Doc7> 29 <Doc8 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsD ialog.cpp" >30 <View0 line=" 29" Type="Source" />29 <Doc8 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsDB.cpp" > 30 <View0 line="0" Type="Source" /> 31 31 </Doc8> 32 <Doc9 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/HighScoreTableDB.h" > 33 <View0 line="49" Type="Source" /> 34 </Doc9> 35 <Doc10 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/HighScoreDialog.cpp" > 36 <View0 line="0" Type="Source" /> 37 </Doc10> 32 38 </DocsAndViews> 33 39 <pluginList> -
trunk/OpenYahtzee/src/HighScoreTableDB.cpp
r17 r28 68 68 } 69 69 70 int HighScoreTableDB::GetSize() 71 { 72 return m_size; 73 } 70 74 void HighScoreTableDB::SetSize(int size) 71 75 { -
trunk/OpenYahtzee/src/HighScoreTableDB.h
r17 r28 48 48 int SendHighScore(std::string name, std::string date, int score); 49 49 void SetSize(int size); 50 int GetSize(); 50 51 51 52 std::list<std::string> GetHighScoreTable(); -
trunk/OpenYahtzee/src/MainFrame.cpp
r21 r28 46 46 #include "six.xpm" 47 47 48 //default values 48 49 #define SPACE_SIZE 1 50 #define DEF_HIGHSCORESIZE 16 49 51 50 52 MainFrame::MainFrame(const wxString& title, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE) 51 53 : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, size, style) 52 54 { 55 56 std::ostringstream sstr; 57 53 58 m_settingsdb = new SettingsDB(); //Get the settings database connection 54 59 m_highscoredb = new HighScoreTableDB(); 55 int highscoresize = atoi((m_settingsdb->GetKey("highscoresize")).c_str()); 56 m_highscoredb->SetSize( (highscoresize>0)?highscoresize:20 ); 60 61 62 if (m_settingsdb->GetKey("highscoresize") == "") { //check if we need to create a newdatabase 63 m_highscoredb->SetSize(DEF_HIGHSCORESIZE); 64 sstr<<DEF_HIGHSCORESIZE<<std::flush; 65 m_settingsdb->SetKey("highscoresize", sstr.str()); 66 } else { 67 int highscoresize = atoi((m_settingsdb->GetKey("highscoresize")).c_str()); 68 //m_highscoredb->SetSize((highscoresize>0)?highscoresize:DEF_HIGHSCORESIZE); 69 m_highscoredb->SetSize(highscoresize); 70 } 57 71 58 72 bitmap_dices[0] = new wxBitmap(one_xpm); … … 297 311 std::ostringstream sstr; 298 312 299 data.highscoresize = atoi((m_settingsdb->GetKey("highscoresize")).c_str());313 data.highscoresize = m_highscoredb->GetSize(); 300 314 301 315 dialog->SetData(data);
Note: See TracChangeset
for help on using the changeset viewer.
