From f56fcc40bfe8d09d5fd93ecbd115c1dad15df865 Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 23 Feb 2010 21:10:35 +0000 Subject: [PATCH] update ColorCode plugin to the latest 0.6.1 version git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2403 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- plugins/ColorCode_plugin/ColorCode.pro | 21 +- plugins/ColorCode_plugin/INSTALL | 4 +- plugins/ColorCode_plugin/about.cpp | 2 +- plugins/ColorCode_plugin/background.cpp | 1 + plugins/ColorCode_plugin/ccsolver.cpp | 19 +- plugins/ColorCode_plugin/ccsolver.h | 4 + plugins/ColorCode_plugin/changelog | 29 + plugins/ColorCode_plugin/colorcode.cpp | 1377 ++++++++++++----- plugins/ColorCode_plugin/colorcode.h | 120 +- plugins/ColorCode_plugin/colorpeg.cpp | 47 +- plugins/ColorCode_plugin/colorpeg.h | 9 +- plugins/ColorCode_plugin/graphicsbtn.cpp | 151 ++ plugins/ColorCode_plugin/graphicsbtn.h | 76 + plugins/ColorCode_plugin/img/Thumbs.db | Bin 38912 -> 40960 bytes plugins/ColorCode_plugin/img/colorcode32.xpm | 632 ++++++++ plugins/ColorCode_plugin/img/configure.png | Bin 0 -> 1055 bytes .../ColorCode_plugin/img/icon_female16.png | Bin 0 -> 856 bytes plugins/ColorCode_plugin/main.cpp | 8 +- plugins/ColorCode_plugin/msg.cpp | 13 +- plugins/ColorCode_plugin/pegrow.cpp | 59 +- plugins/ColorCode_plugin/pegrow.h | 18 +- plugins/ColorCode_plugin/prefdialog.cpp | 314 ++++ plugins/ColorCode_plugin/prefdialog.h | 75 + plugins/ColorCode_plugin/prefdialog.ui | 434 ++++++ plugins/ColorCode_plugin/resource.qrc | 5 +- plugins/ColorCode_plugin/rowhint.cpp | 95 +- plugins/ColorCode_plugin/rowhint.h | 6 +- plugins/ColorCode_plugin/settings.cpp | 213 +++ plugins/ColorCode_plugin/settings.h | 67 + plugins/ColorCode_plugin/solutionrow.cpp | 100 ++ plugins/ColorCode_plugin/solutionrow.h | 50 + plugins/ColorCode_plugin/trans_cs.qm | Bin 7355 -> 20137 bytes plugins/ColorCode_plugin/trans_cs.ts | 430 ++++- plugins/ColorCode_plugin/trans_de.qm | Bin 5741 -> 20409 bytes plugins/ColorCode_plugin/trans_de.ts | 466 +++++- plugins/ColorCode_plugin/trans_en.qm | 1 + plugins/ColorCode_plugin/trans_en.ts | 438 +++++- plugins/ColorCode_plugin/trans_fr.qm | Bin 0 -> 12875 bytes plugins/ColorCode_plugin/trans_fr.ts | 660 ++++++++ plugins/ColorCode_plugin/trans_hu.qm | Bin 0 -> 19832 bytes plugins/ColorCode_plugin/trans_hu.ts | 666 ++++++++ 41 files changed, 6043 insertions(+), 567 deletions(-) create mode 100644 plugins/ColorCode_plugin/graphicsbtn.cpp create mode 100644 plugins/ColorCode_plugin/graphicsbtn.h create mode 100644 plugins/ColorCode_plugin/img/colorcode32.xpm create mode 100644 plugins/ColorCode_plugin/img/configure.png create mode 100644 plugins/ColorCode_plugin/img/icon_female16.png create mode 100644 plugins/ColorCode_plugin/prefdialog.cpp create mode 100644 plugins/ColorCode_plugin/prefdialog.h create mode 100644 plugins/ColorCode_plugin/prefdialog.ui create mode 100644 plugins/ColorCode_plugin/settings.cpp create mode 100644 plugins/ColorCode_plugin/settings.h create mode 100644 plugins/ColorCode_plugin/solutionrow.cpp create mode 100644 plugins/ColorCode_plugin/solutionrow.h create mode 100644 plugins/ColorCode_plugin/trans_en.qm create mode 100644 plugins/ColorCode_plugin/trans_fr.qm create mode 100644 plugins/ColorCode_plugin/trans_fr.ts create mode 100644 plugins/ColorCode_plugin/trans_hu.qm create mode 100644 plugins/ColorCode_plugin/trans_hu.ts diff --git a/plugins/ColorCode_plugin/ColorCode.pro b/plugins/ColorCode_plugin/ColorCode.pro index dc030f9e8..a1e7d3ef5 100644 --- a/plugins/ColorCode_plugin/ColorCode.pro +++ b/plugins/ColorCode_plugin/ColorCode.pro @@ -34,8 +34,12 @@ HEADERS += about.h \ rowhint.h \ ccsolver.h \ background.h \ - solrow.h -FORMS += about.ui + solutionrow.h \ + graphicsbtn.h \ + settings.h \ + prefdialog.h +FORMS += about.ui \ + prefdialog.ui SOURCES += about.cpp \ colorcode.cpp \ colorpeg.cpp \ @@ -45,14 +49,17 @@ SOURCES += about.cpp \ rowhint.cpp \ ccsolver.cpp \ background.cpp \ - solrow.cpp + solutionrow.cpp \ + graphicsbtn.cpp \ + settings.cpp \ + prefdialog.cpp RESOURCES += resource.qrc OTHER_FILES += docs/GPL.html -win32 { - RC_FILE = ColorCode.rc -} +win32:RC_FILE = ColorCode.rc TRANSLATIONS += trans_de.ts \ trans_en.ts \ - trans_cs.ts + trans_cs.ts \ + trans_fr.ts \ + trans_hu.ts CODECFORTR = UTF-8 CODECFORSRC = UTF-8 diff --git a/plugins/ColorCode_plugin/INSTALL b/plugins/ColorCode_plugin/INSTALL index d4a9d2d3b..6a0dbd832 100644 --- a/plugins/ColorCode_plugin/INSTALL +++ b/plugins/ColorCode_plugin/INSTALL @@ -4,8 +4,8 @@ qmake-qt4 make # to install: -cp ColorCode /usr/bin/ +cp colorcode /usr/bin/ # to uninstall: -rm /usr/bin/ColorCode +rm /usr/bin/colorcode diff --git a/plugins/ColorCode_plugin/about.cpp b/plugins/ColorCode_plugin/about.cpp index a85455568..bd50d2e6f 100644 --- a/plugins/ColorCode_plugin/about.cpp +++ b/plugins/ColorCode_plugin/about.cpp @@ -28,7 +28,7 @@ About::About(QWidget* parent, Qt::WindowFlags f) : QDialog(parent, f) mAuthorText->setText("" + tr("ColorCode") + "
" + tr("A needful game to train your brain ;-)") + tr("

Free MasterMind clone including a built in,
rather intelligent solver.") + - "

" + tr("Version") + ": 0.5.5
" + tr("Author") + ": Dirk Laebisch"); + "

" + tr("Version") + ": 0.6.1
" + tr("Author") + ": Dirk Laebisch"); QString license_file = ":/docs/GPL.html"; if (QFile::exists(license_file)) diff --git a/plugins/ColorCode_plugin/background.cpp b/plugins/ColorCode_plugin/background.cpp index 0139511a3..a9c7c8b11 100644 --- a/plugins/ColorCode_plugin/background.cpp +++ b/plugins/ColorCode_plugin/background.cpp @@ -24,6 +24,7 @@ using namespace std; BackGround::BackGround(QObject*) { setCacheMode(QGraphicsItem::DeviceCoordinateCache); + setAcceptedMouseButtons(0); QLinearGradient topgrad(0, 16, 0, 129); topgrad.setColorAt(0.0, QColor(0xf8, 0xf8, 0xf8)); diff --git a/plugins/ColorCode_plugin/ccsolver.cpp b/plugins/ColorCode_plugin/ccsolver.cpp index be5c2aa41..f310de133 100644 --- a/plugins/ColorCode_plugin/ccsolver.cpp +++ b/plugins/ColorCode_plugin/ccsolver.cpp @@ -17,9 +17,14 @@ */ #include "ccsolver.h" +#include using namespace std; +const int CCSolver::STRENGTH_LOW = 0; +const int CCSolver::STRENGTH_MEDIUM = 1; +const int CCSolver::STRENGTH_HIGH = 2; + const int CCSolver::mFGCnts[4][9][4] = { { {2, 0, 0, 0}, @@ -440,7 +445,7 @@ string CCSolver::FirstGuess() if (pegcnt != mPegCnt) { - ; + // } if (mPegCnt > 2 && diffcnt > 1) @@ -479,7 +484,7 @@ int CCSolver::Guess() clock_t start, finish; start = clock(); - if (mGuessCnt == 0 && mRestartCnt == 0) + if (mLevel > STRENGTH_LOW && mGuessCnt == 0 && mRestartCnt == 0) { return Row2Ix(FirstGuess()); } @@ -487,14 +492,14 @@ int CCSolver::Guess() mBusy = true; int level = mLevel; - if (level == 2 && mPosCnt > 10000) + if (level == STRENGTH_HIGH && mPosCnt > 10000) { - level = 1; + level = STRENGTH_MEDIUM; } int i, j; - if (level == 0) + if (level == STRENGTH_LOW) { for (i = 0; i < mAllCnt; ++i) { @@ -504,7 +509,7 @@ int CCSolver::Guess() } } } - else if (level == 1) + else if (level == STRENGTH_MEDIUM) { int m = mPosCnt >> 1; for (i = 0; i < mAllCnt; ++i) @@ -616,7 +621,6 @@ int CCSolver::Row2Ix(const vector* v) { return ix; } - return -1; } @@ -647,7 +651,6 @@ int CCSolver::Row2Ix(const string str) { return ix; } - return -1; } diff --git a/plugins/ColorCode_plugin/ccsolver.h b/plugins/ColorCode_plugin/ccsolver.h index 662aa2d65..116bb0ce3 100644 --- a/plugins/ColorCode_plugin/ccsolver.h +++ b/plugins/ColorCode_plugin/ccsolver.h @@ -27,6 +27,10 @@ using namespace std; class CCSolver { public: + static const int STRENGTH_LOW; + static const int STRENGTH_MEDIUM; + static const int STRENGTH_HIGH; + CCSolver(ColorCode* cc); ~CCSolver(); diff --git a/plugins/ColorCode_plugin/changelog b/plugins/ColorCode_plugin/changelog index cd09a90d5..9906216c4 100644 --- a/plugins/ColorCode_plugin/changelog +++ b/plugins/ColorCode_plugin/changelog @@ -1,3 +1,32 @@ +* 0.6.1 released, February 16, 2010 + * Translation + - Added french translation - thanks to Filippo Rusconi. + +* 0.6.0 released, February 14, 2010 + * Summary + - Second game mode (Computer vs. Human) + - Preferences dialog for persistent settings + - Additional settings options + * Preferences dialog + - To examine all available settings options, a preferences dialog has been introduced. + - The chosen preferences/settings are now persistent, so when starting the application, + the last used settings are applied. + * Settings options + - Game modes (Human vs Computer or Computer versus Human) + - To get a fair chance you may select a weaker solver strength level for your computer + opponent ;-) + - Let an impartial part :-) of your computer determine the corresponding hints for the + computer's guess. This option affects only Computer vs. Human games. If checked, you + only have to place your secret combination. Then the rest of the game runs automatically + until the end. + - To better watch your computer trying hard to break your code, you may + define a timeout between the guesses + - Select letters or numbers as text indicators and - if convenient - do + not use colors as indicators at all - but it's still ColorCode ;-) + * Layout/Design + - Some minor changes and new buttons for the second game mode. + + * 0.5.5 released, October 31, 2009 * Summary - Accessibility and usability improvements diff --git a/plugins/ColorCode_plugin/colorcode.cpp b/plugins/ColorCode_plugin/colorcode.cpp index 695127e97..e1dbd9bce 100644 --- a/plugins/ColorCode_plugin/colorcode.cpp +++ b/plugins/ColorCode_plugin/colorcode.cpp @@ -16,9 +16,9 @@ * along with ColorCode. If not, see . */ - #include +#include "settings.h" #include "ccsolver.h" #include "colorcode.h" #include "colorpeg.h" @@ -27,29 +27,37 @@ #include "msg.h" #include "background.h" #include "about.h" -#include "solrow.h" +#include "prefdialog.h" +#include "solutionrow.h" +#include "graphicsbtn.h" using namespace std; const int IdRole = Qt::UserRole; -int ColorCode::mColorCnt = 0; -int ColorCode::mPegCnt = 0; -int ColorCode::mDoubles = 1; -int ColorCode::mXOffs = 0; -int ColorCode::mMaxZ = 0; -int ColorCode::mLevel = -1; - volatile bool ColorCode::mNoAct = false; const int ColorCode::STATE_RUNNING = 0; const int ColorCode::STATE_WON = 1; const int ColorCode::STATE_LOST = 2; const int ColorCode::STATE_GAVE_UP = 3; +const int ColorCode::STATE_ERROR = 4; + +const int ColorCode::MODE_HVM = 0; +const int ColorCode::MODE_MVH = 1; const int ColorCode::MAX_COLOR_CNT = 10; -const int ColorCode::mLevelSettings[5][3] = { +const int ColorCode::LAYER_BG = 1; +const int ColorCode::LAYER_ROWS = 2; +const int ColorCode::LAYER_HINTS = 3; +const int ColorCode::LAYER_SOL = 4; +const int ColorCode::LAYER_MSG = 5; +const int ColorCode::LAYER_PEGS = 6; +const int ColorCode::LAYER_BTNS = 7; +const int ColorCode::LAYER_DRAG = 8; + +const int ColorCode::LEVEL_SETTINGS[5][3] = { { 2, 2, 1}, { 4, 3, 0}, { 6, 4, 1}, @@ -57,11 +65,26 @@ const int ColorCode::mLevelSettings[5][3] = { {10, 5, 1} }; +int ColorCode::mColorCnt = 0; +int ColorCode::mPegCnt = 0; +int ColorCode::mDoubles = 1; +int ColorCode::mXOffs = 0; +int ColorCode::mMaxZ = 0; +int ColorCode::mLevel = -1; +int ColorCode::mGameMode = ColorCode::MODE_HVM; + ColorCode::ColorCode() { QTime midnight(0, 0, 0); qsrand(midnight.secsTo(QTime::currentTime())); + QCoreApplication::setOrganizationName("dirks"); + QCoreApplication::setOrganizationDomain("laebisch.com"); + QCoreApplication::setApplicationName("colorcode"); + + mPrefDialog = NULL; + mSettings = new Settings(); + ROW_CNT = 10; ROW_Y0 = 130; @@ -72,10 +95,8 @@ ColorCode::ColorCode() setIconSize(QSize(16, 16)); mMenuBar = menuBar(); - mBg = new BackGround(); - mMsg = new Msg; - // as long as menuBar's size is invalid populated initially ... + // as long as menuBar's size isn invalid populated initially ... #ifdef Q_WS_X11 scene = new QGraphicsScene(0, 0, 320, 580); #else @@ -83,6 +104,7 @@ ColorCode::ColorCode() #endif scene->setBackgroundBrush(QBrush(QColor("#b0b1b3"))); + view = new QGraphicsView; view->setScene(scene); view->setGeometry(0, 0, 320, 560); @@ -93,17 +115,47 @@ ColorCode::ColorCode() view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setCentralWidget(view); + + mBg = new BackGround(); scene->addItem(mBg); mBg->setPos(0, 0); + mBg->setZValue(LAYER_BG); + + mMsg = new Msg; scene->addItem(mMsg); - mMsg->setPos(20, 10); + mMsg->setPos(20, 0); + mMsg->setZValue(LAYER_MSG); + + mDoneBtn = new GraphicsBtn; + mDoneBtn->SetLabel(tr("Done")); + scene->addItem(mDoneBtn); + mDoneBtn->setPos(84, 118); + mDoneBtn->setZValue(LAYER_BTNS); + mDoneBtn->ShowBtn(false); + connect(mDoneBtn, SIGNAL(BtnPressSignal(GraphicsBtn *)), this, SLOT(DoneBtnPressSlot(GraphicsBtn *))); + + mOkBtn = new GraphicsBtn; + mOkBtn->SetWidth(38); + mOkBtn->SetLabel("ok"); + scene->addItem(mOkBtn); + mOkBtn->setPos(5, 329); + mOkBtn->setZValue(LAYER_BTNS); + mOkBtn->ShowBtn(false); + connect(mOkBtn, SIGNAL(BtnPressSignal(GraphicsBtn *)), this, SLOT(DoneBtnPressSlot(GraphicsBtn *))); mSolver = new CCSolver(this); + mHintsDelayTimer = new QTimer(); + mHintsDelayTimer->setSingleShot(true); + mHintsDelayTimer->setInterval(500); + connect(mHintsDelayTimer, SIGNAL(timeout()), this, SLOT(SetAutoHintsSlot())); - mCurRow = NULL; - mColorCnt = MAX_COLOR_CNT; - mGameId = 0; - mGuessCnt = 0; + mCurRow = NULL; + mColorCnt = 0; + mGameCnt = 0; + mGameId = 0; + mGuessCnt = 0; + mHideColors = false; + mSolverStrength = CCSolver::STRENGTH_HIGH; InitTypesMap(); InitActions(); @@ -118,35 +170,24 @@ ColorCode::ColorCode() InitRows(); InitPegBtns(); - NewGame(); + ApplySettings(); - mMsg->setZValue(++ColorCode::mMaxZ); + NewGame(); } ColorCode::~ColorCode() { - int i; - if (mPegCnt > 0) - { - for (i = 0; i < mPegCnt; ++i) - { - if (mSolPegs[i] != NULL) - { - RemovePeg(mSolPegs[i]); - mSolPegs[i] = NULL; - } - } - - delete [] mSolPegs; - mSolPegs = NULL; - } + mSettings->WriteSettings(); } void ColorCode::InitSolution() { - mSolRow = new SolRow(); - mSolRow->setPos(50, 70); - scene->addItem(mSolRow); + mSolutionRow = new SolutionRow(); + mSolutionRow->setPos(50, 70); + mSolutionRow->setZValue(LAYER_SOL); + scene->addItem(mSolutionRow); + connect(mSolutionRow, SIGNAL(RemovePegSignal(ColorPeg*)), this, SLOT(RemovePegSlot(ColorPeg*))); + connect(mSolutionRow, SIGNAL(RowSolutionSignal(int)), this, SLOT(RowSolutionSlot(int))); } void ColorCode::InitRows() @@ -163,7 +204,7 @@ void ColorCode::InitRows() row = new PegRow(); row->SetIx(i); row->setPos(QPoint(xpos, ypos + (ROW_CNT - (i + 1)) * 40)); - row->setZValue(++ColorCode::mMaxZ); + row->setZValue(LAYER_ROWS); row->SetActive(false); scene->addItem(row); mPegRows[i] = row; @@ -173,7 +214,7 @@ void ColorCode::InitRows() hint = new RowHint; hint->SetIx(i); hint->setPos(QPoint(4, ypos + (ROW_CNT - (i + 1)) * 40)); - hint->setZValue(++ColorCode::mMaxZ); + hint->setZValue(LAYER_HINTS); hint->SetActive(false); scene->addItem(hint); mHintBtns[i] = hint; @@ -297,59 +338,59 @@ void ColorCode::InitTypesMap() void ColorCode::InitActions() { - NewGameAction = new QAction(tr("&New Game"), this); - NewGameAction->setIcon(QIcon(":/img/document-new.png")); - NewGameAction->setShortcut(tr("Ctrl+N")); - connect(NewGameAction, SIGNAL(triggered()), this, SLOT(NewGameSlot())); + mActNewGame = new QAction(tr("&New Game"), this); + mActNewGame->setIcon(QIcon(":/img/document-new.png")); + mActNewGame->setShortcut(tr("Ctrl+N")); + connect(mActNewGame, SIGNAL(triggered()), this, SLOT(NewGameSlot())); - RestartGameAction = new QAction(tr("&Restart Game"), this); - RestartGameAction->setIcon(QIcon(":/img/view-refresh.png")); - RestartGameAction->setShortcut(tr("Ctrl+Shift+R")); - connect(RestartGameAction, SIGNAL(triggered()), this, SLOT(RestartGameSlot())); + mActRestartGame = new QAction(tr("&Restart Game"), this); + mActRestartGame->setIcon(QIcon(":/img/view-refresh.png")); + mActRestartGame->setShortcut(tr("Ctrl+Shift+N")); + connect(mActRestartGame, SIGNAL(triggered()), this, SLOT(RestartGameSlot())); - GiveInAction = new QAction(tr("&Throw In The Towel"), this); - GiveInAction->setIcon(QIcon(":/img/face-sad.png")); - GiveInAction->setShortcut(tr("Ctrl+G")); - connect(GiveInAction, SIGNAL(triggered()), this, SLOT(GiveInSlot())); + mActGiveIn = new QAction(tr("&Throw In The Towel"), this); + mActGiveIn->setIcon(QIcon(":/img/face-sad.png")); + mActGiveIn->setShortcut(tr("Ctrl+G")); + connect(mActGiveIn, SIGNAL(triggered()), this, SLOT(GiveInSlot())); - ExitAction = new QAction(tr("E&xit"), this); - ExitAction->setIcon(QIcon(":/img/application-exit.png")); - ExitAction->setShortcut(tr("Ctrl+Q")); - connect(ExitAction, SIGNAL(triggered()), this, SLOT(close())); + mActExit = new QAction(tr("E&xit"), this); + mActExit->setIcon(QIcon(":/img/application-exit.png")); + mActExit->setShortcut(tr("Ctrl+Q")); + connect(mActExit, SIGNAL(triggered()), this, SLOT(close())); - ShowToolbarAction = new QAction(tr("Show Toolbar"), this); - ShowToolbarAction->setCheckable(true); - ShowToolbarAction->setChecked(true); - ShowToolbarAction->setShortcut(tr("Ctrl+T")); - connect(ShowToolbarAction, SIGNAL(triggered()), this, SLOT(ShowToolbarSlot())); + mActShowToolbar = new QAction(tr("Show Toolbar"), this); + mActShowToolbar->setCheckable(true); + mActShowToolbar->setChecked(true); + mActShowToolbar->setShortcut(tr("Ctrl+T")); + connect(mActShowToolbar, SIGNAL(triggered()), this, SLOT(ShowToolbarSlot())); - ShowMenubarAction = new QAction(tr("Show Menubar"), this); - ShowMenubarAction->setCheckable(true); - ShowMenubarAction->setChecked(true); - ShowMenubarAction->setShortcut(tr("Ctrl+M")); - connect(ShowMenubarAction, SIGNAL(triggered()), this, SLOT(ShowMenubarSlot())); + mActShowMenubar = new QAction(tr("Show Menubar"), this); + mActShowMenubar->setCheckable(true); + mActShowMenubar->setChecked(true); + mActShowMenubar->setShortcut(tr("Ctrl+M")); + connect(mActShowMenubar, SIGNAL(triggered()), this, SLOT(ShowMenubarSlot())); - ShowStatusbarAction = new QAction(tr("Show Statusbar"), this); - ShowStatusbarAction->setCheckable(true); - ShowStatusbarAction->setChecked(true); - ShowStatusbarAction->setShortcut(tr("Ctrl+S")); - connect(ShowStatusbarAction, SIGNAL(triggered()), this, SLOT(ShowStatusbarSlot())); + mActShowStatusbar = new QAction(tr("Show Statusbar"), this); + mActShowStatusbar->setCheckable(true); + mActShowStatusbar->setChecked(true); + mActShowStatusbar->setShortcut(tr("Ctrl+S")); + connect(mActShowStatusbar, SIGNAL(triggered()), this, SLOT(ShowStatusbarSlot())); mActResetColorsOrder = new QAction(tr("Reset Color Order"), this); mActResetColorsOrder->setShortcut(tr("Ctrl+Shift+R")); connect(mActResetColorsOrder, SIGNAL(triggered()), this, SLOT(ResetColorsOrderSlot())); - mActShowLetter = new QAction(tr("Show Letter Indicators"), this); + mActShowLetter = new QAction(tr("Show Indicators"), this); mActShowLetter->setCheckable(true); mActShowLetter->setChecked(false); mActShowLetter->setShortcut(tr("Ctrl+Shift+L")); - connect(mActShowLetter, SIGNAL(triggered()), this, SLOT(ShowLetterSlot())); + connect(mActShowLetter, SIGNAL(triggered()), this, SLOT(SetIndicators())); - SameColorAction = new QAction(tr("Allow Pegs of the Same Color"), this); - SameColorAction->setCheckable(true); - SameColorAction->setChecked(true); - SameColorAction->setShortcut(tr("Ctrl+Shift+C")); - connect(SameColorAction, SIGNAL(triggered(bool)), this, SLOT(SameColorSlot(bool))); + mActSameColor = new QAction(tr("Allow Pegs of the Same Color"), this); + mActSameColor->setCheckable(true); + mActSameColor->setChecked(true); + mActSameColor->setShortcut(tr("Ctrl+Shift+C")); + connect(mActSameColor, SIGNAL(triggered(bool)), this, SLOT(SameColorSlot(bool))); mActSameColorIcon = new QAction(tr("Allow Pegs of the Same Color"), this); mActSameColorIcon->setCheckable(true); @@ -358,137 +399,181 @@ void ColorCode::InitActions() mActSameColorIcon->setIcon(QIcon(":/img/same_color_1.png")); connect(mActSameColorIcon, SIGNAL(triggered(bool)), this, SLOT(SameColorSlot(bool))); - AutoCloseAction = new QAction(tr("Close Rows when the last Peg is placed"), this); - AutoCloseAction->setCheckable(true); - AutoCloseAction->setChecked(false); - AutoCloseAction->setShortcut(tr("Ctrl+L")); - connect(AutoCloseAction, SIGNAL(triggered()), this, SLOT(AutoCloseSlot())); + mActAutoClose = new QAction(tr("Close Rows when the last Peg is placed"), this); + mActAutoClose->setCheckable(true); + mActAutoClose->setChecked(false); + mActAutoClose->setShortcut(tr("Ctrl+L")); + connect(mActAutoClose, SIGNAL(triggered()), this, SLOT(AutoCloseSlot())); + + mActAutoHints = new QAction(tr("Set Hints automatically"), this); + mActAutoHints->setCheckable(true); + mActAutoHints->setChecked(false); + mActAutoHints->setShortcut(tr("Ctrl+Shift+H")); + connect(mActAutoHints, SIGNAL(triggered()), this, SLOT(AutoHintsSlot())); mLaunchHelpAction = new QAction(tr("Online &Help"), this); mLaunchHelpAction->setIcon(QIcon(":/img/help.png")); mLaunchHelpAction->setShortcut(tr("F1")); connect(mLaunchHelpAction, SIGNAL(triggered()), this, SLOT(OnlineHelpSlot())); - AboutAction = new QAction(tr("About &ColorCode"), this); - AboutAction->setIcon(QIcon(":/img/help-about.png")); - AboutAction->setShortcut(tr("Ctrl+A")); - connect(AboutAction, SIGNAL(triggered()), this, SLOT(AboutSlot())); + mActAbout = new QAction(tr("About &ColorCode"), this); + mActAbout->setIcon(QIcon(":/img/help-about.png")); + mActAbout->setShortcut(tr("Ctrl+A")); + connect(mActAbout, SIGNAL(triggered()), this, SLOT(AboutSlot())); - AboutQtAction = new QAction(tr("About &Qt"), this); - AboutQtAction->setIcon(QIcon(":/img/qt.png")); - AboutQtAction->setShortcut(tr("Ctrl+I")); - connect(AboutQtAction, SIGNAL(triggered()), this, SLOT(AboutQtSlot())); + mActAboutQt = new QAction(tr("About &Qt"), this); + mActAboutQt->setIcon(QIcon(":/img/qt.png")); + mActAboutQt->setShortcut(tr("Ctrl+I")); + connect(mActAboutQt, SIGNAL(triggered()), this, SLOT(AboutQtSlot())); - RandRowAction = new QAction(tr("Fill Row by Random"), this); - RandRowAction->setIcon(QIcon(":/img/system-switch-user.png")); - RandRowAction->setShortcut(tr("Ctrl+R")); - connect(RandRowAction, SIGNAL(triggered()), this, SLOT(RandRowSlot())); + mActRandRow = new QAction(tr("Fill Row by Random"), this); + mActRandRow->setIcon(QIcon(":/img/system-switch-user.png")); + mActRandRow->setShortcut(tr("Ctrl+R")); + connect(mActRandRow, SIGNAL(triggered()), this, SLOT(RandRowSlot())); - PrevRowAction = new QAction(tr("Duplicate Previous Row"), this); - PrevRowAction->setIcon(QIcon(":/img/edit-copy.png")); - PrevRowAction->setShortcut(tr("Ctrl+D")); - connect(PrevRowAction, SIGNAL(triggered()), this, SLOT(PrevRowSlot())); + mActPrevRow = new QAction(tr("Duplicate Previous Row"), this); + mActPrevRow->setIcon(QIcon(":/img/edit-copy.png")); + mActPrevRow->setShortcut(tr("Ctrl+D")); + connect(mActPrevRow, SIGNAL(triggered()), this, SLOT(PrevRowSlot())); - ClearRowAction = new QAction(tr("Clear Row"), this); - ClearRowAction->setIcon(QIcon(":/img/edit-clear.png")); - ClearRowAction->setShortcut(tr("Ctrl+C")); - connect(ClearRowAction, SIGNAL(triggered()), this, SLOT(ClearRowSlot())); + mActClearRow = new QAction(tr("Clear Row"), this); + mActClearRow->setIcon(QIcon(":/img/edit-clear.png")); + mActClearRow->setShortcut(tr("Ctrl+C")); + connect(mActClearRow, SIGNAL(triggered()), this, SLOT(ClearRowSlot())); mActLevelEasy = new QAction(tr("Beginner (2 Colors, 2 Slots, Doubles)"), this); mActLevelEasy->setData(0); mActLevelEasy->setCheckable(true); mActLevelEasy->setChecked(false); - connect(mActLevelEasy, SIGNAL(triggered()), this, SLOT(ForceLevelSlot())); + connect(mActLevelEasy, SIGNAL(triggered()), this, SLOT(SetLevelSlot())); mActLevelClassic = new QAction(tr("Easy (4 Colors, 3 Slots, No Doubles)"), this); mActLevelClassic->setData(1); mActLevelClassic->setCheckable(true); mActLevelClassic->setChecked(false); - connect(mActLevelClassic, SIGNAL(triggered()), this, SLOT(ForceLevelSlot())); + connect(mActLevelClassic, SIGNAL(triggered()), this, SLOT(SetLevelSlot())); mActLevelMedium = new QAction(tr("Classic (6 Colors, 4 Slots, Doubles)"), this); mActLevelMedium->setData(2); mActLevelMedium->setCheckable(true); mActLevelMedium->setChecked(true); - connect(mActLevelMedium, SIGNAL(triggered()), this, SLOT(ForceLevelSlot())); + connect(mActLevelMedium, SIGNAL(triggered()), this, SLOT(SetLevelSlot())); mActLevelChallenging = new QAction(tr("Challenging (8 Colors, 4 Slots, Doubles)"), this); mActLevelChallenging->setData(3); mActLevelChallenging->setCheckable(true); mActLevelChallenging->setChecked(false); - connect(mActLevelChallenging, SIGNAL(triggered()), this, SLOT(ForceLevelSlot())); + connect(mActLevelChallenging, SIGNAL(triggered()), this, SLOT(SetLevelSlot())); mActLevelHard = new QAction(tr("Hard (10 Colors, 5 Slots, Doubles)"), this); mActLevelHard->setData(4); mActLevelHard->setCheckable(true); mActLevelHard->setChecked(false); - connect(mActLevelHard, SIGNAL(triggered()), this, SLOT(ForceLevelSlot())); + connect(mActLevelHard, SIGNAL(triggered()), this, SLOT(SetLevelSlot())); + mActSetGuess = new QAction(tr("Computer's Guess"), this); + mActSetGuess->setIcon(QIcon(":/img/business_user.png")); + mActSetGuess->setShortcut(tr("Ctrl+H")); + connect(mActSetGuess, SIGNAL(triggered()), this, SLOT(SetGuessSlot())); - mActGetGuess = new QAction(tr("Computer's Guess"), this); - mActGetGuess->setIcon(QIcon(":/img/business_user.png")); - mActGetGuess->setShortcut(tr("Ctrl+H")); - connect(mActGetGuess, SIGNAL(triggered()), this, SLOT(GetGuessSlot())); + mActSetHints = new QAction(tr("Rate it for me"), this); + mActSetHints->setIcon(QIcon(":/img/icon_female16.png")); + mActSetHints->setShortcut(tr("Ctrl+H")); + connect(mActSetHints, SIGNAL(triggered()), this, SLOT(SetHintsSlot())); + + mActModeHvM = new QAction(tr("Human vs Computer"), this); + mActModeHvM->setData(MODE_HVM); + mActModeHvM->setCheckable(true); + mActModeHvM->setChecked(true); + connect(mActModeHvM, SIGNAL(triggered()), this, SLOT(SetGameModeSlot())); + + mActModeMvH = new QAction(tr("Computer vs Human"), this); + mActModeMvH->setData(MODE_MVH); + mActModeMvH->setCheckable(true); + mActModeMvH->setChecked(false); + connect(mActModeMvH, SIGNAL(triggered()), this, SLOT(SetGameModeSlot())); + + mActPreferences = new QAction(tr("Preferences"), this); + mActPreferences->setIcon(QIcon(":/img/configure.png")); + mActPreferences->setShortcut(tr("Ctrl+P")); + connect(mActPreferences, SIGNAL(triggered()), this, SLOT(OpenPreferencesSlot())); } void ColorCode::InitMenus() { - GameMenu = mMenuBar->addMenu(tr("&Game")); - GameMenu->addAction(NewGameAction); - GameMenu->addAction(RestartGameAction); - GameMenu->addAction(GiveInAction); - GameMenu->addSeparator(); - GameMenu->addAction(ExitAction); + mMenuGame = mMenuBar->addMenu(tr("&Game")); + mMenuGame->addAction(mActNewGame); + mMenuGame->addAction(mActRestartGame); + mMenuGame->addAction(mActGiveIn); + mMenuGame->addSeparator(); + mMenuGame->addAction(mActExit); - RowMenu = mMenuBar->addMenu(tr("&Row")); - RowMenu->addAction(RandRowAction); - RowMenu->addAction(PrevRowAction); - RowMenu->addAction(ClearRowAction); - RowMenu->addSeparator(); - RowMenu->addAction(mActGetGuess); - connect(RowMenu, SIGNAL(aboutToShow()), this, SLOT(UpdateRowMenuSlot())); + mMenuRow = mMenuBar->addMenu(tr("&Row")); + mMenuRow->addAction(mActRandRow); + mMenuRow->addAction(mActPrevRow); + mMenuRow->addAction(mActClearRow); + mMenuRow->addSeparator(); + mMenuRow->addAction(mActSetGuess); + mMenuRow->addAction(mActSetHints); + connect(mMenuRow, SIGNAL(aboutToShow()), this, SLOT(UpdateRowMenuSlot())); - SettingsMenu = mMenuBar->addMenu(tr("&Settings")); - SettingsMenu->addAction(ShowMenubarAction); - SettingsMenu->addAction(ShowToolbarAction); - SettingsMenu->addAction(ShowStatusbarAction); - SettingsMenu->addSeparator(); - SettingsMenu->addAction(mActResetColorsOrder); - SettingsMenu->addAction(mActShowLetter); - SettingsMenu->addSeparator(); + mMenuSettings = mMenuBar->addMenu(tr("&Settings")); - LevelMenu = SettingsMenu->addMenu(tr("Level Presets")); - mLevelActions = new QActionGroup(LevelMenu); - mLevelActions->addAction(mActLevelEasy); - mLevelActions->addAction(mActLevelClassic); - mLevelActions->addAction(mActLevelMedium); - mLevelActions->addAction(mActLevelChallenging); - mLevelActions->addAction(mActLevelHard); - QList levelacts = mLevelActions->actions(); - LevelMenu->addActions(levelacts); - SettingsMenu->addSeparator(); + mMenuModes = mMenuSettings->addMenu(tr("Game Mode")); + mActGroupModes = new QActionGroup(mMenuModes); + mActGroupModes->setExclusive(true); + mActGroupModes->addAction(mActModeHvM); + mActGroupModes->addAction(mActModeMvH); + QList modeacts = mActGroupModes->actions(); + mMenuModes->addActions(modeacts); + mMenuSettings->addSeparator(); - SettingsMenu->addAction(SameColorAction); - SettingsMenu->addAction(AutoCloseAction); + mMenuSettings->addAction(mActShowMenubar); + mMenuSettings->addAction(mActShowToolbar); + mMenuSettings->addAction(mActShowStatusbar); + mMenuSettings->addSeparator(); + mMenuSettings->addAction(mActResetColorsOrder); + mMenuSettings->addAction(mActShowLetter); + mMenuSettings->addSeparator(); - HelpMenu = mMenuBar->addMenu(tr("&Help")); - HelpMenu->addAction(mLaunchHelpAction); - HelpMenu->addSeparator(); - HelpMenu->addAction(AboutAction); - HelpMenu->addAction(AboutQtAction); + mMenuLevels = mMenuSettings->addMenu(tr("Level Presets")); + mActGroupLevels = new QActionGroup(mMenuLevels); + mActGroupLevels->addAction(mActLevelEasy); + mActGroupLevels->addAction(mActLevelClassic); + mActGroupLevels->addAction(mActLevelMedium); + mActGroupLevels->addAction(mActLevelChallenging); + mActGroupLevels->addAction(mActLevelHard); + QList levelacts = mActGroupLevels->actions(); + mMenuLevels->addActions(levelacts); + mMenuSettings->addSeparator(); - RowContextMenu = new QMenu(); - RowContextMenu->addAction(RandRowAction); - RowContextMenu->addAction(PrevRowAction); - RowContextMenu->addAction(ClearRowAction); - RowContextMenu->addSeparator(); - RowContextMenu->addAction(mActGetGuess); - RowContextMenu->addSeparator(); - RowContextMenu->addAction(NewGameAction); - RowContextMenu->addAction(RestartGameAction); - RowContextMenu->addAction(GiveInAction); - RowContextMenu->addSeparator(); - RowContextMenu->addAction(ExitAction); + mMenuSettings->addAction(mActSameColor); + mMenuSettings->addSeparator(); + + mMenuSettings->addAction(mActAutoClose); + mMenuSettings->addAction(mActAutoHints); + + mMenuSettings->addSeparator(); + mMenuSettings->addAction(mActPreferences); + + mMenuHelp = mMenuBar->addMenu(tr("&Help")); + mMenuHelp->addAction(mLaunchHelpAction); + mMenuHelp->addSeparator(); + mMenuHelp->addAction(mActAbout); + mMenuHelp->addAction(mActAboutQt); + + mMenuRowContext = new QMenu(); + mMenuRowContext->addAction(mActRandRow); + mMenuRowContext->addAction(mActPrevRow); + mMenuRowContext->addAction(mActClearRow); + mMenuRowContext->addSeparator(); + mMenuRowContext->addAction(mActSetGuess); + mMenuRowContext->addSeparator(); + mMenuRowContext->addAction(mActNewGame); + mMenuRowContext->addAction(mActRestartGame); + mMenuRowContext->addAction(mActGiveIn); + mMenuRowContext->addSeparator(); + mMenuRowContext->addAction(mActExit); addActions(mMenuBar->actions()); } @@ -500,11 +585,12 @@ void ColorCode::InitToolBars() mGameToolbar->setFloatable(false); mGameToolbar->setIconSize(QSize(16, 16)); mGameToolbar->setMovable(false); - mGameToolbar->addAction(NewGameAction); - mGameToolbar->addAction(RestartGameAction); - mGameToolbar->addAction(GiveInAction); + mGameToolbar->addAction(mActNewGame); + mGameToolbar->addAction(mActRestartGame); + mGameToolbar->addAction(mActGiveIn); mGameToolbar->addSeparator(); - mGameToolbar->addAction(mActGetGuess); + mGameToolbar->addAction(mActSetGuess); + mGameToolbar->addAction(mActSetHints); mColorCntCmb = new QComboBox(); mColorCntCmb->setLayoutDirection(Qt::LeftToRight); @@ -519,7 +605,7 @@ void ColorCode::InitToolBars() mColorCntCmb->addItem("9 " + tr("Colors"), 9); mColorCntCmb->addItem("10 " + tr("Colors"), 10); mColorCntCmb->setCurrentIndex(6); - connect(mColorCntCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(mColorCntChangedSlot())); + connect(mColorCntCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(ColorCntChangedSlot())); mPegCntCmb = new QComboBox(); mPegCntCmb->setLayoutDirection(Qt::LeftToRight); @@ -548,6 +634,90 @@ void ColorCode::InitToolBars() mLevelToolbar->addAction(mActSameColorIcon); } +void ColorCode::ApplySettings() +{ + bool restart = NeedsRestart(); + mNoAct = true; + + mActShowToolbar->setChecked(mSettings->mShowToolBar); + ShowToolbarSlot(); + mActShowMenubar->setChecked(mSettings->mShowMenuBar); + ShowMenubarSlot(); + mActShowStatusbar->setChecked(mSettings->mShowStatusBar); + ShowStatusbarSlot(); + mActShowLetter->setChecked(mSettings->mShowIndicators); + SetIndicators(); + + mActAutoClose->setChecked(mSettings->mAutoClose); + mActAutoHints->setChecked(mSettings->mAutoHints); + + SetSameColor(mSettings->mSameColors); + int i; + i = mColorCntCmb->findData(mSettings->mColorCnt); + if (i != -1 && mColorCntCmb->currentIndex() != i) + { + mColorCntCmb->setCurrentIndex(i); + } + i = mPegCntCmb->findData(mSettings->mPegCnt); + if (i != -1 && mPegCntCmb->currentIndex() != i) + { + mPegCntCmb->setCurrentIndex(i); + } + CheckLevel(); + + if (mSettings->mGameMode == MODE_HVM) + { + mActModeHvM->setChecked(true); + } + else + { + mActModeMvH->setChecked(true); + } + + mHintsDelayTimer->setInterval(mSettings->mHintsDelay); + + mNoAct = false; + + if (restart) + { + TryNewGame(); + } +} + +void ColorCode::TryNewGame() +{ + int r = QMessageBox::Yes; + if (GamesRunning()) + { + r = QMessageBox::question( this, + tr("Message"), + tr("The changed settings will only apply to new games!\nDo you want to give in the current and start a new Game?"), + QMessageBox::Yes | QMessageBox::No, + QMessageBox::Yes); + } + + if (r == QMessageBox::Yes) + { + NewGame(); + } +} + +bool ColorCode::NeedsRestart() const +{ + bool need = false; + + if ( mSettings->mSameColors != mActSameColor->isChecked() + || mSettings->mColorCnt != mColorCnt + || mSettings->mPegCnt != mPegCnt + || mSettings->mGameMode != mGameMode + || (mGameMode == MODE_MVH && mSolverStrength != mSettings->mSolverStrength) ) + { + need = true; + } + + return need; +} + void ColorCode::contextMenuEvent(QContextMenuEvent* e) { @@ -569,11 +739,11 @@ void ColorCode::contextMenuEvent(QContextMenuEvent* e) if (isrow) { UpdateRowMenuSlot(); - RowContextMenu->exec(e->globalPos()); + mMenuRowContext->exec(e->globalPos()); } else { - GameMenu->exec(e->globalPos()); + mMenuGame->exec(e->globalPos()); } } @@ -585,11 +755,16 @@ void ColorCode::resizeEvent (QResizeEvent* e) void ColorCode::keyPressEvent(QKeyEvent *e) { + if (mCurRow == NULL || mGameState != STATE_RUNNING) + { + return; + } + switch (e->key()) { case Qt::Key_Return: case Qt::Key_Enter: - if (mCurRow != NULL && mGameState == STATE_RUNNING) + if (mGameMode == MODE_HVM) { int ix = mCurRow->GetIx(); if (mHintBtns[ix]->mActive) @@ -602,53 +777,91 @@ void ColorCode::keyPressEvent(QKeyEvent *e) } } } + else if (mGameMode == MODE_MVH) + { + if (mDoneBtn->isVisible() || mOkBtn->isVisible()) + { + DoneBtnPressSlot(); + } + } break; } } void ColorCode::UpdateRowMenuSlot() { - if (mGameState != STATE_RUNNING || mCurRow == NULL) + if (mGameMode == MODE_HVM) { - RandRowAction->setEnabled(false); - PrevRowAction->setEnabled(false); - ClearRowAction->setEnabled(false); - mActGetGuess->setEnabled(false); - return; - } - else - { - RandRowAction->setEnabled(true); - mActGetGuess->setEnabled(true); - } + if (mGameState != STATE_RUNNING || mCurRow == NULL) + { + mActRandRow->setEnabled(false); + mActPrevRow->setEnabled(false); + mActClearRow->setEnabled(false); + mActSetGuess->setEnabled(false); + return; + } + else + { + mActRandRow->setEnabled(true); + } - if (mCurRow->GetIx() < 1) - { - PrevRowAction->setEnabled(false); - } - else - { - PrevRowAction->setEnabled(true); - } + if (mCurRow->GetIx() < 1) + { + mActPrevRow->setEnabled(false); + } + else + { + mActPrevRow->setEnabled(true); + } - if (mCurRow->GetPegCnt() == 0) - { - ClearRowAction->setEnabled(false); + if (mCurRow->GetPegCnt() == 0) + { + mActClearRow->setEnabled(false); + } + else + { + mActClearRow->setEnabled(true); + } } - else + else if (mGameMode == MODE_MVH) { - ClearRowAction->setEnabled(true); + if (mGameState == STATE_RUNNING && mCurRow == mSolutionRow) + { + mActRandRow->setEnabled(true); + mActClearRow->setEnabled(true); + } + else + { + mActRandRow->setEnabled(false); + mActClearRow->setEnabled(false); + } } } void ColorCode::RestartGameSlot() { - ResetRows(); - SetState(STATE_RUNNING); + if (mGameMode == MODE_HVM) + { + ResetRows(); + SetState(STATE_RUNNING); - mCurRow = NULL; - mSolver->RestartGame(); - NextRow(); + mCurRow = NULL; + mSolver->RestartGame(); + NextRow(); + } + else if (mGameMode == MODE_MVH) + { + mHintsDelayTimer->stop(); + mOkBtn->ShowBtn(false); + ResetRows(); + SetState(STATE_RUNNING); + + mCurRow = NULL; + mSolver->NewGame(mColorCnt, mPegCnt, mDoubles, mSolverStrength, ROW_CNT); + mSolutionRow->OpenRow(); + GetSolution(); + RowSolutionSlot(mSolutionRow->GetIx()); + } } void ColorCode::NewGameSlot() @@ -695,6 +908,30 @@ void ColorCode::GiveInSlot() } } +void ColorCode::OpenPreferencesSlot() +{ + if (mPrefDialog == NULL) + { + CreatePrefDialog(); + } + if (mPrefDialog == NULL) + { + return; + } + + mSettings->SaveLastSettings(); + mPrefDialog->SetSettings(); + int r = mPrefDialog->exec(); + if (r == QDialog::Accepted) + { + ApplySettings(); + } + else + { + mSettings->RestoreLastSettings(); + } +} + void ColorCode::OnlineHelpSlot() { QDesktopServices::openUrl(QUrl("http://colorcode.laebisch.com/documentation", QUrl::TolerantMode)); @@ -714,7 +951,8 @@ void ColorCode::AboutQtSlot() void ColorCode::ShowToolbarSlot() { - if (!ShowToolbarAction->isChecked()) + mSettings->mShowToolBar = mActShowToolbar->isChecked(); + if (!mActShowToolbar->isChecked()) { mGameToolbar->hide(); mLevelToolbar->hide(); @@ -729,7 +967,8 @@ void ColorCode::ShowToolbarSlot() void ColorCode::ShowMenubarSlot() { - if (!ShowMenubarAction->isChecked()) + mSettings->mShowMenuBar = mActShowMenubar->isChecked(); + if (!mActShowMenubar->isChecked()) { mMenuBar->hide(); } @@ -742,7 +981,8 @@ void ColorCode::ShowMenubarSlot() void ColorCode::ShowStatusbarSlot() { - if (!ShowStatusbarAction->isChecked()) + mSettings->mShowStatusBar = mActShowStatusbar->isChecked(); + if (!mActShowStatusbar->isChecked()) { statusBar()->hide(); } @@ -763,13 +1003,22 @@ void ColorCode::ResetColorsOrderSlot() scene->update(scene->sceneRect()); } -void ColorCode::ShowLetterSlot() +void ColorCode::SetIndicators() { bool checked = mActShowLetter->isChecked(); + mSettings->mShowIndicators = checked; + if (!mSettings->mShowIndicators) + { + mHideColors = false; + } + else + { + mHideColors = mSettings->mHideColors; + } vector::iterator it; for (it = mAllPegs.begin(); it < mAllPegs.end(); it++) { - (*it)->ShowLetter(checked); + (*it)->SetIndicator(checked, mSettings->mIndicatorType, mHideColors); } } @@ -783,7 +1032,7 @@ void ColorCode::SameColorSlot(bool checked) SetSameColor(checked); int r = QMessageBox::Yes; - if (mGameState == STATE_RUNNING && mGuessCnt > 1) + if (GamesRunning()) { r = QMessageBox::question( this, tr("Message"), @@ -800,18 +1049,25 @@ void ColorCode::SameColorSlot(bool checked) void ColorCode::AutoCloseSlot() { - + mSettings->mAutoClose = mActAutoClose->isChecked(); } -void ColorCode::mColorCntChangedSlot() +void ColorCode::AutoHintsSlot() { + mSettings->mAutoHints = mActAutoHints->isChecked(); +} + +void ColorCode::ColorCntChangedSlot() +{ + SetColorCnt(); + if (mNoAct) { return; } int r = QMessageBox::Yes; - if (mGameState == STATE_RUNNING && mGuessCnt > 1) + if (GamesRunning()) { r = QMessageBox::question( this, tr("Message"), @@ -828,6 +1084,8 @@ void ColorCode::mColorCntChangedSlot() void ColorCode::PegCntChangedSlot() { + SetPegCnt(); + if (mNoAct) { return; @@ -840,7 +1098,7 @@ void ColorCode::PegCntChangedSlot() } int r = QMessageBox::Yes; - if (mGameState == STATE_RUNNING && mGuessCnt > 1) + if (GamesRunning()) { r = QMessageBox::question( this, tr("Message"), @@ -855,10 +1113,10 @@ void ColorCode::PegCntChangedSlot() } } -void ColorCode::ForceLevelSlot() +void ColorCode::SetLevelSlot() { mNoAct = true; - int ix = mLevelActions->checkedAction()->data().toInt(); + int ix = mActGroupLevels->checkedAction()->data().toInt(); if (ix < 0 || ix > 4) { @@ -866,21 +1124,23 @@ void ColorCode::ForceLevelSlot() } int i; - i = mColorCntCmb->findData(mLevelSettings[ix][0]); + i = mColorCntCmb->findData(LEVEL_SETTINGS[ix][0]); if (i != -1 && mColorCntCmb->currentIndex() != i) { mColorCntCmb->setCurrentIndex(i); + SetColorCnt(); } - i = mPegCntCmb->findData(mLevelSettings[ix][1]); + i = mPegCntCmb->findData(LEVEL_SETTINGS[ix][1]); if (i != -1 && mPegCntCmb->currentIndex() != i) { mPegCntCmb->setCurrentIndex(i); + SetPegCnt(); } - SetSameColor((mLevelSettings[ix][2] == 1)); + SetSameColor((LEVEL_SETTINGS[ix][2] == 1)); int r = QMessageBox::Yes; - if (mGameState == STATE_RUNNING && mGuessCnt > 1) + if (GamesRunning()) { r = QMessageBox::question( this, tr("Message"), @@ -897,6 +1157,48 @@ void ColorCode::ForceLevelSlot() } } +void ColorCode::SetGameModeSlot() +{ + SetGameMode(); + + int r = QMessageBox::Yes; + if (GamesRunning()) + { + r = QMessageBox::question( this, + tr("Message"), + tr("The changed settings will only apply to new games!\nDo you want to give in the current and start a new Game?"), + QMessageBox::Yes | QMessageBox::No, + QMessageBox::Yes); + } + + if (r == QMessageBox::Yes) + { + NewGame(); + } +} + + +void ColorCode::SetPegCnt() +{ + mSettings->mPegCnt = mPegCntCmb->itemData(mPegCntCmb->currentIndex(), IdRole).toInt(); +} + +void ColorCode::SetColorCnt() +{ + mSettings->mColorCnt = mColorCntCmb->itemData(mColorCntCmb->currentIndex(), IdRole).toInt(); +} + +void ColorCode::SetGameMode() +{ + int ix = mActGroupModes->checkedAction()->data().toInt(); + if (ix != MODE_HVM && ix != MODE_MVH) + { + return; + } + mSettings->mGameMode = ix; +} + + void ColorCode::RemovePegSlot(ColorPeg* cp) { RemovePeg(cp); @@ -910,7 +1212,8 @@ void ColorCode::ShowMsgSlot(QString msg) void ColorCode::PegPressSlot(ColorPeg* cp) { if (cp == NULL) { return; } - cp->setZValue(++ColorCode::mMaxZ); + + cp->setZValue(LAYER_DRAG); if (cp->IsBtn()) { @@ -923,7 +1226,8 @@ void ColorCode::PegPressSlot(ColorPeg* cp) void ColorCode::PegSortSlot(ColorPeg* cp) { if (cp == NULL) { return; } - cp->setZValue(++ColorCode::mMaxZ); + + cp->setZValue(LAYER_DRAG); if (cp->IsBtn()) { @@ -937,6 +1241,7 @@ void ColorCode::PegReleasedSlot(ColorPeg* cp) { if (cp == NULL || !cp) { return; } + cp->setZValue(LAYER_PEGS); scene->clearSelection(); scene->clearFocus(); @@ -944,16 +1249,24 @@ void ColorCode::PegReleasedSlot(ColorPeg* cp) if (cp->GetSort() == 0) { bool snapped = false; - QList list = scene->items(QPointF(cp->pos().x() + 18, cp->pos().y() + 18)); - for (i = 0; i < list.size(); ++i) + if (mGameMode == MODE_HVM) { - if (mCurRow != NULL && list.at(i) == mCurRow) + QList list = scene->items(QPointF(cp->pos().x() + 18, cp->pos().y() + 18)); + + for (i = 0; i < list.size(); ++i) { - snapped = mCurRow->SnapCP(cp); - break; + if (mCurRow != NULL && list.at(i) == mCurRow) + { + snapped = mCurRow->SnapCP(cp); + break; + } } } + else if (mGameMode == MODE_MVH) + { + snapped = mSolutionRow->SnapCP(cp); + } if (!snapped) { @@ -993,6 +1306,7 @@ void ColorCode::PegReleasedSlot(ColorPeg* cp) mGradMap[ix1] = tmp; } + RemovePeg(cp); } @@ -1004,25 +1318,81 @@ void ColorCode::PegReleasedSlot(ColorPeg* cp) void ColorCode::RowSolutionSlot(int ix) { - std::vector s = mPegRows[ix]->GetSolution(); - if (s.size() == (unsigned) mPegCnt) + if (mGameMode == MODE_HVM) { - if (AutoCloseAction->isChecked()) + if (ix == -1) { return; } + + std::vector s = mPegRows[ix]->GetSolution(); + if (s.size() == (unsigned) mPegCnt) { - HintPressedSlot(ix); + if (mActAutoClose->isChecked()) + { + HintPressedSlot(ix); + } + else + { + mHintBtns[ix]->SetActive(true); + ShowMsgSlot(tr("Press the Hint Field or Key Enter if You're done.")); + } } else { - mHintBtns[ix]->SetActive(true); - ShowMsgSlot(tr("Press the Hint Field or Key Enter if You're done.")); + mHintBtns[ix]->SetActive(false); + ShowMsgSlot(tr("Place Your pegs ...")); } } - else + else if (mGameMode == MODE_MVH) { - mHintBtns[ix]->SetActive(false); - ShowMsgSlot(tr("Place Your pegs ...")); - } + if (ix == -1) + { + std::vector s = mSolutionRow->GetSolution(); + if (s.size() == (unsigned) mPegCnt) + { + bool valid = true; + if (!mActSameColor->isChecked()) + { + int i; + int check[mColorCnt]; + for (i = 0; i < mColorCnt; ++i) + { + check[i] = 0; + } + for (i = 0; (unsigned)i < s.size(); ++i) + { + if (s[i] >= mColorCnt) + { + valid = false; + break; + } + + if (check[s[i]] != 0) + { + valid = false; + break; + } + + check[s[i]] = 1; + } + } + + if (valid) + { + mDoneBtn->ShowBtn(true); + ShowMsgSlot(tr("Press the button below or Key Enter if You're done.")); + } + else + { + ShowMsgSlot(tr("The chosen settings do not allow pegs of the same color!")); + } + } + else + { + mDoneBtn->ShowBtn(false); + ShowMsgSlot(tr("Place Your secret ColorCode ...")); + } + } + } } void ColorCode::HintPressedSlot(int) @@ -1035,66 +1405,85 @@ void ColorCode::HintPressedSlot(int) void ColorCode::RandRowSlot() { - if (mCurRow == NULL || mGameState != STATE_RUNNING) + if (mCurRow == NULL || !mCurRow->IsActive() || mGameState != STATE_RUNNING) { return; } - mCurRow->ClearRow(); - - int i, rndm; - int check[mColorCnt]; - ColorPeg* peg; - for (i = 0; i < mColorCnt; ++i) + if (mGameMode == MODE_HVM || (mGameMode == MODE_MVH && mCurRow == mSolutionRow)) { - check[i] = 0; - } + mCurRow->ClearRow(); - for (i = 0; i < mPegCnt; ++i) - { - rndm = qrand() % mColorCnt; - if (mDoubles == 0 && check[rndm] != 0) + int i, rndm; + int check[mColorCnt]; + ColorPeg* peg; + for (i = 0; i < mColorCnt; ++i) { - --i; - continue; + check[i] = 0; } - check[rndm] = 1; + for (i = 0; i < mPegCnt; ++i) + { + rndm = qrand() % mColorCnt; + if (mDoubles == 0 && check[rndm] != 0) + { + --i; + continue; + } - peg = CreatePeg(rndm); - mCurRow->ForceSnap(peg, i); + check[rndm] = 1; + + peg = CreatePeg(rndm); + mCurRow->ForceSnap(peg, i); + } } } -void ColorCode::GetGuessSlot() +void ColorCode::SetGuessSlot() { - if (mCurRow == NULL || mGameState != STATE_RUNNING || mSolver->mBusy) + if (mCurRow == NULL || mCurRow == mSolutionRow || mGameState != STATE_RUNNING || mSolver->mBusy) { return; } mCurRow->ClearRow(); - mActGetGuess->setEnabled(false); + mActSetGuess->setEnabled(false); int* row = mSolver->GuessOut(); - mActGetGuess->setEnabled(true); if (row == NULL) { + SetState(STATE_ERROR); return; } + mActSetGuess->setEnabled(true); ColorPeg* peg; int i; for (i = 0; i < mPegCnt; ++i) { - if (row[i] < 0 || row[i] >= MAX_COLOR_CNT) - { - ; - } peg = CreatePeg(row[i]); mCurRow->ForceSnap(peg, i); } } +void ColorCode::SetHintsSlot() +{ + if (mCurRow == NULL || mGameState != STATE_RUNNING) + { + return; + } + + if (mGameMode == MODE_MVH) + { + if (mCurRow == mSolutionRow || !mHintBtns[mCurRow->GetIx()]->IsActive()) + { + return; + } + + std::vector hints = RateSol2Guess(mSolution, mCurRow->GetSolution()); + mHintBtns[mCurRow->GetIx()]->DrawHints(hints); + } +} + void ColorCode::PrevRowSlot() { if (mCurRow == NULL || mGameState != STATE_RUNNING) @@ -1129,26 +1518,64 @@ void ColorCode::ClearRowSlot() mCurRow->ClearRow(); } +void ColorCode::DoneBtnPressSlot(GraphicsBtn*) +{ + mDoneBtn->ShowBtn(false); + mOkBtn->ShowBtn(false); + + if (mCurRow == mSolutionRow) + { + SetSolution(); + mActClearRow->setEnabled(false); + mActRandRow->setEnabled(false); + mActSetHints->setEnabled(true); + NextRow(); + } + else + { + ResolveHints(); + } +} + +void ColorCode::SetAutoHintsSlot() +{ + DoneBtnPressSlot(mOkBtn); +} + void ColorCode::TestSlot() { - ; + +} + +void ColorCode::ApplyPreferencesSlot() +{ + +} + +void ColorCode::CreatePrefDialog() +{ + mPrefDialog = new PrefDialog(this); + mPrefDialog->setModal(true); + mPrefDialog->InitSettings(mSettings); + connect(mPrefDialog, SIGNAL(accepted()), this, SLOT(ApplyPreferencesSlot())); + connect(mPrefDialog, SIGNAL(ResetColorOrderSignal()), this, SLOT(ResetColorsOrderSlot())); } void ColorCode::CheckSameColorsSetting() { if (mColorCnt < mPegCnt) { - if (SameColorAction->isEnabled()) + if (mActSameColor->isEnabled()) { - SameColorAction->setEnabled(false); + mActSameColor->setEnabled(false); } if (mActSameColorIcon->isEnabled()) { mActSameColorIcon->setEnabled(false); } - if (!SameColorAction->isChecked()) + if (!mActSameColor->isChecked()) { - SameColorAction->setChecked(true); + mActSameColor->setChecked(true); } if (!mActSameColorIcon->isChecked()) { @@ -1157,9 +1584,9 @@ void ColorCode::CheckSameColorsSetting() } else { - if (!SameColorAction->isEnabled()) + if (!mActSameColor->isEnabled()) { - SameColorAction->setEnabled(true); + mActSameColor->setEnabled(true); } if (!mActSameColorIcon->isEnabled()) { @@ -1181,7 +1608,9 @@ void ColorCode::CheckSameColorsSetting() void ColorCode::SetSameColor(bool checked) { - SameColorAction->setChecked(checked); + mSettings->mSameColors = checked; + + mActSameColor->setChecked(checked); mActSameColorIcon->setChecked(checked); if (checked) @@ -1201,9 +1630,9 @@ void ColorCode::CheckLevel() int ix = -1; for (int i = 0; i < 5; ++i) { - if ( mLevelSettings[i][0] == mColorCnt - && mLevelSettings[i][1] == mPegCnt - && mLevelSettings[i][2] == mDoubles ) + if ( LEVEL_SETTINGS[i][0] == mColorCnt + && LEVEL_SETTINGS[i][1] == mPegCnt + && LEVEL_SETTINGS[i][2] == mDoubles ) { ix = i; break; @@ -1212,12 +1641,12 @@ void ColorCode::CheckLevel() if (ix > -1) { - QList levelacts = mLevelActions->actions(); + QList levelacts = mActGroupLevels->actions(); levelacts.at(ix)->setChecked(true); } else { - QAction* act = mLevelActions->checkedAction(); + QAction* act = mActGroupLevels->checkedAction(); if (act != NULL) { act->setChecked(false); @@ -1227,57 +1656,41 @@ void ColorCode::CheckLevel() void ColorCode::ResetGame() { - int i; + mDoneBtn->ShowBtn(false); + mOkBtn->ShowBtn(false); - if (mPegCnt > 0) - { - for (i = 0; i < mPegCnt; ++i) - { - if (mSolPegs[i] != NULL) - { - RemovePeg(mSolPegs[i]); - mSolPegs[i] = NULL; - } - } - - delete [] mSolPegs; - mSolPegs = NULL; - } - - SetPegCnt(); - - mSolPegs = new ColorPeg* [mPegCnt]; - for (int i = 0; i < mPegCnt; ++i) - { - mSolPegs[i] = NULL; - } - - mSolRow->SetState(mPegCnt, false); + ApplyPegCnt(); + mSolutionRow->Reset(mPegCnt, mGameMode); ResetRows(); mGameId = qrand(); mGuessCnt = 0; + ++mGameCnt; - SetColorCnt(); + ApplyColorCnt(); CheckSameColorsSetting(); - mDoubles = (int) SameColorAction->isChecked(); + mDoubles = (int) mActSameColor->isChecked(); CheckLevel(); + + ApplySolverStrength(); } void ColorCode::ResetRows() { for (int i = 0; i < ROW_CNT; ++i) { - mPegRows[i]->Reset(mPegCnt); - mHintBtns[i]->Reset(mPegCnt); + mPegRows[i]->Reset(mPegCnt, mGameMode); + mHintBtns[i]->Reset(mPegCnt, mGameMode); } } void ColorCode::NewGame() { + mHintsDelayTimer->stop(); + ApplyGameMode(); ResetGame(); QString doubles = (mDoubles == 1) ? tr("Yes") : tr("No"); QString colors = QString::number(mColorCnt, 10); @@ -1286,9 +1699,18 @@ void ColorCode::NewGame() SetState(STATE_RUNNING); mCurRow = NULL; - SetSolution(); - mSolver->NewGame(mColorCnt, mPegCnt, mDoubles, 2, ROW_CNT); - NextRow(); + + if (mGameMode == MODE_HVM) + { + mSolver->NewGame(mColorCnt, mPegCnt, mDoubles, CCSolver::STRENGTH_HIGH, ROW_CNT); + SetSolution(); + NextRow(); + } + else if (mGameMode == MODE_MVH) + { + mSolver->NewGame(mColorCnt, mPegCnt, mDoubles, mSolverStrength, ROW_CNT); + GetSolution(); + } } void ColorCode::NextRow() @@ -1316,26 +1738,106 @@ void ColorCode::NextRow() { ++mGuessCnt; mCurRow->SetActive(true); - ShowMsgSlot(tr("Place Your pegs ...")); + if (mGameMode == MODE_HVM) + { + ShowMsgSlot(tr("Place Your pegs ...")); + } + else if (mGameMode == MODE_MVH) + { + SetGuessSlot(); + if (mGameState == STATE_RUNNING) + { + mCurRow->CloseRow(); + mHintBtns[mCurRow->GetIx()]->SetActive(true); + + if (mActAutoHints->isChecked()) + { + if (mOkBtn->isVisible()) + { + mOkBtn->ShowBtn(false); + } + ShowMsgSlot(tr("Please rate the guess. Press OK or Key Enter if You're done.")); + SetHintsSlot(); + mHintBtns[mCurRow->GetIx()]->SetActive(false); + + std::vector rowhints = mHintBtns[mCurRow->GetIx()]->GetHints(); + int b = 0; + for (unsigned i = 0; i < rowhints.size(); ++i) + { + if (rowhints.at(i) == 2) + { + ++b; + } + } + + if (b == mPegCnt) + { + SetState(STATE_WON); + ResolveGame(); + } + else + { + mHintsDelayTimer->start(); + } + } + else + { + ShowMsgSlot(tr("Please rate the guess. Press OK or Key Enter if You're done.")); + mOkBtn->setPos(5, mCurRow->pos().y() - 39); + mOkBtn->ShowBtn(true); + } + } + else + { + mCurRow->SetActive(false); + ResolveGame(); + } + } } } void ColorCode::ResolveRow() { - std::vector res; - std::vector left1; - std::vector left0; std::vector rowsol = mCurRow->GetSolution(); mSolver->GuessIn(&rowsol); + std::vector hints = RateSol2Guess(mSolution, rowsol); + + if (hints.size() == (unsigned) mPegCnt) + { + int bl = 0; + for (int i = 0; i < mPegCnt; ++i) + { + if (hints.at(i) == 2) + { + ++bl; + } + } + + if (bl == mPegCnt) + { + SetState(STATE_WON); + } + } + + mSolver->ResIn(&hints); + mHintBtns[mCurRow->GetIx()]->DrawHints(hints); +} + +std::vector ColorCode::RateSol2Guess(const std::vector sol, const std::vector guess) +{ + std::vector hints; + std::vector left1; + std::vector left0; + int i, p0, p1; for (i = 0; i < mPegCnt; ++i) { - p0 = rowsol.at(i); - p1 = mSolution.at(i); + p0 = guess.at(i); + p1 = sol.at(i); if (p0 == p1) { - res.push_back(2); + hints.push_back(2); } else { @@ -1344,11 +1846,7 @@ void ColorCode::ResolveRow() } } - if (res.size() == (unsigned) mPegCnt) - { - SetState(STATE_WON); - } - else + if (hints.size() < (unsigned) mPegCnt) { int len0 = left0.size(); for (i = 0; i < len0; ++i) @@ -1359,40 +1857,136 @@ void ColorCode::ResolveRow() p1 = left1.at(j); if (p0 == p1) { - res.push_back(1); + hints.push_back(1); left1.erase(left1.begin() + j); break; } } } } - mSolver->ResIn(&res); - mHintBtns[mCurRow->GetIx()]->DrawHints(res); + + return hints; +} + +void ColorCode::ResolveHints() +{ + mHintBtns[mCurRow->GetIx()]->SetActive(false); + + std::vector rowsol = mCurRow->GetSolution(); + mSolver->GuessIn(&rowsol); + std::vector rowhints = mHintBtns[mCurRow->GetIx()]->GetHints(); + int b = 0; + int w = 0; + for (unsigned i = 0; i < rowhints.size(); ++i) + { + if (rowhints.at(i) == 2) + { + ++b; + } + else if (rowhints.at(i) == 1) + { + ++w; + } + } + + if (b == mPegCnt) + { + SetState(STATE_WON); + ResolveGame(); + } + else if (b == mPegCnt - 1 && w == 1) + { + + } + else + { + mSolver->ResIn(&rowhints); + NextRow(); + ResolveGame(); + } } void ColorCode::ResolveGame() { - switch (mGameState) + if (mGameMode == MODE_HVM) { - case STATE_WON: - ShowMsgSlot(tr("Congratulation! You have won!")); - break; - case STATE_LOST: - ShowMsgSlot(tr("Sorry! You lost!")); - break; - case STATE_GAVE_UP: - ShowMsgSlot(tr("Sure, You're too weak for me!")); - break; - case STATE_RUNNING: - default: - return; - break; - } + switch (mGameState) + { + case STATE_WON: + ShowMsgSlot(tr("Congratulation! You have won!")); + break; + case STATE_LOST: + ShowMsgSlot(tr("Sorry! You lost!")); + break; + case STATE_GAVE_UP: + ShowMsgSlot(tr("Sure, You're too weak for me!")); + break; + case STATE_ERROR: + ShowMsgSlot(tr("The impossible happened, sorry.")); + break; + case STATE_RUNNING: + default: + return; + break; + } - ShowSolution(); + ShowSolution(); + } + else if (mGameMode == MODE_MVH) + { + switch (mGameState) + { + case STATE_WON: + ShowMsgSlot(tr("Yeah! I guessed it, man!")); + break; + case STATE_LOST: + ShowMsgSlot(tr("Embarrassing! I lost a game!")); + break; + case STATE_GAVE_UP: + ShowMsgSlot(tr("Don't you like to see me winning? ;-)")); + break; + case STATE_ERROR: + ShowMsgSlot(tr("Nope! Thats impossible! Did you gave me false hints?")); + break; + case STATE_RUNNING: + default: + return; + break; + } + + mDoneBtn->ShowBtn(false); + mOkBtn->ShowBtn(false); + } } -void ColorCode::SetPegCnt() +void ColorCode::ApplyGameMode() +{ + int ix = mActGroupModes->checkedAction()->data().toInt(); + + if (ix != MODE_HVM && ix != MODE_MVH) + { + return; + } + + mGameMode = ix; + + if (mGameMode == MODE_HVM) + { + mActSetHints->setVisible(false); + + mActSetGuess->setVisible(true); + mActPrevRow->setVisible(true); + } + else if (mGameMode == MODE_MVH) + { + mActSetHints->setVisible(true); + + mActSetGuess->setVisible(false); + mActPrevRow->setVisible(false); + } +} + +void ColorCode::ApplyPegCnt() { int pegcnt = mPegCntCmb->itemData(mPegCntCmb->currentIndex(), IdRole).toInt(); pegcnt = max(2, min(5, pegcnt)); @@ -1400,7 +1994,7 @@ void ColorCode::SetPegCnt() mXOffs = 160 - mPegCnt * 20; } -void ColorCode::SetColorCnt() +void ColorCode::ApplyColorCnt() { int ccnt = mColorCntCmb->itemData(mColorCntCmb->currentIndex(), IdRole).toInt(); ccnt = max(2, min(10, ccnt)); @@ -1411,7 +2005,6 @@ void ColorCode::SetColorCnt() } mColorCnt = ccnt; - int xpos = 279; int ystart = ROW_Y0 + (MAX_COLOR_CNT - mColorCnt) * 40; int ypos; @@ -1438,40 +2031,75 @@ void ColorCode::SetColorCnt() } } +void ColorCode::ApplySolverStrength() +{ + mSolverStrength = mSettings->mSolverStrength; +} + void ColorCode::SetSolution() { mSolution.clear(); - int i, rndm; - int check[mColorCnt]; - for (i = 0; i < mColorCnt; ++i) - { - check[i] = 0; - } - for (i = 0; i < mPegCnt; ++i) + if (mGameMode == MODE_HVM) { - rndm = qrand() % mColorCnt; - if (mDoubles == 0 && check[rndm] != 0) + mSolutionRow->ClearRow(); + int i, rndm; + int check[mColorCnt]; + for (i = 0; i < mColorCnt; ++i) { - --i; - continue; + check[i] = 0; + } + + for (i = 0; i < mPegCnt; ++i) + { + rndm = qrand() % mColorCnt; + if (mDoubles == 0 && check[rndm] != 0) + { + --i; + continue; + } + mSolution.push_back(rndm); + check[rndm] = 1; } - mSolution.push_back(rndm); - check[rndm] = 1; } + else if (mGameMode == MODE_MVH) + { + std::vector s = mSolutionRow->GetSolution(); + if (s.size() == (unsigned) mPegCnt) + { + mSolutionRow->CloseRow(); + mDoneBtn->ShowBtn(false); + + for (int i = 0; i < mPegCnt; ++i) + { + mSolution.push_back(s.at(i)); + } + } + } +} + +void ColorCode::GetSolution() +{ + mActSetHints->setEnabled(false); + mActRandRow->setEnabled(true); + mActClearRow->setEnabled(true); + + ShowMsgSlot(tr("Place Your secret ColorCode ...")); + mSolutionRow->SetActive(true); + mCurRow = mSolutionRow; } void ColorCode::ShowSolution() { + mSolutionRow->SetActive(true); ColorPeg* peg; for (int i = 0; i < mPegCnt; ++i) { peg = CreatePeg(mSolution.at(i)); - peg->setPos(mXOffs + i * 40 + 2, 72); peg->SetBtn(false); - peg->SetEnabled(false); - mSolPegs[i] = peg; + mSolutionRow->ForceSnap(peg, i); } + mSolutionRow->CloseRow(); } void ColorCode::SetState(const int s) @@ -1485,25 +2113,44 @@ void ColorCode::SetState(const int s) bool running = mGameState == STATE_RUNNING; - RestartGameAction->setEnabled(running); - GiveInAction->setEnabled(running); - mActGetGuess->setEnabled(running); + mActRestartGame->setEnabled(running); + mActGiveIn->setEnabled(running); + mActSetGuess->setEnabled(running); + mActSetHints->setEnabled(running); +} + +bool ColorCode::GamesRunning() +{ + if (mGameMode == MODE_HVM) + { + return (mGameState == STATE_RUNNING && mGuessCnt > 1); + } + else if (mGameMode == MODE_MVH) + { + return (mGameState == STATE_RUNNING && mCurRow != mSolutionRow); + } + return false; } void ColorCode::Scale() { + if (mGameCnt == 0) + { + return; + } + qreal w = geometry().width() - 4; qreal h = geometry().height() - 4; - if (ShowStatusbarAction->isChecked()) + if (mActShowStatusbar->isChecked()) { h -= statusBar()->height(); } - if (ShowMenubarAction->isChecked()) + if (mActShowMenubar->isChecked()) { h -= mMenuBar->height(); } - if (ShowToolbarAction->isChecked()) + if (mActShowToolbar->isChecked()) { h -= mGameToolbar->height(); } @@ -1530,7 +2177,7 @@ ColorPeg* ColorCode::CreatePeg(int ix) { if (ix < 0 || ix >= mColorCnt) { - ix = ColorCode::mMaxZ % mColorCnt; + ix = mAllPegs.size() % mColorCnt; } PegType *pt = mTypesMap[ix]; @@ -1541,11 +2188,11 @@ ColorPeg* ColorCode::CreatePeg(int ix) peg = new ColorPeg; peg->SetPegType(pt); peg->SetBtn(true); - peg->ShowLetter(mActShowLetter->isChecked()); - peg->SetId(ColorCode::mMaxZ); + peg->SetIndicator(mActShowLetter->isChecked(), mSettings->mIndicatorType, mHideColors); + peg->SetId(mAllPegs.size()); scene->addItem(peg); peg->setPos(mBtnPos[ix]); - peg->setZValue(24); + peg->setZValue(LAYER_PEGS); mAllPegs.push_back(peg); scene->clearSelection(); scene->update(mBtnPos[ix].x(), mBtnPos[ix].y(), 38, 38); @@ -1572,8 +2219,6 @@ ColorPeg* ColorCode::CreatePeg(int ix) peg->setSelected(true); } - ++ColorCode::mMaxZ; - return peg; } diff --git a/plugins/ColorCode_plugin/colorcode.h b/plugins/ColorCode_plugin/colorcode.h index b1e68293b..06eb61c9b 100644 --- a/plugins/ColorCode_plugin/colorcode.h +++ b/plugins/ColorCode_plugin/colorcode.h @@ -38,13 +38,16 @@ class QGraphicsItem; class QGraphicsTextItem; class QGraphicsScene; class QGraphicsView; +class PrefDialog; +class Settings; class CCSolver; class ColorPeg; class PegRow; class RowHint; class Msg; class BackGround; -class SolRow; +class SolutionRow; +class GraphicsBtn; class ColorCode : public QMainWindow { @@ -58,12 +61,20 @@ class ColorCode : public QMainWindow static const int STATE_WON; static const int STATE_LOST; static const int STATE_GAVE_UP; + static const int STATE_ERROR; + + static const int MODE_HVM; + static const int MODE_MVH; static const int MAX_COLOR_CNT; + static const int LEVEL_SETTINGS[5][3]; + int ROW_CNT; int ROW_Y0; + Settings* mSettings; + public slots: void PegPressSlot(ColorPeg *cp); void PegSortSlot(ColorPeg* cp); @@ -73,6 +84,10 @@ class ColorCode : public QMainWindow void ShowMsgSlot(QString msg); void RemovePegSlot(ColorPeg* cp); + void DoneBtnPressSlot(GraphicsBtn* btn = NULL); + + void ApplyPreferencesSlot(); + protected : void resizeEvent(QResizeEvent* e); void contextMenuEvent(QContextMenuEvent* e); @@ -88,32 +103,45 @@ class ColorCode : public QMainWindow void OnlineHelpSlot(); void AboutSlot(); void AboutQtSlot(); + void OpenPreferencesSlot(); void ShowToolbarSlot(); void ShowMenubarSlot(); void ShowStatusbarSlot(); void ResetColorsOrderSlot(); - void ShowLetterSlot(); + void SetIndicators(); void SameColorSlot(bool checked); void SetSameColor(bool checked); void AutoCloseSlot(); - void ForceLevelSlot(); + void AutoHintsSlot(); + void SetLevelSlot(); + void SetGameModeSlot(); void RandRowSlot(); void PrevRowSlot(); void ClearRowSlot(); - void mColorCntChangedSlot(); + void ColorCntChangedSlot(); void PegCntChangedSlot(); void UpdateRowMenuSlot(); - void GetGuessSlot(); + void SetGuessSlot(); + void SetHintsSlot(); + void SetAutoHintsSlot(); void TestSlot(); private: - static const int mLevelSettings[5][3]; + static const int LAYER_BG; + static const int LAYER_ROWS; + static const int LAYER_HINTS; + static const int LAYER_SOL; + static const int LAYER_MSG; + static const int LAYER_PEGS; + static const int LAYER_BTNS; + static const int LAYER_DRAG; + static int mGameMode; static int mLevel; static int mColorCnt; static int mPegCnt; @@ -126,6 +154,9 @@ class ColorCode : public QMainWindow int mGameState; int mGameId; int mGuessCnt; + int mGameCnt; + bool mHideColors; + int mSolverStrength; std::vector mSolution; @@ -136,12 +167,15 @@ class ColorCode : public QMainWindow CCSolver* mSolver; Msg* mMsg; BackGround* mBg; + GraphicsBtn* mDoneBtn; + GraphicsBtn* mOkBtn; + PrefDialog* mPrefDialog; PegRow* mCurRow; std::vector mAllPegs; std::vector mPegBuff; - SolRow* mSolRow; + SolutionRow* mSolutionRow; PegRow* mPegRows[10]; RowHint* mHintBtns[10]; @@ -149,38 +183,56 @@ class ColorCode : public QMainWindow QRadialGradient mGradMap[10]; QRadialGradient mGradBuff[10]; ColorPeg* mPegBtns[10]; - ColorPeg** mSolPegs; QPoint mBtnPos[10]; + QTimer* mHintsDelayTimer; + void InitTypesMap(); void InitSolution(); void InitActions(); void InitMenus(); void InitToolBars(); + void CreatePrefDialog(); + void ApplySettings(); + bool NeedsRestart() const; + void TryNewGame(); + void SetGameMode(); void SetPegCnt(); void SetColorCnt(); + + void ApplyGameMode(); + void ApplyPegCnt(); + void ApplyColorCnt(); + void ApplySolverStrength(); + void CheckLevel(); void CheckSameColorsSetting(); void SetState(const int s); void ResetGame(); void NewGame(); void SetSolution(); + void GetSolution(); void ShowSolution(); void NextRow(); void ResolveRow(); + std::vector RateSol2Guess(const std::vector sol, const std::vector guess); + void ResolveHints(); void ResolveGame(); + bool GamesRunning(); void Scale(); ColorPeg* CreatePeg(int ix); void RemovePeg(ColorPeg* cp); - QMenu* GameMenu; - QMenu* RowMenu; - QMenu* SettingsMenu; - QMenu* LevelMenu; - QMenu* HelpMenu; - QMenu* RowContextMenu; + QMenu* mMenuGame; + QMenu* mMenuRow; + QMenu* mMenuRowContext; + QMenu* mMenuSettings; + QMenu* mMenuModes; + QMenu* mMenuLevels; + QMenu* mMenuHelp; + QMenuBar* mMenuBar; QToolBar* mGameToolbar; QToolBar* mLevelToolbar; @@ -189,24 +241,31 @@ class ColorCode : public QMainWindow QComboBox* mPegCntCmb; QLabel* mStatusLabel; - QActionGroup* mLevelActions; - QAction* NewGameAction; - QAction* RestartGameAction; - QAction* GiveInAction; - QAction* ShowToolbarAction; - QAction* ShowMenubarAction; - QAction* ShowStatusbarAction; - QAction* SameColorAction; + QActionGroup* mActGroupLevels; + QActionGroup* mActGroupModes; + + QAction* mActNewGame; + QAction* mActRestartGame; + QAction* mActGiveIn; + QAction* mActShowToolbar; + QAction* mActShowMenubar; + QAction* mActShowStatusbar; + QAction* mActSameColor; QAction* mActResetColorsOrder; QAction* mActShowLetter; QAction* mActSameColorIcon; - QAction* AutoCloseAction; - QAction* AboutAction; - QAction* AboutQtAction; - QAction* ExitAction; + QAction* mActAutoClose; + QAction* mActAutoHints; + QAction* mActPreferences; + QAction* mActAbout; + QAction* mActAboutQt; + QAction* mActExit; QAction* mActSetPegCnt; + QAction* mActModeHvM; + QAction* mActModeMvH; + QAction* mActLevelEasy; QAction* mActLevelClassic; QAction* mActLevelMedium; @@ -214,11 +273,12 @@ class ColorCode : public QMainWindow QAction* mActLevelHard; QAction* mLaunchHelpAction; - QAction* RandRowAction; - QAction* PrevRowAction; - QAction* ClearRowAction; + QAction* mActRandRow; + QAction* mActPrevRow; + QAction* mActClearRow; - QAction* mActGetGuess; + QAction* mActSetGuess; + QAction* mActSetHints; }; #endif // COLORCODE_H diff --git a/plugins/ColorCode_plugin/colorpeg.cpp b/plugins/ColorCode_plugin/colorpeg.cpp index 5f7c3cbb7..fa83d944e 100644 --- a/plugins/ColorCode_plugin/colorpeg.cpp +++ b/plugins/ColorCode_plugin/colorpeg.cpp @@ -26,6 +26,7 @@ const QFont ColorPeg::mFont = ColorPeg::GetLetterFont(); const QBrush ColorPeg::mShadowBrush = ColorPeg::GetShadowBrush(); const QBrush ColorPeg::mOutlineBrush = ColorPeg::GetOutlineBrush(); const QBrush ColorPeg::mGlossyBrush = ColorPeg::GetGlossyBrush(); +const QBrush ColorPeg::mNeutralBrush = ColorPeg::GetNeutralBrush(); QFont ColorPeg::GetLetterFont() { @@ -35,6 +36,15 @@ QFont ColorPeg::GetLetterFont() return lf; } +QBrush ColorPeg::GetNeutralBrush() +{ + QRadialGradient rgrad(20, 20, 40, 5, 5); + rgrad.setColorAt(0.0, QColor(0xff, 0xff, 0xff, 0xff)); + rgrad.setColorAt(1.0, QColor(0x80, 0x80, 0x80, 0xff)); + + return QBrush(rgrad); +} + QBrush ColorPeg::GetShadowBrush() { QRadialGradient rgrad(22, 22, 22, 22, 22); @@ -68,7 +78,8 @@ ColorPeg::ColorPeg(QObject*) mPegRow = NULL; SetBtn(true); mIsDragged = false; - mShowLetter = false; + mShowIndicator = false; + mHideColor = false; mSort = 0; mId = -1; } @@ -150,11 +161,13 @@ void ColorPeg::SetEnabled(const bool b) SetCursorShape(); } -void ColorPeg::ShowLetter(const bool b) +void ColorPeg::SetIndicator(const bool b, const int t, const bool c) { - if (mShowLetter != b) + if (mShowIndicator != b || mIndicatorType != t || mHideColor != c) { - mShowLetter = b; + mShowIndicator = b; + mIndicatorType = t; + mHideColor = c; update(boundingRect()); } } @@ -294,16 +307,34 @@ void ColorPeg::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*optio painter->translate(QPointF(2, 2)); } - painter->setBrush(QBrush(*mPegType->grad)); - painter->drawEllipse(GetColorRect()); + if (!mHideColor) + { + painter->setBrush(QBrush(*mPegType->grad)); + painter->drawEllipse(GetColorRect()); + } + else + { + painter->setBrush(mNeutralBrush); + painter->drawEllipse(GetColorRect()); + } + painter->setBrush(mGlossyBrush); painter->drawEllipse(QRectF(5, 3, 24, 20)); - if (mShowLetter) + if (mShowIndicator) { painter->setPen(QPen(QColor("#303133"))); painter->setRenderHint(QPainter::TextAntialiasing, true); painter->setFont(mFont); - painter->drawText(QRectF(1.5, 2.0, 32.0, 32.0), Qt::AlignCenter, QString(mPegType->let)); + QString ind; + if (mIndicatorType == Settings::INDICATOR_LETTER) + { + ind = QString(mPegType->let); + } + else + { + ind.setNum((mPegType->ix + 1)); + } + painter->drawText(QRectF(1.5, 2.0, 32.0, 32.0), Qt::AlignCenter, ind); } } diff --git a/plugins/ColorCode_plugin/colorpeg.h b/plugins/ColorCode_plugin/colorpeg.h index 9adb1f654..5f3bd8f19 100644 --- a/plugins/ColorCode_plugin/colorpeg.h +++ b/plugins/ColorCode_plugin/colorpeg.h @@ -28,6 +28,7 @@ #include "colorcode.h" #include "pegrow.h" #include "rowhint.h" +#include "settings.h" class ColorPeg : public QObject, public QGraphicsItem @@ -50,7 +51,7 @@ public: void SetType(const int t); void SetEnabled(const bool b); - void ShowLetter(const bool b); + void SetIndicator(const bool b, const int t, const bool c); void SetCursorShape( Qt::CursorShape shape = Qt::ArrowCursor, const bool force = false); PegType* GetPegType(); int GetType() const; @@ -83,6 +84,8 @@ private: static QBrush GetOutlineBrush(); static const QBrush mGlossyBrush; static QBrush GetGlossyBrush(); + static const QBrush mNeutralBrush; + static QBrush GetNeutralBrush(); QRectF GetColorRect() const; QRectF outlineRect() const; @@ -96,7 +99,9 @@ private: int mSort; bool mIsBtn; bool mIsDragged; - bool mShowLetter; + bool mShowIndicator; + int mIndicatorType; + bool mHideColor; }; diff --git a/plugins/ColorCode_plugin/graphicsbtn.cpp b/plugins/ColorCode_plugin/graphicsbtn.cpp new file mode 100644 index 000000000..e8f301221 --- /dev/null +++ b/plugins/ColorCode_plugin/graphicsbtn.cpp @@ -0,0 +1,151 @@ +/* ColorCode, a free MasterMind clone with built in solver + * Copyright (C) 2009 Dirk Laebisch + * http://www.laebisch.com/ + * + * ColorCode is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ColorCode is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ColorCode. If not, see . +*/ + +#include +#include +#include "graphicsbtn.h" + +using namespace std; + +GraphicsBtn::GraphicsBtn() +{ + mWidth = 152; + + setCursor(Qt::PointingHandCursor); + setAcceptHoverEvents (true); + mLabel = ""; + mLabelWidth = 0; + mYOffs = 0; + + InitGraphics(); + SetShapes(); + + mFillBrush = &mFillOutBrush; + mFrameBrush = &mFrameOutBrush; + + mFont = QFont("Arial", 12, QFont::Bold, false); + mFont.setStyleHint(QFont::SansSerif); + mFont.setStyleStrategy(QFont::PreferAntialias); +} + +void GraphicsBtn::SetWidth(int w) +{ + mWidth = w; + SetShapes(); +} + +void GraphicsBtn::SetLabel(QString str) +{ + mLabel = str; +} + +void GraphicsBtn::ShowBtn(bool b) +{ + if (b) + { + mFillBrush = &mFillOutBrush; + mFrameBrush = &mFrameOutBrush; + } + setVisible(b); +} + +void GraphicsBtn::hoverEnterEvent(QGraphicsSceneHoverEvent* e) +{ + mFillBrush = &mFillOverBrush; + QGraphicsItem::hoverEnterEvent(e); +} + +void GraphicsBtn::hoverLeaveEvent(QGraphicsSceneHoverEvent* e) +{ + mFillBrush = &mFillOutBrush; + QGraphicsItem::hoverLeaveEvent(e); +} + +void GraphicsBtn::mousePressEvent(QGraphicsSceneMouseEvent*) +{ + mFrameBrush = &mFrameOverBrush; + mYOffs = 1; + update(mRect); +} + +void GraphicsBtn::mouseReleaseEvent(QGraphicsSceneMouseEvent* e) +{ + mFrameBrush = &mFrameOutBrush; + mYOffs = 0; + if ( e->pos().x() >= 0 + && e->pos().x() <= boundingRect().width() + && e->pos().y() >= 0 + && e->pos().y() <= boundingRect().height() ) + { + emit BtnPressSignal(this); + } + update(mRect); +} + +void GraphicsBtn::InitGraphics() +{ + QLinearGradient fillgrad(0, 2, 0, 36); + fillgrad.setColorAt(0.0, QColor("#f7f8fa")); + fillgrad.setColorAt(0.5, QColor("#b9babc")); + mFillOutBrush = QBrush(fillgrad); + + QLinearGradient fillovergrad(0, 2, 0, 36); + fillovergrad.setColorAt(0.0, QColor("#f7f8fa")); + fillovergrad.setColorAt(1.0, QColor("#b9babc")); + mFillOverBrush = QBrush(fillovergrad); + + QLinearGradient framegrad(0, 0, 0, 40); + framegrad.setColorAt(1.0, QColor(0, 0, 0, 0xa0)); + framegrad.setColorAt(0.0, QColor(0xff, 0xff, 0xff, 0xa0)); + mFrameOutBrush = QBrush(framegrad); + + QLinearGradient frameovergrad(0, 0, 0, 40); + frameovergrad.setColorAt(0.0, QColor(0, 0, 0, 0xa0)); + frameovergrad.setColorAt(1.0, QColor(0xff, 0xff, 0xff, 0xa0)); + mFrameOverBrush = QBrush(frameovergrad); +} + +void GraphicsBtn::SetShapes() +{ + mRect = QRectF(0, 0, mWidth, 38); + mRectFill = QRectF(1, 1, mWidth - 2, 36); +} + +QRectF GraphicsBtn::boundingRect() const +{ + const double margin = 0.5; + return mRect.adjusted(-margin, -margin, 2 * margin, 2 * margin); +} + +void GraphicsBtn::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget* /* widget */) +{ + painter->setPen(Qt::NoPen); + painter->setBrush(*mFrameBrush); + painter->drawRoundedRect(mRect, 20, 20); + + painter->setBrush(*mFillBrush); + painter->drawRoundedRect(mRectFill, 18, 18); + + if (mLabel != "") + { + painter->setRenderHint(QPainter::TextAntialiasing, true); + painter->setPen(QPen(QColor("#303133"))); + painter->setFont(mFont); + painter->drawText(mRectFill.adjusted(0, mYOffs, 0, mYOffs), Qt::AlignCenter, mLabel); + } +} diff --git a/plugins/ColorCode_plugin/graphicsbtn.h b/plugins/ColorCode_plugin/graphicsbtn.h new file mode 100644 index 000000000..f3e01786e --- /dev/null +++ b/plugins/ColorCode_plugin/graphicsbtn.h @@ -0,0 +1,76 @@ +/* ColorCode, a free MasterMind clone with built in solver + * Copyright (C) 2009 Dirk Laebisch + * http://www.laebisch.com/ + * + * ColorCode is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ColorCode is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ColorCode. If not, see . +*/ + +#ifndef GRAPHICSBTN_H +#define GRAPHICSBTN_H + +#include +#include +#include +#include +#include +#include +#include + +class GraphicsBtn : public QObject, public QGraphicsItem +{ + Q_OBJECT + +public: + GraphicsBtn(); + + void SetWidth(int w); + void SetLabel(QString str); + void ShowBtn(bool b); + + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); + QRectF boundingRect() const; + +signals: + void BtnPressSignal(GraphicsBtn* btn); + +protected: + void hoverEnterEvent(QGraphicsSceneHoverEvent* e); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* e); + void mousePressEvent(QGraphicsSceneMouseEvent* e); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* e); + + virtual void InitGraphics(); + virtual void SetShapes(); + + QString mLabel; + int mWidth; + int mLabelWidth; + int mYOffs; + + QRectF mRect; + QRectF mRectFill; + QRectF mIconRect; + + QBrush mFillOutBrush; + QBrush mFillOverBrush; + QBrush* mFillBrush; + + QBrush mFrameOutBrush; + QBrush mFrameOverBrush; + QBrush* mFrameBrush; + + QFont mFont; +}; + +#endif // GRAPHICSBTN_H diff --git a/plugins/ColorCode_plugin/img/Thumbs.db b/plugins/ColorCode_plugin/img/Thumbs.db index 4fcb6e19cf19271e2fadd909c8c0a68de9d22356..2d9421f423bd915d1b86ad24ba01562c91f76047 100644 GIT binary patch delta 1402 zcmY+Ee@s(X6vyxDFCNfhv4jF$hBai0E-jEs#sFbmGZ+H4l>ITtm{9P?MnSNoVS`eX zlCZEKT!k!Z@Q*ncgPr)M!{*^Q53*u3{PU1Jd(d|QAu(?k!aoJ4_rUM=J~kLFy~gAPPa)>MNS`T45L~cuSyY{r(^kVs;;~DYi(9HPRSN7iooJ zaD;4f8npN}FNUHG3#4a*_-W}5)`~FhX0413>yr)ZlF=JCW{hUzcxB!URhiPGQHRTl z`Km1(gcjf+T)-l*1S|tDfEC~+unMdJZU902Rg*?2lz=VpshBcZC46?ZW*fT(zGaiK z+8;J=1>#2Uk*OMQa@k_&re=~*;d-lDL~LOn>wSSD8WvWpcPK)8JTZ(f*k^eG0fl9A z@vm(e)NS0!*{CE8Tid1V>}>mMX$nYUP6#>uYp1W>fgUS|-a3emKz~)CN>s9`+u|XR zIXF+Z4HC?OGjCx#_9qvU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pm b/plugins/ColorCode_plugin/img/colorcode32.xpm new file mode 100644 index 000000000..b0658e12e --- /dev/null +++ b/plugins/ColorCode_plugin/img/colorcode32.xpm @@ -0,0 +1,632 @@ +/* XPM */ +static char * colorcode32_xpm[] = { +"32 32 597 2", +" c None", +". c #727272", +"+ c #574E49", +"@ c #52575C", +"# c #54606B", +"$ c #616D78", +"% c #757779", +"& c #86807B", +"* c #8B8B8B", +"= c #929292", +"- c #939393", +"; c #8F8F8E", +"> c #6D6E71", +", c #4D4D53", +"' c #656155", +") c #746E5D", +"! c #7C776D", +"~ c #737478", +"{ c #6D6E74", +"] c #4A4542", +"^ c #1E4C60", +"/ c #27ACDC", +"( c #20BDF8", +"_ c #1AB6F9", +": c #17A8F4", +"< c #1B97EA", +"[ c #338BD0", +"} c #768897", +"| c #8D8A88", +"1 c #9A9A9A", +"2 c #999999", +"3 c #848484", +"4 c #2E2D2F", +"5 c #9C954A", +"6 c #F5EA6B", +"7 c #FFF467", +"8 c #FFF15D", +"9 c #FDE855", +"0 c #F2D954", +"a c #C8B567", +"b c #838182", +"c c #322C2A", +"d c #23A1C1", +"e c #28DEFF", +"f c #25CCF8", +"g c #22C2F5", +"h c #20B7F2", +"i c #1EACEF", +"j c #1C9FEB", +"k c #1992E7", +"l c #1183E7", +"m c #568ABA", +"n c #94918D", +"o c #A0A0A0", +"p c #838383", +"q c #363520", +"r c #F9F67F", +"s c #FEFA80", +"t c #FBF474", +"u c #FAF06C", +"v c #F8EB62", +"w c #F8E65B", +"x c #F6E053", +"y c #F7DB4A", +"z c #F1D148", +"A c #9B9584", +"B c #4A4441", +"C c #23A0C1", +"D c #29DEFE", +"E c #27D5FB", +"F c #26CEF8", +"G c #23C4F6", +"H c #21B9F3", +"I c #1EAFF0", +"J c #1CA3EC", +"K c #1A96E9", +"L c #1789E4", +"M c #0F77E2", +"N c #5E89B5", +"O c #9D9C9B", +"P c #A5A5A5", +"Q c #A2A2A1", +"R c #2E2C21", +"S c #FFFF88", +"T c #FDFA85", +"U c #FDF87E", +"V c #FCF476", +"W c #FAF16D", +"X c #F9ED65", +"Y c #F8E75E", +"Z c #F7E156", +"` c #F5DC4E", +" . c #F4D547", +".. c #F3CE3F", +"+. c #8E8C83", +"@. c #737272", +"#. c #1E4C61", +"$. c #26D1F9", +"%. c #25CBF8", +"&. c #22C3F5", +"*. c #1FAFF0", +"=. c #1A98E9", +"-. c #188BE6", +";. c #177EE1", +">. c #0D6CDE", +",. c #8C949A", +"'. c #ADADAD", +"). c #505158", +"!. c #CCC764", +"~. c #FDFA81", +"{. c #FDF980", +"]. c #FCF77A", +"^. c #F9ED64", +"/. c #F9E85E", +"(. c #F7E257", +"_. c #F5DD50", +":. c #F4D649", +"<. c #F3CF40", +"[. c #E0C055", +"}. c #72757E", +"|. c #564E49", +"1. c #26ACDB", +"2. c #26CDF8", +"3. c #24C6F7", +"4. c #22BFF5", +"5. c #20B7F3", +"6. c #1EADF0", +"7. c #1CA2ED", +"8. c #1A97E9", +"9. c #167EE1", +"0. c #146FDD", +"a. c #517FBA", +"b. c #AAA9A8", +"c. c #AEAEAE", +"d. c #4F4C3C", +"e. c #FFFF78", +"f. c #FCF678", +"g. c #FBF36F", +"h. c #FAEF6B", +"i. c #F9EB63", +"j. c #F6E256", +"k. c #F6DC4F", +"l. c #F4D749", +"m. c #F2CF42", +"n. c #F4C831", +"o. c #948F82", +"p. c #52565B", +"q. c #20BCF8", +"r. c #22BEF5", +"s. c #21BAF3", +"t. c #1FB2F1", +"u. c #1EA8EE", +"v. c #1BA0EB", +"w. c #1A95E8", +"x. c #1788E4", +"y. c #157CE1", +"z. c #1570DC", +"A. c #256FCF", +"B. c #ABA8A3", +"C. c #9B9B9C", +"D. c #978F51", +"E. c #FDF26C", +"F. c #FAF270", +"G. c #FBF270", +"H. c #FBF16D", +"I. c #FAF06B", +"J. c #F9E960", +"K. c #F8E55A", +"L. c #F6E054", +"M. c #F3CE40", +"N. c #F3C838", +"O. c #B4A06A", +"P. c #53606B", +"Q. c #1AB7F9", +"R. c #1FB1F1", +"S. c #1EACF0", +"T. c #1DA3ED", +"U. c #1A9AEA", +"V. c #1990E7", +"W. c #1786E4", +"X. c #1678DF", +"Y. c #146EDC", +"Z. c #1161D4", +"`. c #B2AEA7", +" + c #8F8F91", +".+ c #B3A95C", +"++ c #F9EC64", +"@+ c #F9EE67", +"#+ c #FAEF69", +"$+ c #FAEE67", +"%+ c #F9EC65", +"&+ c #F9EB61", +"*+ c #F8E65C", +"=+ c #F7E357", +"-+ c #F6DE51", +";+ c #F5DA4C", +">+ c #F4D446", +",+ c #F2CD40", +"'+ c #F1C639", +")+ c #C8AD60", +"!+ c #626E78", +"~+ c #1FADF0", +"{+ c #1EA9EE", +"]+ c #1B9CEB", +"^+ c #1A93E8", +"/+ c #188BE5", +"(+ c #167FE2", +"_+ c #1575DE", +":+ c #136ADB", +"<+ c #125FD1", +"[+ c #B5B0AA", +"}+ c #9C9C9D", +"|+ c #B7AC61", +"1+ c #F9E75C", +"2+ c #F8E95F", +"3+ c #F9E95F", +"4+ c #F8E85F", +"5+ c #F7DF52", +"6+ c #F5DB4D", +"7+ c #F3D143", +"8+ c #F2CB3D", +"9+ c #F1C537", +"0+ c #C0A65E", +"a+ c #1783E3", +"b+ c #167AE0", +"c+ c #146FDC", +"d+ c #1265D9", +"e+ c #2D6BC5", +"f+ c #B9B6B2", +"g+ c #B2B2B2", +"h+ c #A89B6A", +"i+ c #F9E353", +"j+ c #F7E457", +"k+ c #F7E459", +"l+ c #F7E458", +"m+ c #F7E254", +"n+ c #F6DF52", +"o+ c #F4D849", +"p+ c #F4D345", +"q+ c #F2CE40", +"r+ c #F1C73A", +"s+ c #F3C231", +"t+ c #A9996C", +"u+ c #857F7B", +"v+ c #338CD0", +"w+ c #1991E8", +"x+ c #1A94E8", +"y+ c #1782E3", +"z+ c #167CE1", +"A+ c #1573DD", +"B+ c #0F5ED8", +"C+ c #5B7CAD", +"D+ c #C7C7C7", +"E+ c #C8C8C8", +"F+ c #8C8A84", +"G+ c #FADE4A", +"H+ c #F6DE50", +"I+ c #F6DF51", +"J+ c #F6DE52", +"K+ c #F6DD4F", +"L+ c #F5D849", +"M+ c #F3D346", +"N+ c #F3D041", +"O+ c #F2CA3D", +"P+ c #F1C538", +"Q+ c #EFBB2D", +"R+ c #8D8C89", +"S+ c #8C8C8D", +"T+ c #758796", +"U+ c #1182E7", +"V+ c #136ADA", +"W+ c #1263D8", +"X+ c #1158CC", +"Y+ c #B2B1AE", +"Z+ c #C9C9C9", +"`+ c #A5A7AB", +" @ c #CEB865", +".@ c #F5D846", +"+@ c #F5D94B", +"@@ c #F4D84A", +"#@ c #F3D447", +"$@ c #F3D244", +"%@ c #F3CE41", +"&@ c #F1C638", +"*@ c #F1C133", +"=@ c #C1A457", +"-@ c #8B8B8D", +";@ c #5689BB", +">@ c #0F78E2", +",@ c #1574DE", +"'@ c #0753D3", +")@ c #8493A8", +"!@ c #CBCBCB", +"~@ c #CACACA", +"{@ c #989899", +"]@ c #EAC84D", +"^@ c #F3D142", +"/@ c #F3D243", +"(@ c #F3D042", +"_@ c #F2CF41", +":@ c #F2CC3F", +"<@ c #F2C93B", +"[@ c #F1C539", +"}@ c #F1C234", +"|@ c #DCB13D", +"1@ c #8E8E91", +"2@ c #95918D", +"3@ c #1365D9", +"4@ c #1058CB", +"5@ c #8493A7", +"6@ c #CCCCCC", +"7@ c #9C9B9B", +"8@ c #DEBF55", +"9@ c #F5CB36", +"0@ c #F1C83B", +"a@ c #F0C338", +"b@ c #F2BE2C", +"c@ c #D1AB49", +"d@ c #949393", +"e@ c #9D9C9A", +"f@ c #527FBA", +"g@ c #1161D5", +"h@ c #1260D1", +"i@ c #2D6AC4", +"j@ c #5B7BAC", +"k@ c #B3B1AE", +"l@ c #CDCDCD", +"m@ c #CECECE", +"n@ c #CCCCCB", +"o@ c #AAABB0", +"p@ c #AFA382", +"q@ c #D5B65B", +"r@ c #E9BE3E", +"s@ c #EEBF33", +"t@ c #E6BB3B", +"u@ c #CFAD54", +"v@ c #A79B7E", +"w@ c #9A9CA0", +"x@ c #B3AEA7", +"y@ c #B5B0AB", +"z@ c #B8B6B2", +"A@ c #B1B2B5", +"B@ c #A9ABB2", +"C@ c #A6A9B1", +"D@ c #A3A5AB", +"E@ c #A8A9AB", +"F@ c #9B9C9C", +"G@ c #8F9191", +"H@ c #9C9E9E", +"I@ c #C8C7C7", +"J@ c #B4B4B4", +"K@ c #8F8F8F", +"L@ c #ABABAB", +"M@ c #A2A1A1", +"N@ c #515B5C", +"O@ c #4B3836", +"P@ c #8D362D", +"Q@ c #A63A30", +"R@ c #A83F38", +"S@ c #985652", +"T@ c #898080", +"U@ c #A7ACAC", +"V@ c #9F9F9F", +"W@ c #484848", +"X@ c #595959", +"Y@ c #A3A3A3", +"Z@ c #9C9C9C", +"`@ c #818181", +" # c #7B7B7B", +".# c #9B9B9B", +"+# c #838484", +"@# c #2D201E", +"## c #C6260C", +"$# c #FC2303", +"%# c #F02007", +"&# c #E8200B", +"*# c #E21D0D", +"=# c #DD170C", +"-# c #D5150E", +";# c #B24544", +"># c #979999", +",# c #616161", +"'# c #4D4D4D", +")# c #D7D7D7", +"!# c #F5F5F5", +"~# c #EFEFEF", +"{# c #EDEDED", +"]# c #EBEBEB", +"^# c #EAEAEA", +"/# c #D6D6D6", +"(# c #959595", +"_# c #888888", +":# c #351612", +"<# c #FF2A02", +"[# c #F92703", +"}# c #F52605", +"|# c #F02208", +"1# c #EA200A", +"2# c #E41F0C", +"3# c #DD1C0F", +"4# c #D61A11", +"5# c #CD1412", +"6# c #BF2526", +"7# c #9C9999", +"8# c #626262", +"9# c #717171", +"0# c #F3F3EF", +"a# c #F6F6EF", +"b# c #F6F6F0", +"c# c #F3F3F0", +"d# c #F0F0EF", +"e# c #E9E9E9", +"f# c #E3E3E3", +"g# c #868686", +"h# c #909090", +"i# c #2C2F30", +"j# c #F62904", +"k# c #FA2902", +"l# c #F82704", +"m# c #F52506", +"n# c #F12308", +"o# c #EA210A", +"p# c #E51F0D", +"q# c #DE1C0E", +"r# c #D81A10", +"s# c #CF1714", +"t# c #C71415", +"u# c #B53439", +"v# c #ABB2B2", +"w# c #4E4E4E", +"x# c #F5F5F0", +"y# c #F9F9F2", +"z# c #F9F9F5", +"A# c #F9F9F4", +"B# c #F8F8F2", +"C# c #F7F7F0", +"D# c #F1F1F0", +"E# c #E8E8E8", +"F# c #E1E1E1", +"G# c #8C8C8C", +"H# c #6D7272", +"I# c #932112", +"J# c #F92603", +"K# c #F72605", +"L# c #F22406", +"M# c #EF2209", +"N# c #E41E0D", +"O# c #DE1C0F", +"P# c #D01814", +"Q# c #C71615", +"R# c #BF0C10", +"S# c #A07679", +"T# c #F2F2EF", +"U# c #FCFCF9", +"V# c #FDFDFB", +"W# c #FAFAF6", +"X# c #F4F4EF", +"Y# c #EEEEEF", +"Z# c #E4E4E4", +"`# c #D3D3D3", +" $ c #4E5556", +".$ c #E7250C", +"+$ c #F22407", +"@$ c #F22506", +"#$ c #F02307", +"$$ c #EC2109", +"%$ c #E9200B", +"&$ c #D81A11", +"*$ c #BF1518", +"=$ c #AC4046", +"-$ c #B2B5B5", +";$ c #B5B5B5", +">$ c #FDFDFD", +",$ c #FBFBF6", +"'$ c #F8F8F0", +")$ c #F0F0F0", +"!$ c #E0E0E0", +"~$ c #615150", +"{$ c #F01E08", +"]$ c #EC2209", +"^$ c #EE2309", +"/$ c #EE2208", +"($ c #EC210A", +"_$ c #E61E0C", +":$ c #E11E0D", +"<$ c #DC1B10", +"[$ c #D61911", +"}$ c #CE1715", +"|$ c #C61516", +"1$ c #BE1419", +"2$ c #B11A23", +"3$ c #ACB3B3", +"4$ c #FCFCF8", +"5$ c #FAFAF5", +"6$ c #F2F2F0", +"7$ c #A8A8A8", +"8$ c #6D5856", +"9$ c #EC1806", +"0$ c #E71F0B", +"a$ c #E7200B", +"b$ c #E51E0D", +"c$ c #D21912", +"d$ c #CA1615", +"e$ c #C41616", +"f$ c #BB1419", +"g$ c #B00F19", +"h$ c #A9B3B2", +"i$ c #F9F9F3", +"j$ c #DFDFDF", +"k$ c #B1B1B1", +"l$ c #766866", +"m$ c #E2170A", +"n$ c #E11E0E", +"o$ c #E31E0D", +"p$ c #E21E0D", +"q$ c #E01D0E", +"r$ c #D91A10", +"s$ c #D41912", +"t$ c #CD1814", +"u$ c #C11517", +"v$ c #B8131A", +"w$ c #AC1824", +"x$ c #A6AEAD", +"y$ c #F8F8F1", +"z$ c #F7F7EF", +"A$ c #A4A4A4", +"B$ c #74797A", +"C$ c #D12019", +"D$ c #D91B11", +"E$ c #DB1B0F", +"F$ c #DC1B0F", +"G$ c #D71A11", +"H$ c #D31912", +"I$ c #CE1714", +"J$ c #C91615", +"K$ c #C31517", +"L$ c #BB1418", +"M$ c #B4121B", +"N$ c #A33D46", +"O$ c #A9ACAB", +"P$ c #828282", +"Q$ c #F4F4F0", +"R$ c #DEDEDE", +"S$ c #8D8D8D", +"T$ c #6F7777", +"U$ c #AF4A48", +"V$ c #D21610", +"W$ c #D51911", +"X$ c #D51912", +"Y$ c #D11813", +"Z$ c #CC1815", +"`$ c #BE1418", +" % c #B7131A", +".% c #AE0914", +"+% c #977478", +"@% c #F1F1EF", +"#% c #EEEEEE", +"$% c #737373", +"%% c #828181", +"&% c #C71A1A", +"*% c #CA1715", +"=% c #CB1615", +"-% c #BD1418", +";% c #B1101B", +">% c #A12F3A", +",% c #9DA1A1", +"'% c #949494", +")% c #E2E2E2", +"!% c #DCDCDC", +"~% c #937C7C", +"{% c #C21416", +"]% c #C41515", +"^% c #BA1319", +"/% c #B6131A", +"(% c #B10F19", +"_% c #A3202C", +":% c #939293", +"<% c #898989", +"[% c #A2A2A2", +"}% c #8A7F80", +"|% c #B6353A", +"1% c #BA0A10", +"2% c #B91016", +"3% c #B91319", +"4% c #B6121A", +"5% c #B30C16", +"6% c #AB0915", +"7% c #9B434C", +"8% c #CFCFCF", +"9% c #758180", +"0% c #8E7D7E", +"a% c #9B595E", +"b% c #A44D53", +"c% c #9E4C52", +"d% c #945E64", +"e% c #8B8889", +"f% c #8B8E8D", +" . + @ # $ % & * = = - - - - = = ; > , ' ) ! ~ { ", +" ] ^ / ( _ : < [ } | 1 2 2 2 2 1 3 4 5 6 7 8 9 0 a b ", +" c d e f g h i j k l m n o o o o p q r s t u v w x y z A ", +" B C D E F G H I J K L M N O P P Q R S T U V W X Y Z ` ...+. ", +"@.#.e E $.%.&.H *.J =.-.;.>.,.'.'.).!.~.{.].t W ^./.(._.:.<.[.}.", +"|.1.f 2.%.3.4.5.6.7.8.-.9.0.a.b.c.d.e.f.f.t g.h.i.Y j.k.l.m.n.o.", +"p.q.g G &.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.X J.K.L.` .M.N.O.", +"P.Q.h H H 5.R.S.T.U.V.W.X.Y.Z.`. +.+++@+#+$+%+&+*+=+-+;+>+,+'+)+", +"!+: i I *.~+{+T.]+^+/+(+_+:+<+[+}+|+1+2+J.3+4+w =+5+6+l.7+8+9+0+", +"% < j J J 7.v.U.^+-.a+b+c+d+e+f+g+h+i+j+k+l+j+m+n+` o+p+q+r+s+t+", +"u+v+w+K =.8.x+V./+y+z+A+:+B+C+D+E+F+G+H+I+n+J+K+6+L+M+N+O+P+Q+R+", +"S+T+U+L -.-.x.W.(+b+A+V+W+X+Y+Z+Z+`+ @.@o++@@@l.#@$@%@8+&@*@=@-@", +"= | ;@>@9.9.y.X.,@c+:+W+'@)@!@~@~@!@{@]@^@/@$@(@_@:@<@[@}@|@1@= ", +"= 1 2@N >.0.z.Y.V+3@B+4@5@Z+!@6@6@!@Z+7@8@9@8+O+0@'+a@b@c@d@1 = ", +"- 2 o e@,.f@A.g@h@i@j@k@!@!@l@m@m@l@!@n@o@p@q@r@s@t@u@v@w@o 2 - ", +"- 2 o P '.b.B.x@y@z@D+Z+~@6@m@m@m@m@6@~@Z+D+A@B@C@D@E@'.P o 2 - ", +"- 2 o P '.c.F@G@H@g+I@Z+~@6@m@m@m@m@6@~@Z+Z+J@2 K@1 L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new file mode 100644 index 0000000000000000000000000000000000000000..95bd319ce13d756a20341b7521bd554cffbe54b9 GIT binary patch literal 1055 zcmV+)1mOFLP))u014Kkn1^4&({_*ki{s#vI#oXNG@BRJ!JR2Jo2NM$z00II4 zG}hMN*7*4P)cN`R0Q>v<0P^zn02db$03#zD00M{!XvlJ)nWmpVe`UCO^$x?+r!OX* zIdkpghYz2@Hpt0IG4Swkdj9zFgZbC5Uku;A|72ieV`Gq#5(CQv1Q3&qjCioDtoX`b zzkcif{ri`JgM+==+S<^DmzNvpt>0ipKyS#t|MZjl>(}oLpFVzJ;N|6H(9ux>%K-!s z3mY5rH&<6%MPQ(Vf4!IgG^xblzj4+9&+XLuk21Q4^BnC74V{~3HWG~^jXLgw-0|Nj64_V)My>gw$P_xJb!1_=-V1MJ2C8Rd}x8TjQ701*dC^Y#Yx^6BZv@#xt9 z0R##E0*Em*w3Ok?moGpKKfO6QIqZ3Pxir3h{rN&jOwusSLBK@j)g%U~-}e|qfYyEE zWMz27$ouE+ZRX;yUw=&c{OvCTKmf6T{K3e`#K6kRvK1K0TR(mJ#`%wt>ATp!z2^Tf z-rT07^-+kIoeS(=?*9x7%1l34{{H9eyK8D>l|NF+q!{#cX#>&jV&(6RAq?rHyXAtH3#q^Jf+2i?Z#+LvA#KM3B z{AXZf`1O}*%8@e+Y`^|9^q9J_GBUjT!NBm~3j^by{|vgqzZoA3ayJ455KaTYQN+x^ z08Cqb`;IXD`T6}vpN;BYW(E#m;(h;{feDz%xS9S60R#|U17L;#y*6pr5e9~z&;Iv0 zTd^=Ru>WUx|B`{>$|L4W00BhM0C0K-TKbO>Xvi&2hI=o6)Cuu0u-|*ne*NtarW}9( Z0|4(~c&K0)VI}|o002ovPDHLkV1f~|8dU%Q literal 0 HcmV?d00001 diff --git a/plugins/ColorCode_plugin/img/icon_female16.png b/plugins/ColorCode_plugin/img/icon_female16.png new file mode 100644 index 0000000000000000000000000000000000000000..5e6bcc90b6de135624e1c5b89bebb253e1a0dfff GIT binary patch literal 856 zcmV-e1E>6nP)LtXjL?=2wj+N>IWApii#kj2yVI)S8iO1OS^R;xbO>#AE*>j7ixuK>!%f}1)DZh z`%5O1WSYq&nfJUC>nD1d`{wc9JNKS*?|bZepBoh>%HL6%ohNUF5GojZPV_l^Qjpr~I*h&Fs|2{971qr|0u>U1?&EDX=gq&_7y7v&; z+BQQ?770} zh!#o~gIQ!SjM9$U>RPn4cOcTa3DJFhz%oTz9Y%E5ad1o6%=T9>_?B>@&R>EcBFm}~ z?A_Ue?FY{QDXLdZ5Xct*0@l_AQ4^3UQL)|Wl>Y=!b(!`V{8bj|M^M!XK>8^aP{;#r zUY-lVVHcJxRKdXM5H6Cu$}pvEc?$>T)huN!0!5QNM+{WJ?}KURwnPHRfr>6rOqKt#3Ve>duIt9R!S@XBVhki5%I%>PtdfP6wLYz-sXngq=Jg@}T6k;; z5=9F)q41>&_olX>!JW>Geok)xIJr1Rm7OlvK+9QRzBN~^Rgnj?Y-3}_(Tv!Vg{4K( zU*#c@IXrzmis2~setFont(mFont); mLay->setTextOption(QTextOption(Qt::AlignHCenter)); @@ -42,7 +43,7 @@ void Msg::ShowMsg(const QString str) mLay->setText(str); int leading = -3; - qreal h = 10; + qreal h = 0; qreal maxw = 0; qreal maxh = 0; mLay->beginLayout(); @@ -63,9 +64,12 @@ void Msg::ShowMsg(const QString str) } mLay->endLayout(); + float ypos = 4 + (70 - mLay->boundingRect().height()) / 2; + maxw = qMax(mUpdateRect.width(), mLay->boundingRect().width()); - maxh = qMax(mUpdateRect.height(), mLay->boundingRect().height() + 8); - mUpdateRect = QRectF(0, 0, maxw, maxh); + maxh = qMax(mUpdateRect.height(), mLay->boundingRect().height() + ypos); + + mUpdateRect = QRectF(0, 0, maxw, maxh + ypos); update(boundingRect()); } @@ -79,5 +83,6 @@ void Msg::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, Q { painter->setRenderHint(QPainter::TextAntialiasing, true); painter->setPen(QPen(QColor("#303133"))); - mLay->draw(painter, QPoint(0, 0)); + float ypos = 4 + (70 - mLay->boundingRect().height()) / 2; + mLay->draw(painter, QPointF(0, ypos)); } diff --git a/plugins/ColorCode_plugin/pegrow.cpp b/plugins/ColorCode_plugin/pegrow.cpp index ab721a3a2..f96e051ee 100644 --- a/plugins/ColorCode_plugin/pegrow.cpp +++ b/plugins/ColorCode_plugin/pegrow.cpp @@ -26,6 +26,8 @@ using namespace std; PegRow::PegRow(QObject*) { + setAcceptedMouseButtons(0); + mIx = -1; mPegCnt = 0; mXOffs = 0; @@ -36,7 +38,7 @@ PegRow::PegRow(QObject*) mColorPegs = NULL; - Reset(0); + Reset(0, 0); } PegRow::~PegRow() @@ -49,12 +51,19 @@ PegRow::~PegRow() mColorPegs = NULL; } -void PegRow::Reset(const int pegcnt) +bool PegRow::IsActive() const +{ + return mIsActive; +} + +void PegRow::Reset(const int pegcnt, const int gamemode) { ClearRow(); + mSolution.clear(); SetActive(false); mSolved = false; SetPegCnt(pegcnt); + SetGameMode(gamemode); } void PegRow::ClearRow() @@ -96,10 +105,20 @@ void PegRow::SetPegCnt(const int pegcnt) { mColorPegs[i] = NULL; } + SetXOffs(); +} + +void PegRow::SetGameMode(const int gamemode) +{ + mGameMode = gamemode; +} + +void PegRow::SetXOffs() +{ mXOffs = 100 - mPegCnt * 20; } -int PegRow::GetPegCnt() +int PegRow::GetPegCnt() const { if (mColorPegs == NULL) { return 0; }; @@ -203,7 +222,7 @@ void PegRow::CloseRow() mSolved = true; if (mColorPegs == NULL) { - ; + } else { @@ -218,19 +237,41 @@ void PegRow::CloseRow() SetActive(false); } +void PegRow::OpenRow() +{ + mSolved = false; + if (mColorPegs == NULL) + { + + } + else + { + for (int i = 0; i < mPegCnt; ++i) + { + if (mColorPegs[i] != NULL) + { + mColorPegs[i]->SetEnabled(true); + } + } + } + SetActive(true); +} + void PegRow::CheckSolution() { mSolution.clear(); if (mColorPegs == NULL) { - ; + } - - for (int i = 0; i < mPegCnt; ++i) + else { - if (mColorPegs[i] != NULL) + for (int i = 0; i < mPegCnt; ++i) { - mSolution.push_back(mColorPegs[i]->GetPegType()->ix); + if (mColorPegs[i] != NULL) + { + mSolution.push_back(mColorPegs[i]->GetPegType()->ix); + } } } diff --git a/plugins/ColorCode_plugin/pegrow.h b/plugins/ColorCode_plugin/pegrow.h index 7b1227b84..6402d12fe 100644 --- a/plugins/ColorCode_plugin/pegrow.h +++ b/plugins/ColorCode_plugin/pegrow.h @@ -27,7 +27,6 @@ #include #include #include "colorcode.h" -#include "pegrow.h" #include "colorpeg.h" class PegRow : public QObject, public QGraphicsItem @@ -39,19 +38,22 @@ public: ~PegRow(); int GetIx() const; - int GetPegCnt(); + bool IsActive() const; + int GetPegCnt() const; ColorPeg** GetPegs(); std::vector GetSolution() const; void SetIx(const int ix); void SetPegCnt(const int pegcnt); + void SetGameMode(const int gamemode); void SetActive(const bool b); bool SnapCP(ColorPeg* cp); void ForceSnap(ColorPeg* cp, int posix); void RemovePeg(ColorPeg* cp); void CloseRow(); + void OpenRow(); void ClearRow(); - void Reset(const int pegcnt); + void Reset(const int pegcnt, const int gamemode); void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); QRectF boundingRect() const; @@ -64,7 +66,6 @@ signals: protected: QVariant itemChange(GraphicsItemChange change, const QVariant &value); -private: std::vector mSolution; QColor mPend; @@ -75,11 +76,20 @@ private: bool mSolved; int mIx; int mPegCnt; + int mGameMode; int mXOffs; + virtual void SetXOffs(); + void CheckSolution(); ColorPeg** mColorPegs; QRectF outlineRect() const; + +private slots: + //void FillRandSlot(); + +private: + }; #endif // PEGROW_H diff --git a/plugins/ColorCode_plugin/prefdialog.cpp b/plugins/ColorCode_plugin/prefdialog.cpp new file mode 100644 index 000000000..f736ad851 --- /dev/null +++ b/plugins/ColorCode_plugin/prefdialog.cpp @@ -0,0 +1,314 @@ +/* ColorCode, a free MasterMind clone with built in solver + * Copyright (C) 2009 Dirk Laebisch + * http://www.laebisch.com/ + * + * ColorCode is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ColorCode is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ColorCode. If not, see . +*/ + +#include "prefdialog.h" + +using namespace std; + +PrefDialog::PrefDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(parent, f) +{ + setupUi(this); + setSizeGripEnabled(false); + mSuppressSlots = false; + InitControls(); +} + +PrefDialog::~PrefDialog() +{ +} + +void PrefDialog::InitControls() +{ + mLevelPresetsCmb->addItem(tr("... Select from predefined level settings"), -1); + mLevelPresetsCmb->addItem(tr("Beginner (2 Colors, 2 Slots, Doubles)"), 0); + mLevelPresetsCmb->addItem(tr("Easy (4 Colors, 3 Slots, No Doubles)"), 1); + mLevelPresetsCmb->addItem(tr("Classic (6 Colors, 4 Slots, Doubles)"), 2); + mLevelPresetsCmb->addItem(tr("Challenging (8 Colors, 4 Slots, Doubles)"), 3); + mLevelPresetsCmb->addItem(tr("Hard (10 Colors, 5 Slots, Doubles)"), 4); + + mPegCntCmb->addItem("2 " + tr("Slots"), 2); + mPegCntCmb->addItem("3 " + tr("Slots"), 3); + mPegCntCmb->addItem("4 " + tr("Slots"), 4); + mPegCntCmb->addItem("5 " + tr("Slots"), 5); + + mColorCntCmb->addItem("2 " + tr("Colors"), 2); + mColorCntCmb->addItem("3 " + tr("Colors"), 3); + mColorCntCmb->addItem("4 " + tr("Colors"), 4); + mColorCntCmb->addItem("5 " + tr("Colors"), 5); + mColorCntCmb->addItem("6 " + tr("Colors"), 6); + mColorCntCmb->addItem("7 " + tr("Colors"), 7); + mColorCntCmb->addItem("8 " + tr("Colors"), 8); + mColorCntCmb->addItem("9 " + tr("Colors"), 9); + mColorCntCmb->addItem("10 " + tr("Colors"), 10); + + mGameModeCmb->addItem(tr("Human vs. Computer"), ColorCode::MODE_HVM); + mGameModeCmb->addItem(tr("Computer vs. Human"), ColorCode::MODE_MVH); + + mStrengthCmb->addItem(tr("Low"), CCSolver::STRENGTH_LOW); + mStrengthCmb->addItem(tr("Medium"), CCSolver::STRENGTH_MEDIUM); + mStrengthCmb->addItem(tr("High"), CCSolver::STRENGTH_HIGH); + mDelaySb->setMaximum(10000); + mDelaySb->setMinimum(0); + mDelaySb->setSingleStep(100); + + mRestoreBtn = mButtonBox->button(QDialogButtonBox::RestoreDefaults); + mOkBtn = mButtonBox->button(QDialogButtonBox::Ok); + mApplyBtn = mButtonBox->button(QDialogButtonBox::Apply); + mCancelBtn = mButtonBox->button(QDialogButtonBox::Cancel); + + connect(mLevelPresetsCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(LevelPresetChangedSlot())); + connect(mColorCntCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(ColorCntChangedSlot())); + connect(mPegCntCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(PegCntChangedSlot())); + connect(mSameColorsCb, SIGNAL(stateChanged(int)), this, SLOT(SameColorsChangedSlot())); + connect(mShowIndicatorsCb, SIGNAL(stateChanged(int)), this, SLOT(ShowIndicatorsChangedSlot())); + + connect(mResetColorOrderBtn, SIGNAL(clicked()), this, SLOT(ResetColorOrderSlot())); + + connect(mRestoreBtn, SIGNAL(clicked()), this, SLOT(RestoreDefSlot())); + connect(mApplyBtn, SIGNAL(clicked()), this, SLOT(ApplySlot())); + connect(mCancelBtn, SIGNAL(clicked()), this, SLOT(CancelSlot())); + connect(mOkBtn, SIGNAL(clicked()), this, SLOT(OkSlot())); +} + +void PrefDialog::InitSettings(Settings* set) +{ + mSettings = set; + SetSettings(); +} + +void PrefDialog::SetSettings() +{ + bool sup = SetSuppressSlots(true); + + mMenuBarCb->setChecked(mSettings->mShowMenuBar); + mStatusBarCb->setChecked(mSettings->mShowStatusBar); + mToolBarCb->setChecked(mSettings->mShowToolBar); + + mShowIndicatorsCb->setChecked(mSettings->mShowIndicators); + if (mSettings->mIndicatorType == Settings::INDICATOR_NUMBER) + { + mNumbersRb->setChecked(true); + } + else + { + mLettersRb->setChecked(true); + } + mHideColorsCb->setChecked(mSettings->mHideColors); + + CheckIndicators(); + + int i; + i = mColorCntCmb->findData(mSettings->mColorCnt); + if (i != -1 && mColorCntCmb->currentIndex() != i) + { + mColorCntCmb->setCurrentIndex(i); + } + i = mPegCntCmb->findData(mSettings->mPegCnt); + if (i != -1 && mPegCntCmb->currentIndex() != i) + { + mPegCntCmb->setCurrentIndex(i); + } + + mSameColorsCb->setChecked(mSettings->mSameColors); + CheckLevelPresets(); + + i = mGameModeCmb->findData(mSettings->mGameMode); + if (i != -1 && mGameModeCmb->currentIndex() != i) + { + mGameModeCmb->setCurrentIndex(i); + } + + i = mStrengthCmb->findData(mSettings->mSolverStrength); + if (i != -1 && mStrengthCmb->currentIndex() != i) + { + mStrengthCmb->setCurrentIndex(i); + } + + mAutoCloseCb->setChecked(mSettings->mAutoClose); + mAutoHintsCb->setChecked(mSettings->mAutoHints); + + mDelaySb->setValue(mSettings->mHintsDelay); + + if (sup) + { + SetSuppressSlots(false); + } +} + +void PrefDialog::LevelPresetChangedSlot() +{ + int ix, i; + ix = mLevelPresetsCmb->itemData(mLevelPresetsCmb->currentIndex()).toInt(); + + if (ix < 0 || ix > 4) + { + return; + } + + bool sup = SetSuppressSlots(true); + + i = mColorCntCmb->findData(ColorCode::LEVEL_SETTINGS[ix][0]); + if (i != -1 && mColorCntCmb->currentIndex() != i) + { + mColorCntCmb->setCurrentIndex(i); + } + i = mPegCntCmb->findData(ColorCode::LEVEL_SETTINGS[ix][1]); + if (i != -1 && mPegCntCmb->currentIndex() != i) + { + mPegCntCmb->setCurrentIndex(i); + } + + mSameColorsCb->setChecked((ColorCode::LEVEL_SETTINGS[ix][2] == 1)); + + if (sup) + { + SetSuppressSlots(false); + } +} + +void PrefDialog::CheckLevelPresets() +{ + int ix = -1; + for (int i = 0; i < 5; ++i) + { + if ( ColorCode::LEVEL_SETTINGS[i][0] == mColorCntCmb->itemData(mColorCntCmb->currentIndex()).toInt() + && ColorCode::LEVEL_SETTINGS[i][1] == mPegCntCmb->itemData(mPegCntCmb->currentIndex()).toInt() + && ColorCode::LEVEL_SETTINGS[i][2] == (int) mSameColorsCb->isChecked() ) + { + ix = i; + break; + } + } + + mLevelPresetsCmb->setCurrentIndex(mLevelPresetsCmb->findData(ix)); +} + +void PrefDialog::ColorCntChangedSlot() +{ + if (!mSuppressSlots) + { + CheckLevelPresets(); + } +} + +void PrefDialog::PegCntChangedSlot() +{ + if (!mSuppressSlots) + { + CheckLevelPresets(); + } +} + +void PrefDialog::SameColorsChangedSlot() +{ + if (!mSuppressSlots) + { + CheckLevelPresets(); + } +} + +void PrefDialog::ShowIndicatorsChangedSlot() +{ + if (!mSuppressSlots) + { + CheckIndicators(); + } +} + +void PrefDialog::CheckIndicators() +{ + +} + +void PrefDialog::ResetColorOrderSlot() +{ + emit ResetColorOrderSignal(); +} + +void PrefDialog::RestoreDefSlot() +{ + mSettings->RestoreDefSettings(); + SetSettings(); +} + +void PrefDialog::ApplySlot() +{ + ApplySettings(); + setResult(QDialog::Accepted); + hide(); +} + +void PrefDialog::OkSlot() +{ + ApplySettings(); + setResult(QDialog::Accepted); + hide(); +} + +void PrefDialog::CancelSlot() +{ + setResult(QDialog::Rejected); + hide(); +} + +bool PrefDialog::SetSuppressSlots(bool b, bool force) +{ + if (mSuppressSlots == b && !force) + { + return false; + } + mSuppressSlots = b; + return true; +} + +void PrefDialog::ApplySettings() +{ + mSettings->mShowMenuBar = mMenuBarCb->isChecked(); + mSettings->mShowStatusBar = mStatusBarCb->isChecked(); + mSettings->mShowToolBar = mToolBarCb->isChecked(); + + mSettings->mShowIndicators = mShowIndicatorsCb->isChecked(); + + if (mNumbersRb->isChecked()) + { + mSettings->mIndicatorType = Settings::INDICATOR_NUMBER; + } + else + { + mSettings->mIndicatorType = Settings::INDICATOR_LETTER; + } + mSettings->mHideColors = mHideColorsCb->isChecked(); + + mSettings->mColorCnt = mColorCntCmb->itemData(mColorCntCmb->currentIndex()).toInt(); + mSettings->mPegCnt = mPegCntCmb->itemData(mPegCntCmb->currentIndex()).toInt(); + mSettings->mSameColors = mSameColorsCb->isChecked(); + + mSettings->mGameMode = mGameModeCmb->itemData(mGameModeCmb->currentIndex()).toInt(); + mSettings->mSolverStrength = mStrengthCmb->itemData(mStrengthCmb->currentIndex()).toInt(); + + mSettings->mAutoClose = mAutoCloseCb->isChecked(); + mSettings->mAutoHints = mAutoHintsCb->isChecked(); + mSettings->mHintsDelay = mDelaySb->value(); + + mSettings->Validate(); +} + +QSize PrefDialog::sizeHint () const +{ + return QSize(500, 400); +} diff --git a/plugins/ColorCode_plugin/prefdialog.h b/plugins/ColorCode_plugin/prefdialog.h new file mode 100644 index 000000000..3a87192f8 --- /dev/null +++ b/plugins/ColorCode_plugin/prefdialog.h @@ -0,0 +1,75 @@ +/* ColorCode, a free MasterMind clone with built in solver + * Copyright (C) 2009 Dirk Laebisch + * http://www.laebisch.com/ + * + * ColorCode is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ColorCode is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ColorCode. If not, see . +*/ + +#ifndef PREFDIALOG_H +#define PREFDIALOG_H + +#include "ui_prefdialog.h" +#include "settings.h" +#include "colorcode.h" +#include "ccsolver.h" +#include +#include + +class PrefDialog : public QDialog, public Ui::PrefDialog +{ + Q_OBJECT + + public: + PrefDialog(QWidget* parent = 0, Qt::WindowFlags f = 0); + ~PrefDialog(); + + void InitSettings(Settings* set); + void SetSettings(); + virtual QSize sizeHint () const; + + signals: + void ResetColorOrderSignal(); + + private slots: + void ApplySlot(); + void RestoreDefSlot(); + void CancelSlot(); + void OkSlot(); + + void LevelPresetChangedSlot(); + void ColorCntChangedSlot(); + void PegCntChangedSlot(); + void SameColorsChangedSlot(); + void ShowIndicatorsChangedSlot(); + void ResetColorOrderSlot(); + + private: + bool SetSuppressSlots(bool b, bool force = false); + void InitControls(); + void CheckLevelPresets(); + void CheckIndicators(); + void ApplySettings(); + + QPushButton* mRestoreBtn; + QPushButton* mOkBtn; + QPushButton* mApplyBtn; + QPushButton* mCancelBtn; + + Settings* mSettings; + + bool mSuppressSlots; + +}; + +#endif // PREFDIALOG_H diff --git a/plugins/ColorCode_plugin/prefdialog.ui b/plugins/ColorCode_plugin/prefdialog.ui new file mode 100644 index 000000000..85760d0d0 --- /dev/null +++ b/plugins/ColorCode_plugin/prefdialog.ui @@ -0,0 +1,434 @@ + + + PrefDialog + + + Qt::ApplicationModal + + + + 0 + 0 + 500 + 400 + + + + Preferences + + + + :/img/configure.png:/img/configure.png + + + true + + + + + + 1 + + + + Appearance + + + + + 10 + 10 + 451 + 118 + + + + + + + Controls + + + + + + + 0 + 0 + + + + Show or hide the Menubar. + + + Show Menubar + + + + + + + + 0 + 0 + + + + Show or hide the Toolbar. + + + Show Toolbar + + + + + + + + 0 + 0 + + + + Show or hide the Statusbar. + + + Show Statusbar + + + + + + + + + 10 + 140 + 451 + 171 + + + + Indicators + + + + + + + 0 + 0 + + + + If this option is checked, an indicator +inside each peg is displayed. + + + Show Indicators inside pegs + + + + + + + 30 + + + + + + 0 + 0 + + + + Use unique letters as indicators. + + + Letter Indicators + + + + + + + + 0 + 0 + + + + Use unique numbers as indicators. + + + Number Indicators + + + + + + + + 0 + 0 + + + + Use the same neutral background color for each peg, +when indicators are shown. + + + Hide Colors + + + + + + + + + + 0 + 0 + + + + Click here if you have changed the color order +and now you want to revert it to it's initial state. + + + Reset Color Order + + + + + + + + + Game Settings + + + + + 8 + 13 + 461 + 301 + + + + + + + Level Presets + + + + + + + Select from predefined combinations +of the three different level related settings, +the number of colors, the number of slots (columns) +and the possibility of pegs of the same color in one row. + + + + + + + Number of Slots + + + + + + + Number of Colors + + + + + + + Number of pegs in a single row. +Higher values are harder to guess. + + + + + + + Number of all possible colors. +Higher values are harder to guess. + + + + + + + If this option is checked, the hidden combination +may contain one or more (even all would be possible) +pegs of the same color. +If checked, the combination is generally harder to guess. + + + Allow Pegs of Same Color + + + + + + + Qt::Horizontal + + + + + + + Game Mode + + + + + + + Select from the different game modes. +In the 1. mode you have to to guess the hidden, +computer generated combination, +In the 2. mode your computer will try to guess your +own secret combination. + + + + + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + If checked, a row is closed as soon as you place the last peg +and your guess is submitted immediatly. +This option only affects the Human vs. Computer game mode. + + + Close Rows when the last Peg is placed + + + + + + + + 0 + 0 + + + + If checked, the computer will determine the corresponding hints for the solver's guess. +This option affects only Computer vs. Human games. +If checked, you only have to place your secret combination. +Then the rest of the game runs automatically until the end. +But you can set a delay between the guesses. + + + Set Hints automatically + + + + + + + + 0 + 0 + + + + Adjust the delay (in ms) between two guesses. + + + + + + + Delay in ms + + + + + + + Qt::Horizontal + + + + + + + Solver Strength + + + + + + + Select from 3 different strength levels for your computer opponent. +This option only affects the Computer vs. Human game mode. +For the computer's guess in the Human vs. Computer mode +always the highest level will be used. + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults + + + + + + + + + + + + 10 + + + 10 + + + true + + + true + + + true + + + diff --git a/plugins/ColorCode_plugin/resource.qrc b/plugins/ColorCode_plugin/resource.qrc index ccfb7d0ab..14ef5fa7d 100644 --- a/plugins/ColorCode_plugin/resource.qrc +++ b/plugins/ColorCode_plugin/resource.qrc @@ -11,7 +11,6 @@ img/qt.png img/story-editor.png img/view-refresh.png - img/bm03.png trans_de.qm img/face-sad.png img/edit-clear.png @@ -26,5 +25,9 @@ img/same_color_0.png img/same_color_1.png img/help.png + img/icon_female16.png + img/configure.png + trans_fr.qm + trans_hu.qm diff --git a/plugins/ColorCode_plugin/rowhint.cpp b/plugins/ColorCode_plugin/rowhint.cpp index ef28ba69b..ee94ad511 100644 --- a/plugins/ColorCode_plugin/rowhint.cpp +++ b/plugins/ColorCode_plugin/rowhint.cpp @@ -69,7 +69,7 @@ RowHint::RowHint(QObject*) grad.setColorAt(1, QColor(255, 255, 255, 51)); mBrush0 = QBrush(grad); - Reset(0); + Reset(0, 0); } RowHint::~RowHint() @@ -77,12 +77,14 @@ RowHint::~RowHint() scene()->removeItem(this); } -void RowHint::Reset(const int pegcnt) +void RowHint::Reset(const int pegcnt, const int gamemode) { mActive = true; - mHints.clear(); mSolved = false; SetPegCnt(pegcnt); + mHints.clear(); + mHints.assign(mPegCnt, 0); + SetGameMode(gamemode); SetActive(false); } @@ -101,6 +103,16 @@ void RowHint::SetPegCnt(const int pegcnt) mPegCnt = pegcnt; } +void RowHint::SetGameMode(const int gamemode) +{ + mGameMode = gamemode; +} + +bool RowHint::IsActive() const +{ + return mActive; +} + void RowHint::SetActive(bool b) { if (b == mActive) @@ -113,42 +125,83 @@ void RowHint::SetActive(bool b) setEnabled(b); if (b) { - setCursor(Qt::PointingHandCursor); - setToolTip(tr("Commit Your solution")); + if (mGameMode == ColorCode::MODE_HVM) + { + setCursor(Qt::PointingHandCursor); + setToolTip(tr("Commit Your solution")); + } + else if (mGameMode == ColorCode::MODE_MVH) + { + mSolved = true; + mHints.assign(mPegCnt, 0); + setCursor(Qt::ArrowCursor); + setToolTip(tr("Click the circles to rate my guess.\nHit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-)")); + } } else { setCursor(Qt::ArrowCursor); setToolTip(QString("")); } - update(boundingRect()); } +std::vector RowHint::GetHints() +{ + return mHints; +} + void RowHint::DrawHints(std::vector res) { - mHints = res; + mHints.clear(); + mHints.assign(mPegCnt, 0); + for (unsigned i = 0; i < res.size(); ++i) + { + mHints.at(i) = res.at(i); + } mSolved = true; - update(boundingRect()); } -void RowHint::mousePressEvent(QGraphicsSceneMouseEvent *e) +void RowHint::mousePressEvent(QGraphicsSceneMouseEvent* e) { - bool disabled = false; - if (mActive && !mSolved) + if (mGameMode == ColorCode::MODE_HVM) { - if (e->button() == Qt::LeftButton) + bool disabled = false; + if (mActive && !mSolved) { - SetActive(false); - emit HintPressedSignal(mIx); - disabled = true; + if (e->button() == Qt::LeftButton) + { + SetActive(false); + emit HintPressedSignal(mIx); + disabled = true; + } + } + + if (!disabled) + { + QGraphicsItem::mousePressEvent(e); } } - - if (!disabled) + else if (mGameMode == ColorCode::MODE_MVH) { - QGraphicsItem::mousePressEvent(e); + qreal xm = e->pos().x(); + qreal ym = e->pos().y(); + + int posix = mPegCnt - 2; + for (int i = 0; i < mPegCnt; i++) + { + if ( xm >= mPegPos[posix][i][0] && xm <= mPegPos[posix][i][0] + mPegPos[posix][i][2] + && ym >= mPegPos[posix][i][1] && ym <= mPegPos[posix][i][1] + mPegPos[posix][i][2]) + { + ++mHints.at(i); + if (mHints.at(i) > 2) + { + mHints.at(i) = 0; + } + } + } + update(boundingRect()); } } @@ -238,7 +291,11 @@ void RowHint::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option* painter->setPen(Qt::NoPen); for (unsigned i = 0; i < mHints.size(); i++) { - x0 = QPointF(mPegPos[posix][i][0], mPegPos[posix][i][1]); + if (mHints.at(i) == 0) + { + continue; + } + if (mHints.at(i) == 2) { painter->setBrush(QBrush(Qt::black)); diff --git a/plugins/ColorCode_plugin/rowhint.h b/plugins/ColorCode_plugin/rowhint.h index d62310b00..4a8ab3be5 100644 --- a/plugins/ColorCode_plugin/rowhint.h +++ b/plugins/ColorCode_plugin/rowhint.h @@ -41,11 +41,14 @@ public: std::vector mHints; int GetIx() const; + bool IsActive() const; + std::vector GetHints(); void SetIx(const int ix); void SetPegCnt(const int pegcnt); + void SetGameMode(const int gamemode); void SetActive(bool b); void DrawHints(std::vector res); - void Reset(const int pegcnt); + void Reset(const int pegcnt, const int gamemode); void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); QRectF boundingRect() const; @@ -61,6 +64,7 @@ private: static const int mPegPos[4][5][3]; int mPegCnt; + int mGameMode; QPen mPen; QBrush mBrush0; diff --git a/plugins/ColorCode_plugin/settings.cpp b/plugins/ColorCode_plugin/settings.cpp new file mode 100644 index 000000000..13d6f5276 --- /dev/null +++ b/plugins/ColorCode_plugin/settings.cpp @@ -0,0 +1,213 @@ +/* ColorCode, a free MasterMind clone with built in solver + * Copyright (C) 2009 Dirk Laebisch + * http://www.laebisch.com/ + * + * ColorCode is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ColorCode is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ColorCode. If not, see . +*/ + +#include "settings.h" +#include "colorcode.h" +#include "ccsolver.h" + +using namespace std; + +const int Settings::INDICATOR_LETTER = 0; +const int Settings::INDICATOR_NUMBER = 1; + +Settings::Settings() +{ + mSettings.setDefaultFormat(QSettings::IniFormat); + mSettings.setFallbacksEnabled(false); + + InitSettings(); + SaveSettingsMap(mDefMap); + ReadSettings(); + SaveSettingsMap(mLastMap); +} + +Settings::~Settings() +{ +} + +void Settings::InitSettings() +{ + mShowToolBar = true; + mShowMenuBar = true; + mShowStatusBar = true; + + mShowIndicators = false; + mIndicatorType = INDICATOR_LETTER; + + mHideColors = false; + + mPegCnt = 4; + mColorCnt = 8; + mSameColors = true; + mGameMode = ColorCode::MODE_HVM; + mAutoClose = false; + mAutoHints = false; + mHintsDelay = 500; + + mSolverStrength = CCSolver::STRENGTH_HIGH; +} + +void Settings::SaveLastSettings() +{ + SaveSettingsMap(mLastMap); +} + +void Settings::RestoreLastSettings() +{ + RestoreSettingsMap(mLastMap); +} + +void Settings::RestoreDefSettings() +{ + RestoreSettingsMap(mDefMap); +} + +void Settings::RestoreSettingsMap(QMap &map) +{ + mShowToolBar = map["ShowToolBar"].toBool(); + mShowMenuBar = map["ShowMenuBar"].toBool(); + mShowStatusBar = map["ShowStatusBar"].toBool(); + + mShowIndicators = map["ShowIndicators"].toBool(); + mIndicatorType = map["IndicatorType"].toInt(); + mHideColors = map["HideColors"].toBool(); + + mPegCnt = map["ColumnCount"].toInt(); + mColorCnt = map["ColorCount"].toInt(); + mSameColors = map["SameColors"].toBool(); + + mGameMode = map["GameMode"].toInt(); + mAutoClose = map["AutoClose"].toBool(); + mAutoHints = map["AutoHints"].toBool(); + mHintsDelay = map["HintsDelay"].toInt(); + + mSolverStrength = map["SolverStrength"].toInt(); + Validate(); +} + +void Settings::SaveSettingsMap(QMap &map) +{ + map["ShowToolBar"] = mShowToolBar; + map["ShowMenuBar"] = mShowMenuBar; + map["ShowStatusBar"] = mShowStatusBar; + + map["ShowIndicators"] = mShowIndicators; + map["IndicatorType"] = mIndicatorType; + map["HideColors"] = mHideColors; + + map["ColumnCount"] = mPegCnt; + map["ColorCount"] = mColorCnt; + map["SameColors"] = mSameColors; + + map["GameMode"] = mGameMode; + map["AutoClose"] = mAutoClose; + map["AutoHints"] = mAutoHints; + map["HintsDelay"] = mHintsDelay; + + map["SolverStrength"] = mSolverStrength; +} + +void Settings::ReadSettings() +{ + mSettings.beginGroup("Appearance"); + mShowToolBar = mSettings.value("ShowToolBar", mShowToolBar).toBool(); + mShowMenuBar = mSettings.value("ShowMenuBar", mShowMenuBar).toBool(); + mShowStatusBar = mSettings.value("ShowStatusBar", mShowStatusBar).toBool(); + + mShowIndicators = mSettings.value("ShowIndicators", mShowIndicators).toBool(); + mIndicatorType = mSettings.value("IndicatorType", mIndicatorType).toInt(); + mHideColors = mSettings.value("HideColors", mHideColors).toBool(); + mSettings.endGroup(); + + mSettings.beginGroup("Game"); + mPegCnt = mSettings.value("ColumnCount", mPegCnt).toInt(); + mColorCnt = mSettings.value("ColorCount", mColorCnt).toInt(); + mSameColors = mSettings.value("SameColors", mSameColors).toBool(); + + mGameMode = mSettings.value("GameMode", mGameMode).toInt(); + mAutoClose = mSettings.value("AutoClose", mAutoClose).toBool(); + mAutoHints = mSettings.value("AutoHints", mAutoHints).toBool(); + mHintsDelay = mSettings.value("HintsDelay", mHintsDelay).toInt(); + + mSolverStrength = mSettings.value("SolverStrength", mSolverStrength).toInt(); + + mSettings.endGroup(); + Validate(); +} + +void Settings::Validate() +{ + if (mIndicatorType != INDICATOR_LETTER && mIndicatorType != INDICATOR_NUMBER) + { + mIndicatorType = INDICATOR_LETTER; + } + if (mPegCnt < 2 || mPegCnt > 5) + { + mPegCnt = 4; + } + if (mColorCnt < 2 || mColorCnt > 10) + { + mColorCnt = 8; + } + if (mGameMode != ColorCode::MODE_HVM && mGameMode != ColorCode::MODE_MVH) + { + mGameMode = ColorCode::MODE_HVM; + } + if (mSolverStrength < CCSolver::STRENGTH_LOW || mSolverStrength > CCSolver::STRENGTH_HIGH) + { + mSolverStrength = CCSolver::STRENGTH_HIGH; + } + if (mHintsDelay > 10000) + { + mHintsDelay = 10000; + } + else if (mHintsDelay < 0) + { + mHintsDelay = 0; + } +} + +void Settings::WriteSettings() +{ + mSettings.beginGroup("Appearance"); + mSettings.setValue("ShowToolBar", mShowToolBar); + mSettings.setValue("ShowMenuBar", mShowMenuBar); + mSettings.setValue("ShowStatusBar", mShowStatusBar); + + mSettings.setValue("ShowIndicators", mShowIndicators); + mSettings.setValue("IndicatorType", mIndicatorType); + mSettings.setValue("HideColors", mHideColors); + mSettings.endGroup(); + + mSettings.beginGroup("Game"); + mSettings.setValue("ColumnCount", mPegCnt); + mSettings.setValue("ColorCount", mColorCnt); + mSettings.setValue("SameColors", mSameColors); + + mSettings.setValue("GameMode", mGameMode); + mSettings.setValue("AutoClose", mAutoClose); + mSettings.setValue("AutoHints", mAutoHints); + mSettings.setValue("HintsDelay", mHintsDelay); + + mSettings.setValue("SolverStrength", mSolverStrength); + mSettings.endGroup(); + + mSettings.sync(); +} + + diff --git a/plugins/ColorCode_plugin/settings.h b/plugins/ColorCode_plugin/settings.h new file mode 100644 index 000000000..c3738a448 --- /dev/null +++ b/plugins/ColorCode_plugin/settings.h @@ -0,0 +1,67 @@ +/* ColorCode, a free MasterMind clone with built in solver + * Copyright (C) 2009 Dirk Laebisch + * http://www.laebisch.com/ + * + * ColorCode is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ColorCode is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ColorCode. If not, see . +*/ + +#ifndef SETTINGS_H +#define SETTINGS_H + +#include +#include + +class Settings +{ + public: + Settings(); + ~Settings(); + + static const int INDICATOR_LETTER; + static const int INDICATOR_NUMBER; + + void InitSettings(); + void ReadSettings(); + void Validate(); + void SaveLastSettings(); + void RestoreLastSettings(); + void RestoreDefSettings(); + void WriteSettings(); + + QSettings mSettings; + + bool mShowToolBar; + bool mShowMenuBar; + bool mShowStatusBar; + bool mShowIndicators; + int mIndicatorType; + bool mHideColors; + + int mPegCnt; + int mColorCnt; + bool mSameColors; + int mGameMode; + bool mAutoClose; + bool mAutoHints; + int mSolverStrength; + int mHintsDelay; + + private: + void RestoreSettingsMap(QMap &map); + void SaveSettingsMap(QMap &map); + QMap mDefMap; + QMap mLastMap; +}; + +#endif // SETTINGS_H diff --git a/plugins/ColorCode_plugin/solutionrow.cpp b/plugins/ColorCode_plugin/solutionrow.cpp new file mode 100644 index 000000000..217007376 --- /dev/null +++ b/plugins/ColorCode_plugin/solutionrow.cpp @@ -0,0 +1,100 @@ +/* ColorCode, a free MasterMind clone with built in solver + * Copyright (C) 2009 Dirk Laebisch + * http://www.laebisch.com/ + * + * ColorCode is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ColorCode is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ColorCode. If not, see . +*/ + +#include +#include "solutionrow.h" + +using namespace std; + +SolutionRow::SolutionRow(QObject*) +{ + setCacheMode(QGraphicsItem::DeviceCoordinateCache); + InitGraphics(); +} + +SolutionRow::~SolutionRow() +{ +} + +void SolutionRow::InitGraphics() +{ + mRect = QRectF(0.5, 0.5, 219, 39); + mRectC = QRectF(2, 2, 216, 36); + + QLinearGradient solgrad(0, 0, 0, 40); + solgrad.setColorAt(0.0, QColor("#9fa0a2")); + solgrad.setColorAt(1.0, QColor("#8c8d8f")); + mBgBrush = QBrush(solgrad); + + QLinearGradient framegrad(0, 0, 0, 40); + framegrad.setColorAt(0.0, QColor("#4e4f51")); + framegrad.setColorAt(1.0, QColor("#ebecee")); + mFramePen = QPen(QBrush(framegrad), 1); + + mFont = QFont("Arial", 22, QFont::Bold, false); + mFont.setStyleHint(QFont::SansSerif); +} + +void SolutionRow::SetXOffs() +{ + mXOffs = 110 - mPegCnt * 20; +} + +QRectF SolutionRow::boundingRect() const +{ + const double margin = 0.5; + return mRect.adjusted(-margin, -margin, 2 * margin, 2 * margin); +} + +void SolutionRow::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget* /* widget */) +{ + if (mPegCnt == 0) + { + return; + } + + int i; + painter->setBrush(mBgBrush); + painter->setPen(mFramePen); + painter->drawRoundedRect(mRect, 20, 20); + + QPainterPath cpath; + cpath.addRoundedRect(mRectC, 19, 19); + painter->setClipPath(cpath); + + painter->setRenderHint(QPainter::TextAntialiasing, true); + + int x0 = (220 - mPegCnt * 40) / 2; + int xpos; + for (i = 0; i <= mPegCnt; ++i) + { + xpos = x0 + i * 40; + painter->setPen(Qt::NoPen); + painter->setBrush(QBrush(QColor(0x7d, 0x7e, 0x80, 0x80))); + painter->drawRect(xpos - 1, 1, 1, 38); + painter->setBrush(QBrush(QColor(0xc3, 0xc4, 0xc6, 0x80))); + painter->drawRect(xpos, 1, 1, 38); + + if (i < mPegCnt) + { + painter->setPen(QPen(QColor("#ff9933"))); + painter->setFont(mFont); + painter->drawText(QRectF(xpos + 3.0, 3.0, 34.0, 34.0), Qt::AlignCenter, QString('?')); + } + } +} diff --git a/plugins/ColorCode_plugin/solutionrow.h b/plugins/ColorCode_plugin/solutionrow.h new file mode 100644 index 000000000..7c7787f2c --- /dev/null +++ b/plugins/ColorCode_plugin/solutionrow.h @@ -0,0 +1,50 @@ +/* ColorCode, a free MasterMind clone with built in solver + * Copyright (C) 2009 Dirk Laebisch + * http://www.laebisch.com/ + * + * ColorCode is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ColorCode is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ColorCode. If not, see . +*/ + +#ifndef SOLUTIONROW_H +#define SOLUTIONROW_H + +#include +#include +#include +#include "pegrow.h" + +class SolutionRow : public PegRow +{ + +public: + SolutionRow(QObject* parent = 0); + ~SolutionRow(); + + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); + QRectF boundingRect() const; + +protected: + void SetXOffs(); + +private: + void InitGraphics(); + + QRectF mRect; + QRectF mRectC; + QBrush mBgBrush; + QPen mFramePen; + QFont mFont; +}; + +#endif // SOLUTIONROW_H diff --git a/plugins/ColorCode_plugin/trans_cs.qm b/plugins/ColorCode_plugin/trans_cs.qm index d85cf53ccbfdfd037bdfd9a8b1e41981de3537a1..6cb548ce1adc7351de79ee152cff201b66572619 100644 GIT binary patch literal 20137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ad1a73ab..c467b8119 100644 --- a/plugins/ColorCode_plugin/trans_cs.ts +++ b/plugins/ColorCode_plugin/trans_cs.ts @@ -14,11 +14,11 @@ &License - &Licence + &Povolení A needful game to train your brain ;-) - Hra pro udržení bdělosti <br>vašeho mozku ;-) + Hra potřebná pro udržení bdělosti <br>vašeho mozku :-) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -34,7 +34,7 @@ <br><br>Free MasterMind clone including a built in,<br>rather intelligent solver. - <br><br>Klon Freie MasterMind s vestavěným<br>celkem schopným řešitelem. + <br><br>Klon Free MasterMind s vestavěným<br>celkem schopným řešitelem. Version @@ -67,7 +67,7 @@ a začít novou? Ctrl+N - + Ctrl+N &Restart Game @@ -75,7 +75,7 @@ a začít novou? Ctrl+R - + Ctrl+R E&xit @@ -83,19 +83,19 @@ a začít novou? Ctrl+Q - + Ctrl+Q Ctrl+T - + Ctrl+T Ctrl+C - + Ctrl+C Ctrl+A - + Ctrl+A About &Qt @@ -141,11 +141,11 @@ Chcete vzdát nynější hru a začít novou? Ctrl+I - + Ctrl+I Give In - Vzdát + Vzdát se Do you really want to give in? @@ -157,7 +157,7 @@ Chcete vzdát nynější hru a začít novou? Ctrl+G - + Ctrl+G Sure, You're too weak for me! @@ -165,11 +165,11 @@ Chcete vzdát nynější hru a začít novou? Ctrl+Shift+R - + Ctrl+Shift+R Ctrl+Shift+C - + Ctrl+Shift+C Fill Row by Random @@ -181,7 +181,7 @@ Chcete vzdát nynější hru a začít novou? Ctrl+D - + Ctrl+D Clear Row @@ -201,31 +201,19 @@ Chcete vzdát nynější hru a začít novou? Ctrl+M - + Ctrl+M Ctrl+S - - - - Easy - 6 Colors - Lehká - 6 barev - - - Medium - 8 Colors - Střední - 8 barev - - - Hard - 10 Colors - Těžká - 10 barev + Ctrl+S Show Toolbar - Ukázat nástrojovou lištu + Ukázat nástrojový pruh Show Menubar - Ukázat lištu s hlavní nabídkou + Ukázat pruh s hlavní nabídkou Show Statusbar @@ -235,25 +223,21 @@ Chcete vzdát nynější hru a začít novou? Allow Pegs of the Same Color Povolit kameny se stejnou barvou - - Close Rows when the 4th Peg is placed - Vyhodnotit řádky po umístění čtyř kamenů - Level - Úroveň + Stupeň obtížnosti Computer's Guess - Nechte svůj počítač hádat + Nechat počítač hádat Ctrl+H - + Ctrl+H Press the Hint Field or Key Enter if You're done. - Hotovo? Potom klepněte na pole s radou. + Pokud jste hotov, klepněte na pole s radou. Disallow Pegs of the Same Color @@ -261,7 +245,7 @@ Chcete vzdát nynější hru a začít novou? Close Rows when the last Peg is placed - Vyhodnotit řádky po umístění posledního kamene + Zavřít řádky po umístění posledního kamene Ctrl+L @@ -269,23 +253,23 @@ Chcete vzdát nynější hru a začít novou? Beginner (2 Colors, 2 Slots, Doubles) - Začátečník (2 barvy, 2 místa, zdvojení) + Začátečník (2 barvy, 2 pole, zdvojení) Easy (4 Colors, 3 Slots, No Doubles) - Lehká (4 barvy, 3 místa, bez zdvojení) + Lehká hra (4 barvy, 3 pole, bez zdvojení) Classic (6 Colors, 4 Slots, Doubles) - Klasická (6 barev, 4 místa, zdvojení) + Klasická hra (6 barev, 4 pole, zdvojení) Challenging (8 Colors, 4 Slots, Doubles) - Náročná (8 barev, 4 místa, zdvojení) + Náročná hra (8 barev, 4 pole, zdvojení) Hard (10 Colors, 5 Slots, Doubles) - Těžká (10 barev, 5 míst, zdvojení) + Těžká hra (10 barev, 5 polí, zdvojení) Level Presets @@ -293,15 +277,15 @@ Chcete vzdát nynější hru a začít novou? Colors - Barvy + barev Pegs of Same Color - Kameny se stejnou barvou + Kameny téže barvy Slots - Místa + pole Yes @@ -315,10 +299,6 @@ Chcete vzdát nynější hru a začít novou? Reset Color Order Znovu nastavit pořadí barev - - Show Letter Indicators - Ukázat ukazatele písmen - Ctrl+Shift+L Ctrl+Shift+L @@ -331,6 +311,345 @@ Chcete vzdát nynější hru a začít novou? F1 F1 + + Done + Hotovo + + + Ctrl+Shift+N + Ctrl+Shift+N + + + Rate it for me + Ohodnoť to pro mě + + + Human vs Computer + Člověk proti počítači + + + Computer vs Human + Počítač proti člověku + + + Game Mode + Herní režim + + + Press the button below or Key Enter if You're done. + Pokud jste hotov, použijte tlačítko dole nebo klávesu Enter. + + + Place Your secret ColorCode ... + Umístěte svůj tajný ColorCode... + + + Please rate the guess. Press OK or Key Enter if You're done. + Ohodnoťte, prosím, můj návrh. Pokud jste hotov, použijte tlačítko OK nebo klávesu Enter. + + + The impossible happened, sorry. + Bohužel se stalo nemožné. + + + Yeah! I guessed it, man! + Jo! Já to tušil! + + + Embarrassing! I lost a game! + Trapné! Já tu hru ztratil! + + + Nope! Thats impossible! Did you gave me false hints? + Ne! To není možné! Dal jste mi špatné rady? + + + Don't you like to see me winning? ;-) + Nelíbí se vám, když vyhrávám? :-) + + + Set Hints automatically + Nastavit rady automaticky + + + Ctrl+Shift+H + Ctrl+Shift+H + + + Preferences + Nastavení + + + Ctrl+P + Ctrl+P + + + Show Indicators + Ukázat ukazatele + + + The chosen settings do not allow pegs of the same color! + Zvolená nastavení nedovolují kameny stejné barvy. + + + + PrefDialog + + ... Select from predefined level settings + ... Vybrat stupeň obtížnosti + + + Beginner (2 Colors, 2 Slots, Doubles) + Začátečník (2 barvy, 2 pole, zdvojení) + + + Easy (4 Colors, 3 Slots, No Doubles) + Lehká hra (4 barvy, 3 pole, bez zdvojení) + + + Classic (6 Colors, 4 Slots, Doubles) + Klasická hra (6 barev, 4 pole, zdvojení) + + + Challenging (8 Colors, 4 Slots, Doubles) + Náročná hra (8 barev, 4 pole, zdvojení) + + + Hard (10 Colors, 5 Slots, Doubles) + Těžká hra (10 barev, 5 polí, zdvojení) + + + Slots + pole + + + Colors + barev + + + Human vs. Computer + Člověk proti počítači + + + Computer vs. Human + Člověk proti počítači + + + Low + Nízká + + + Medium + Střední + + + High + Vysoká + + + Preferences + Nastavení + + + Appearance + Vzhled + + + Controls + Ovládací prvky + + + Show or hide the Menubar. + Ukázat nebo skrýt pruh s hlavní nabídkou. + + + Show Menubar + Ukázat pruh s hlavní nabídkou + + + Show or hide the Toolbar. + Ukázat nebo skrýt nástrojový pruh. + + + Show Toolbar + Ukázat nástrojový pruh + + + Show or hide the Statusbar. + Ukázat nebo skrýt stavový pruh. + + + Show Statusbar + Ukázat stavový pruh + + + Indicators + Ukazatelé + + + If this option is checked, an indicator +inside each peg is displayed. + Když je zapnuta tato volba, je u každého +kamene zobrazen dodatečný ukazatel. + + + Show Indicators inside pegs + Ukázat dodatečné ukazatele pro kameny + + + Use unique letters as indicators. + Použít písmena jako ukazatele. + + + Letter Indicators + Písmenní ukazatelé + + + Use unique numbers as indicators. + Použít čísla jako ukazatele. + + + Number Indicators + Číselní ukazatelé + + + Use the same neutral background color for each peg, +when indicators are shown. + Pro všechny kameny použít, v případě že jsou zobrazováni ukazatelé, +stejnou nenápadnou barvu pozadí. + + + Hide Colors + Skrýt barvy + + + Click here if you have changed the color order +and now you want to revert it to it's initial state. + Klepněte sem, pokud jste změnil pořadí barev, +a nyní to chcete vrátit do počátečního stavu. + + + Reset Color Order + Znovu nastavit pořadí barev + + + Game Settings + Herní nastavení + + + Level Presets + Přednastavení stupně obtížnosti + + + Select from predefined combinations +of the three different level related settings, +the number of colors, the number of slots (columns) +and the possibility of pegs of the same color in one row. + Vyberte z přednastavených spojení tří různých +nastavení souvisejících se stupni obtížnosti: +počet barev, počet polí (sloupců) a možnost +kamenů stejné barvy v jednom řádku. + + + Number of Slots + Počet polí + + + Number of Colors + Počet barev + + + Number of pegs in a single row. +Higher values are harder to guess. + Počet kamenů v jednom řádku. +Vyšší hodnoty je těžší uhodnout. + + + Number of all possible colors. +Higher values are harder to guess. + Celkový počet všech možných barev. +Vyšší hodnoty je těžší uhodnout. + + + If this option is checked, the hidden combination +may contain one or more (even all would be possible) +pegs of the same color. +If checked, the combination is generally harder to guess. + Když je zapnuta tato volba, skryté spojení může +obsahovat jeden nebo více kamenů stejné barvy +(dokonce je možné, že všechny). +Je-li zaškrtnuto, je spojení obecně obtížněji uhodnutelné. + + + Allow Pegs of Same Color + Povolit kameny téže barvy + + + Game Mode + Herní režim + + + Select from the different game modes. +In the 1. mode you have to to guess the hidden, +computer generated combination, +In the 2. mode your computer will try to guess your +own secret combination. + Vyberte z různých herních režimů. +V prvním režimu musíte uhodnout skryté, +počítačem vytvořené spojení. +Ve druhém režimu se počítač pokusí uhodnout +vaše vlastní tajné spojení. + + + If checked, a row is closed as soon as you place the last peg +and your guess is submitted immediatly. +This option only affects the Human vs. Computer game mode. + Když je zapnuta tato volba, je řádek uzavřen, jakmile umístíte poslední kámen +a váš herní tah je okamžitě vyhodnocen. +Tato volba účinkuje pouze v herním režimu, kdy hraje člověk proti počítači. + + + Close Rows when the last Peg is placed + Zavřít řádky po umístění posledního kamene + + + If checked, the computer will determine the corresponding hints for the solver's guess. +This option affects only Computer vs. Human games. +If checked, you only have to place your secret combination. +Then the rest of the game runs automatically until the end. +But you can set a delay between the guesses. + Je-li zapnuta tato volba, budou automaticky vyplněna pole s ödpovídajícími radami pro odhad počítače. +Tato volba účinkuje pouze při hře počítače proti člověku. +Je-li zaškrtnuta, musíte pouze umístit své tajné spojení. +Pak běží zbytek hry automaticky až do konce. +Ovšem mezi herními tahy můžete nastavit zpoždění. + + + Set Hints automatically + Nastavit rady automaticky + + + Adjust the delay (in ms) between two guesses. + Upravit zpoždění v milisekundách mezi dvěma herními tahy. + + + Delay in ms + Zpoždění v ms + + + Solver Strength + Síla počítače + + + Select from 3 different strength levels for your computer opponent. +This option only affects the Computer vs. Human game mode. +For the computer's guess in the Human vs. Computer mode +always the highest level will be used. + Vyberte jednu ze tří různých herních sil pro vašeho počítačového protivníka. +Tato volba účinkuje pouze v herním režimu, kdy hraje počítač proti člověku. +Pro počítačův herní tah v režimu, kdy hraje člověk proti počítači se vždy použije +nejvyšší úroveň herní síly. + RowHint @@ -338,6 +657,11 @@ Chcete vzdát nynější hru a začít novou? Commit Your solution Vyzkoušet své řešení + + Click the circles to rate my guess. +Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-) + Klepněte na kruhy pro vyhodnocení mého herního tahu. +Stiskněte Ctrl+H nebo odpovídající tlačítko v nástrojovém pruhu, abyste přenesl onu záležitost s vyhodnocením na tu moji část, která je v tomto případě zcela nestranná. :-) + - diff --git a/plugins/ColorCode_plugin/trans_de.qm b/plugins/ColorCode_plugin/trans_de.qm index 35f15747f5f1014c20fa996821657cb2c160b04b..26fc1a7a28efe5154d19d78427ec6c79a2f39e54 100644 GIT binary patch literal 20409 zcmd5^3veA*c|Lkrmab*lah${fCt1G~*_IU?JI=$NBzoDh<5w();Iuqex~qF{ymwdG z-D}034s<#|0|No4P=+aO1JlVspc4pF8p0#fFf=7lCWN6t+XUK%P9GV<`_T!c-*^5! zyL;Cw`I>|Y_DJXM-m~ZY=Rg1B`~UN=c0E*H_4soic<(>1S^dZxKKQw(MwIIOFn&%e zwekj~79CRRqG6>bD@t9xUa8lAL8*1`RPCR}_2N~k^HbwWt$2;<{MJ?I|7q3v+_#h( zJgvI^?{!Lb^{SQs`?ON~KA<-7`>suD)3dKadra;4?37Z=yVaiWbmI9Rs3TwbtWpM5`!WCOC#1dZGwtD?rPl9i|JcyCm1?`a{edT zkCyu2Pp$ozk8My&ZRyx>`4RO0ZpX}XUsS5SA?=d)cX$tdP^t4j)6uvK{Z@WY+Rd9f z-u6SR_v*KF-2KZxQEJDDj{BbYwNh97LC4>ce;0qUGUsr16%Uu`rVBNd-bzS$hCzZP7r_zoNcm3WySl6cZuEuMz?-%@A*Q0NL z0rKjzH%-0%US%5#~y^dj7vLu z&*ER)aj#OBAMW0;6wmGXVfT&?J_~t%TlcPyeP5}a>$-2~1KlfM-#u}274)d?UtI_K z);-wMyBYF-$%lGw9eYG6Yh90HgWikR_qaCr+Wp#|kKFq-wEA1$zPz~oxSh*I{10fqTcuX z3T@Y2z3&^sJU4u^_u=P4tZ#Skm+r-S7d_Sc)T13rz2bAyUN^UN>l2WZby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bL#S%Pf;qMVHCmTZaE zJU-Etmnqwkt?+PK;aFN>huvw-@S6yBX6a__N)JBj2yp|PcO2n()8cN9pIGc!k+SpT zvnxU?WCYQJK6*zbl+#%aiPcp&T$YV~Wv^5&RZ9(#P$a6P>r46VT>t0ui#R@&ztWSg z=f;+#R-9C$_w-hyazSyqwb>sHkmBmf?2<{#ZuWBNGPcxNkY$)Q8YM=DjL^O2H4Ci^ zZEbQO*#9&&ugTtvq{W2d9b} zIj$>ib)`F!&_zF;2x;#mr6}9e>}2m1+qk-^;%7PDAbout ColorCode Info ColorCode + + <br><br>Free MasterMind clone including a built in,<br>rather intelligent solver. + <br><br>Freie MasterMind-Variante mit ziemlich <br>intelligentem Rechner-Spieler. + + + Version + Version + + + Author + Autor + - MainWindow + ColorCode New Game Neues Spiel @@ -81,10 +93,6 @@ ein neues Spiel beginnen? Ctrl+C - - Ctrl+4 - - Ctrl+A @@ -119,10 +127,6 @@ Do you want to give in the current and start a new Game? Die geänderten Einstellungen werden erst in neuen Spielen berücksichtigt! Möchten Sie das gegenwärtige Spiel aufgeben und ein neues Spiel beginnen? - - Press the Hint Field if You're done. - Fertig? Dann klicken Sie auf das Hinweis-Feld. - Place Your pegs ... Setzen Sie Ihre Steine ... @@ -203,21 +207,9 @@ Möchten Sie das gegenwärtige Spiel aufgeben und ein neues Spiel beginnen?Ctrl+S - - Easy - 6 Colors - Leicht - 6 Farben - - - Medium - 8 Colors - Mittel - 8 Farben - - - Hard - 10 Colors - Schwer - 10 Farben - Show Toolbar - Toolbar anzeigen + Werkzeugleiste anzeigen Show Menubar @@ -231,14 +223,430 @@ Möchten Sie das gegenwärtige Spiel aufgeben und ein neues Spiel beginnen?Allow Pegs of the Same Color Steine gleicher Farbe erlauben - - Close Rows when the 4th Peg is placed - Reihen nach Setzen des 4. Steins auswerten - Level Schwierigkeitsgrad + + Computer's Guess + Lassen Sie Ihren Rechner raten + + + Ctrl+H + + + + Press the Hint Field or Key Enter if You're done. + Fertig? Benutzen Sie das Hinweis-Feld oder die Eingabetaste. + + + Disallow Pegs of the Same Color + Keine Steine gleicher Farbe erlauben + + + Close Rows when the last Peg is placed + Reihen nach Setzen des letzten Steins auswerten + + + Ctrl+L + + + + Beginner (2 Colors, 2 Slots, Doubles) + Anfänger (2 Farben, 2 Slots, Doppelte) + + + Easy (4 Colors, 3 Slots, No Doubles) + Leicht (4 Farben, 3 Slots, Keine Doppelten) + + + Classic (6 Colors, 4 Slots, Doubles) + Klassisch (6 Farben, 4 Slots, Doppelte) + + + Challenging (8 Colors, 4 Slots, Doubles) + Fordernd (8 Farben, 4 Slots, Doppelte) + + + Hard (10 Colors, 5 Slots, Doubles) + Schwer (10 Farben, 5 Slots, Doppelte) + + + Level Presets + Schwierigkeitsstufen + + + Colors + Farben + + + Pegs of Same Color + Steine gleicher Farbe + + + Slots + Felder + + + Yes + Ja + + + No + Nein + + + Reset Color Order + Farbreihenfolge zurücksetzen + + + Ctrl+Shift+L + + + + Online &Help + Online-&Hilfe + + + F1 + + + + Done + Fertig + + + Ctrl+Shift+N + + + + Rate it for me + Bewerte für mich + + + Human vs Computer + Mensch gegen Rechner + + + Computer vs Human + Rechner gegen Mensch + + + Game Mode + Spiel Modus + + + Press the button below or Key Enter if You're done. + Fertig? Benutzen Sie den Button oder die Eingabetaste. + + + Place Your secret ColorCode ... + Platzieren Sie den geheimen ColorCode ... + + + Please rate the guess. Press OK or Key Enter if You're done. + Bitte bewerten Sie meinen Vorschlag. Nutzen Sie Ok-Button oder Eingabetaste wenn fertig. + + + The impossible happened, sorry. + Das Unmögliche ist eingetreten, leider. + + + Yeah! I guessed it, man! + Ich hab's geahnt! + + + Embarrassing! I lost a game! + Peinlich! Ich hab ein Spiel verloren! + + + Nope! Thats impossible! Did you gave me false hints? + Nein! Das ist unmöglich! Haben Sie falsch bewertet? + + + Don't you like to see me winning? ;-) + Ertragen Sie es nicht, mich gewinnen zu sehen? ;-) + + + Set Hints automatically + Hinweise automatisch setzen + + + Ctrl+Shift+H + + + + Preferences + Einstellungen + + + Ctrl+P + + + + Show Indicators + Bezeichner anzeigen + + + The chosen settings do not allow pegs of the same color! + Die gewählten Einstellungen erlauben keine Steine gleicher Farbe! + + + + PrefDialog + + ... Select from predefined level settings + ... Schwierigkeitsstufe auswählen + + + Beginner (2 Colors, 2 Slots, Doubles) + Anfänger (2 Farben, 2 Slots, Doppelte) + + + Easy (4 Colors, 3 Slots, No Doubles) + Leicht (4 Farben, 3 Slots, Keine Doppelten) + + + Classic (6 Colors, 4 Slots, Doubles) + Klassisch (6 Farben, 4 Slots, Doppelte) + + + Challenging (8 Colors, 4 Slots, Doubles) + Fordernd (8 Farben, 4 Slots, Doppelte) + + + Hard (10 Colors, 5 Slots, Doubles) + Schwer (10 Farben, 5 Slots, Doppelte) + + + Slots + Felder + + + Colors + Farben + + + Human vs. Computer + Mensch gegen Rechner + + + Computer vs. Human + Rechner gegen Mensch + + + Low + Schwach + + + Medium + Mittel + + + High + Stark + + + Preferences + Einstellungen + + + Appearance + Erscheinungsbild + + + Controls + Bedienelemente + + + Show or hide the Menubar. + Menüleiste anzeigen oder ausblenden. + + + Show Menubar + Menüleiste anzeigen + + + Show or hide the Toolbar. + Werkzeugleiste anzeigen oder ausblenden. + + + Show Toolbar + Werkzeugleiste anzeigen + + + Show or hide the Statusbar. + Statusleiste anzeigen oder ausblenden. + + + Show Statusbar + Statusleiste anzeigen + + + Indicators + Bezeichner + + + If this option is checked, an indicator +inside each peg is displayed. + Wenn diese Option aktiv ist, wird ein +zusätzlicher Bezeichner für jeden Stein angezeigt. + + + Show Indicators inside pegs + Bezeichner für Steine anzeigen + + + Use unique letters as indicators. + Buchstaben als Bezeichner verwenden. + + + Letter Indicators + Buchstaben-Bezeichner + + + Use unique numbers as indicators. + Zahlen als Bezeichner verwenden. + + + Number Indicators + Zahlen-Bezeichner + + + Use the same neutral background color for each peg, +when indicators are shown. + Die gleiche, neutrale Farbe für alle Steine verwenden, +falls Bezeichner angezeigt werden. + + + Hide Colors + Farben ausblenden + + + Click here if you have changed the color order +and now you want to revert it to it's initial state. + Klicken Sie hier, falls Sie die Farben-Anordnung geändert haben, +um diese wieder in den ursprünglichen Zustand zurückzuversetzen. + + + Reset Color Order + Farbreihenfolge zurücksetzen + + + Game Settings + Spiel-Einstellungen + + + Level Presets + Schwierigkeitsstufen + + + Select from predefined combinations +of the three different level related settings, +the number of colors, the number of slots (columns) +and the possibility of pegs of the same color in one row. + Wählen Sie eine vordefinierte Kombination +der drei verschiedenen, den Schwierigkeitsgrad +beeinflussenden Einstellungen. + + + Number of Slots + Anzahl der Felder + + + Number of Colors + Anzahl der Farben + + + Number of pegs in a single row. +Higher values are harder to guess. + Die Anzahl der Steine in einer einzelnen +Reihe. Höhere Werte sind schwerer zu erraten. + + + Number of all possible colors. +Higher values are harder to guess. + Gesamtanzahl der möglichen Farben. +Höhere Werte sind schwerer zu erraten. + + + If this option is checked, the hidden combination +may contain one or more (even all would be possible) +pegs of the same color. +If checked, the combination is generally harder to guess. + Wenn diese Option aktiv ist, können Kombinationen +Steine gleicher Farbe enthalten. Solche Kombinationen +sind etwas schwerer zu erraten. + + + Allow Pegs of Same Color + Steine gleicher Farbe erlauben + + + Game Mode + Spiel Modus + + + Select from the different game modes. +In the 1. mode you have to to guess the hidden, +computer generated combination, +In the 2. mode your computer will try to guess your +own secret combination. + Wählen Sie einen Spiel-Modus aus. +Im 1. Fall müssen Sie versuchen, die verborgene, +rechnergenerierte Kombination zu erraten. +Im 2. Fall wird Ihr Rechner versuchen, eine geheime +Kombination Ihrer Wahl zu erraten. + + + If checked, a row is closed as soon as you place the last peg +and your guess is submitted immediatly. +This option only affects the Human vs. Computer game mode. + Wenn aktiv, wird eine Reihe als geschlossen betrachtet, sobald +Sie den letzten Stein platziert haben, und Ihr Vorschlag wird sofort +ausgewertet. Diese Option hat nur Auswirkungen in Mensch-gegen-Rechner-Spielen. + + + Close Rows when the last Peg is placed + Reihen nach Setzen des letzten Steins auswerten + + + If checked, the computer will determine the corresponding hints for the solver's guess. +This option affects only Computer vs. Human games. +If checked, you only have to place your secret combination. +Then the rest of the game runs automatically until the end. +But you can set a delay between the guesses. + Wenn aktiv, werden die Hinweisfelder zu den Rechner-Schätzungen automatisch ausgefüllt. +Diese Option betrifft nur Rechner-gegen-Mensch-Spiele. +Falls aktiv, müssen Sie nur Ihre geheime Kombination anordnen. Der Rest des Spiels +läuft dann automatisch bis zum Ende ab. Sie können allerdings eine Verzögerung bestimmen. + + + Set Hints automatically + Hinweise automatisch setzen + + + Adjust the delay (in ms) between two guesses. + Verzögerung (in ms) zwischen den Spielzügen. + + + Delay in ms + Verzögerung in ms + + + Solver Strength + Rechner-Stärke + + + Select from 3 different strength levels for your computer opponent. +This option only affects the Computer vs. Human game mode. +For the computer's guess in the Human vs. Computer mode +always the highest level will be used. + Wählen Sie eine der 3 verschiedenen Spielstärken für Ihren Rechner-Gegner aus. +Diese Option hat nur Einfluß auf Rechner-gegen-Mensch-Spiele. +Für die Rechner-Rat-Funktion im Mensch-gegen-Rechner-Modus wird immer die +höchste Spielstärke verwendet. + RowHint @@ -246,5 +654,11 @@ Möchten Sie das gegenwärtige Spiel aufgeben und ein neues Spiel beginnen?Commit Your solution Kombination testen + + Click the circles to rate my guess. +Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-) + Klicken Sie die Kreise, um meinen Vorschlag zu bewerten. +Drücken Sie Strg+H oder die entsprechende Werkzeugleisten-Schaltfläche, um die Bewertung einem unparteiischen Teil von mir zu übertragen ;-) + diff --git a/plugins/ColorCode_plugin/trans_en.qm b/plugins/ColorCode_plugin/trans_en.qm new file mode 100644 index 000000000..be651eede --- /dev/null +++ b/plugins/ColorCode_plugin/trans_en.qm @@ -0,0 +1 @@ +About ColorCode + + <br><br>Free MasterMind clone including a built in,<br>rather intelligent solver. + + + + Version + + + + Author + + - MainWindow + ColorCode New Game @@ -80,10 +92,6 @@ and start a new Game? Ctrl+C - - Ctrl+4 - - Ctrl+A @@ -117,10 +125,6 @@ and start a new Game? Do you want to give in the current and start a new Game? - - Press the Hint Field if You're done. - - Place Your pegs ... @@ -201,18 +205,6 @@ Do you want to give in the current and start a new Game? Ctrl+S - - Easy - 6 Colors - - - - Medium - 8 Colors - - - - Hard - 10 Colors - - Show Toolbar @@ -230,11 +222,406 @@ Do you want to give in the current and start a new Game? - Close Rows when the 4th Peg is placed + Level - Level + Computer's Guess + + + + Ctrl+H + + + + Press the Hint Field or Key Enter if You're done. + + + + Disallow Pegs of the Same Color + + + + Close Rows when the last Peg is placed + + + + Ctrl+L + + + + Beginner (2 Colors, 2 Slots, Doubles) + + + + Easy (4 Colors, 3 Slots, No Doubles) + + + + Classic (6 Colors, 4 Slots, Doubles) + + + + Challenging (8 Colors, 4 Slots, Doubles) + + + + Hard (10 Colors, 5 Slots, Doubles) + + + + Level Presets + + + + Colors + + + + Pegs of Same Color + + + + Slots + + + + Yes + + + + No + + + + Reset Color Order + + + + Ctrl+Shift+L + + + + Online &Help + + + + F1 + + + + Done + + + + Ctrl+Shift+N + + + + Rate it for me + + + + Human vs Computer + + + + Computer vs Human + + + + Game Mode + + + + Press the button below or Key Enter if You're done. + + + + Place Your secret ColorCode ... + + + + Please rate the guess. Press OK or Key Enter if You're done. + + + + The impossible happened, sorry. + + + + Yeah! I guessed it, man! + + + + Embarrassing! I lost a game! + + + + Nope! Thats impossible! Did you gave me false hints? + + + + Don't you like to see me winning? ;-) + + + + Set Hints automatically + + + + Ctrl+Shift+H + + + + Preferences + + + + Ctrl+P + + + + Show Indicators + + + + The chosen settings do not allow pegs of the same color! + + + + + PrefDialog + + ... Select from predefined level settings + + + + Beginner (2 Colors, 2 Slots, Doubles) + + + + Easy (4 Colors, 3 Slots, No Doubles) + + + + Classic (6 Colors, 4 Slots, Doubles) + + + + Challenging (8 Colors, 4 Slots, Doubles) + + + + Hard (10 Colors, 5 Slots, Doubles) + + + + Slots + + + + Colors + + + + Human vs. Computer + + + + Computer vs. Human + + + + Low + + + + Medium + + + + High + + + + Preferences + + + + Appearance + + + + Controls + + + + Show or hide the Menubar. + + + + Show Menubar + + + + Show or hide the Toolbar. + + + + Show Toolbar + + + + Show or hide the Statusbar. + + + + Show Statusbar + + + + Indicators + + + + If this option is checked, an indicator +inside each peg is displayed. + + + + Show Indicators inside pegs + + + + Use unique letters as indicators. + + + + Letter Indicators + + + + Use unique numbers as indicators. + + + + Number Indicators + + + + Use the same neutral background color for each peg, +when indicators are shown. + + + + Hide Colors + + + + Click here if you have changed the color order +and now you want to revert it to it's initial state. + + + + Reset Color Order + + + + Game Settings + + + + Level Presets + + + + Select from predefined combinations +of the three different level related settings, +the number of colors, the number of slots (columns) +and the possibility of pegs of the same color in one row. + + + + Number of Slots + + + + Number of Colors + + + + Number of pegs in a single row. +Higher values are harder to guess. + + + + Number of all possible colors. +Higher values are harder to guess. + + + + If this option is checked, the hidden combination +may contain one or more (even all would be possible) +pegs of the same color. +If checked, the combination is generally harder to guess. + + + + Allow Pegs of Same Color + + + + Game Mode + + + + Select from the different game modes. +In the 1. mode you have to to guess the hidden, +computer generated combination, +In the 2. mode your computer will try to guess your +own secret combination. + + + + If checked, a row is closed as soon as you place the last peg +and your guess is submitted immediatly. +This option only affects the Human vs. Computer game mode. + + + + Close Rows when the last Peg is placed + + + + If checked, the computer will determine the corresponding hints for the solver's guess. +This option affects only Computer vs. Human games. +If checked, you only have to place your secret combination. +Then the rest of the game runs automatically until the end. +But you can set a delay between the guesses. + + + + Set Hints automatically + + + + Adjust the delay (in ms) between two guesses. + + + + Delay in ms + + + + Solver Strength + + + + Select from 3 different strength levels for your computer opponent. +This option only affects the Computer vs. Human game mode. +For the computer's guess in the Human vs. Computer mode +always the highest level will be used. @@ -244,5 +631,10 @@ Do you want to give in the current and start a new Game? Commit Your solution + + Click the circles to rate my guess. +Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-) + + diff --git a/plugins/ColorCode_plugin/trans_fr.qm b/plugins/ColorCode_plugin/trans_fr.qm new file mode 100644 index 0000000000000000000000000000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fOjEPmTp*)Su_f>y`-JUX~T;|*4Ji3=2C z!3hEPVai7zbl5w{4=#9%=)cc}%Pczxszyk(NZY=%@J5sJGy(~R)tb!h8Qyz&CmpXm z1p>}sl@yNBXGdBaMVWoe~9f4M-Hbi9bA!wY?%rR7pFLqM@-A5t>7 z?N@NmKSW;bI=U;k49V?>vPW#dGn^Fz1JrqC;{WICFR#9-oJ_Hb)}0;i#_7N~u#jhb zprIey(4GTCdZvRG8W@Q1U;oL)wBMpRsyIJQRsq<|b5c7B$8o%|r(B)@E|&l`SkPmw z(x=wYJzVC~AvFjUvT{ks+kN_CSmBxdR1CKO4>aEKdY}$ykc(AdJ<#b|@V*f1TKZsq zgFCcO@&x8u$NPjj@z{J-bx)nT z5Emoqz-j(G={h-6+4KP`Q+X@JAGV}oO z{>A?~Ib9|d+3OkTKP;`{wb)~|mdg;I1vOwamH$!CQe+;ZeYx?Mr7T97jm_9q5nkF= zE-wmF5~5akNzZo7kC=>!!h2m-KMiR@P~CdM}rOYIe#%+7{Gg0#C<#%_XNH*ZhLqh6}U&Q)12k_+Pq&LVv0YbsnX@ p;}4HcWq7+-s+RO7TIaPlcXYRjJ7-0AUkd-%#M1678r!?@>pvC^jxGQI literal 0 HcmV?d00001 diff --git a/plugins/ColorCode_plugin/trans_fr.ts b/plugins/ColorCode_plugin/trans_fr.ts new file mode 100644 index 000000000..298998d3e --- /dev/null +++ b/plugins/ColorCode_plugin/trans_fr.ts @@ -0,0 +1,660 @@ + + + +UTF-8 + + About + + &Author + &Auteur + + + icon + icône + + + &License + &Licence + + + A needful game to train your brain ;-) + Un programme incontournable pour entraîner votre cerveau ;-) + + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier selon les termes de la GNU General Public License (licence générale publique du projet GNU), telle qu'elle est publiée par la Free Software Foundation (Fondation pour le Logiciel Libre), soit sous sa version 2, soit (selon votre choix) sous n'importe quelle version ultérieure. + + + ColorCode + ColorCode + + + About ColorCode + À propos de ColorCode + + + <br><br>Free MasterMind clone including a built in,<br>rather intelligent solver. + <br><br>Clone du logiciel MasterMind incluant un solveur plutôt malin. + + + Version + Version + + + Author + Auteur + + + + ColorCode + + New Game + Nouvelle partie + + + Do you want to give in +and start a new Game? + Voulez-vous abandonner +et démarrer une nouvelle partie ? + + + About Qt + À propos de Qt + + + &New Game + &Nouvelle partie + + + Ctrl+N + + + + &Restart Game + &Redémarrer la partie + + + Ctrl+R + Ctrl+R + + + E&xit + &Quitter + + + Ctrl+Q + + + + Ctrl+T + + + + Ctrl+C + + + + Ctrl+A + + + + About &Qt + À propos de &Qt + + + &Game + &Partie + + + &Settings + &Préférences + + + &Help + &Aide + + + Game + Partie + + + Message + + + + The changed settings will only apply to new games! +Do you want to give in the current and start a new Game? + Les préférences modifiées ne s'appliqueront qu'aux nouvelles parties ! +Voulez-vous abandonner la partie et en démarrer une nouvelle ? + + + Place Your pegs ... + Placez vos fiches... + + + Congratulation! You have won! + Congratulations ! Vous gagnâtes ! + + + Sorry! You lost! + Désolé ! Vous perdîtes ! + + + Ctrl+I + + + + Give In + Abandonner + + + Do you really want to give in? + Voulez-vous réellement abandonner ? + + + &Throw In The Towel + &Donner sa langue au chat + + + Ctrl+G + + + + Sure, You're too weak for me! + Vous êtes trop faible pour moi ; c'est sûr ! + + + Ctrl+Shift+R + + + + Ctrl+Shift+C + + + + Fill Row by Random + Garnir la rangée au hasard + + + Duplicate Previous Row + Dupliquer la rangée précédente + + + Ctrl+D + + + + Clear Row + Effacer la rangée + + + &Row + &Rangée + + + ColorCode + + + + About &ColorCode + À propos de &ColorCode + + + Ctrl+M + + + + Ctrl+S + + + + Show Toolbar + Afficher la barre d'outils + + + Show Menubar + Afficher la barre de menu + + + Show Statusbar + Afficher la barre d'état + + + Allow Pegs of the Same Color + Autoriser plusieurs fiches de même couleur + + + Level + Niveau + + + Computer's Guess + Essai de l'ordinateur + + + Ctrl+H + + + + Press the Hint Field or Key Enter if You're done. + Cliquer sur le champ des fiches d'indices ou pressez <Entrée> quand vous êtes prêt. + + + Disallow Pegs of the Same Color + Interdire plusieurs fiches de même couleur + + + Close Rows when the last Peg is placed + Finaliser la rangée quand la dernière fiche est placée + + + Ctrl+L + + + + Beginner (2 Colors, 2 Slots, Doubles) + Débutant (2 couleurs, 2 trous, doubles) + + + Easy (4 Colors, 3 Slots, No Doubles) + Facile (4 couleurs, 3 trous, pas de doubles) + + + Classic (6 Colors, 4 Slots, Doubles) + Classique (6 couleurs, 4 trous, doubles) + + + Challenging (8 Colors, 4 Slots, Doubles) + Évolué (8 couleurs, 4 trous, doubles) + + + Hard (10 Colors, 5 Slots, Doubles) + Difficile (10 couleurs, 5 trous, doubles) + + + Level Presets + Niveaux + + + Colors + Couleurs + + + Pegs of Same Color + Fiches de même couleurs autorisées + + + Slots + Trous + + + Yes + Oui + + + No + Non + + + Reset Color Order + Réinitialiser l'ordre des couleurs + + + Ctrl+Shift+L + + + + Online &Help + &Aide en ligne + + + F1 + + + + Done + Fait + + + Ctrl+Shift+N + + + + Rate it for me + Évaluer pour moi + + + Human vs Computer + Humain contre Ordinateur + + + Computer vs Human + Ordinateur contre Humain + + + Game Mode + Mode de jeu + + + Press the button below or Key Enter if You're done. + Cliquer le bouton ci-dessous ou presser <Entrée> quand vous êtes prêt. + + + Place Your secret ColorCode ... + Placez votre code couleur secret... + + + Please rate the guess. Press OK or Key Enter if You're done. + Veuillez évaluer l'essai. Cliquer OK ou presser <Entrée> quand vous êtes prêt. + + + The impossible happened, sorry. + L'impossible advint, désolé. + + + Yeah! I guessed it, man! + Youpi! Je l'ai deviné ! + + + Embarrassing! I lost a game! + Embarassant ! J'ai perdu la partie ! + + + Nope! Thats impossible! Did you gave me false hints? + Nenni ! Ceci est impossible ! M'avez-vous donné de faux indices ? + + + Don't you like to see me winning? ;-) + Aimez-vous me voir gagner ? ;-) + + + Set Hints automatically + Afficher les indices automatiquement + + + Ctrl+Shift+H + + + + Preferences + Préférences + + + Ctrl+P + + + + Show Indicators + Montrer les indicateurs sur les fiches + + + The chosen settings do not allow pegs of the same color! + Les préférences choisies ne permettent pas plusieurs fiches de même couleur ! + + + + PrefDialog + + ... Select from predefined level settings + ... Sélectionner à partir des préférences de niveau + + + Beginner (2 Colors, 2 Slots, Doubles) + Débutant (2 couleurs, 2 trous, doubles) + + + Easy (4 Colors, 3 Slots, No Doubles) + Facile (4 couleurs, 3 trous, pas de doubles) + + + Classic (6 Colors, 4 Slots, Doubles) + Classique (6 couleurs, 4 trous, doubles) + + + Challenging (8 Colors, 4 Slots, Doubles) + Évolué (8 couleurs, 4 trous, doubles) + + + Hard (10 Colors, 5 Slots, Doubles) + Difficile (10 couleurs, 5 trous, doubles) + + + Slots + Trous + + + Colors + Couleurs + + + Human vs. Computer + Humain contre Ordinateur + + + Computer vs. Human + Ordinateur contre Humain + + + Low + Bas + + + Medium + Moyen + + + High + Élevé + + + Preferences + Préférences + + + Appearance + Apparence + + + Controls + Contrôles + + + Show or hide the Menubar. + Afficher ou cacher la barre de menu. + + + Show Menubar + Afficher la barre de menu + + + Show or hide the Toolbar. + Afficher ou cacher la barre d'outils. + + + Show Toolbar + Afficher la barre d'outils + + + Show or hide the Statusbar. + Afficher ou cacher la barre d'état. + + + Show Statusbar + Afficher la barre d'état + + + Indicators + Indicateurs de fiche + + + If this option is checked, an indicator +inside each peg is displayed. + Si cette option est cochée, un indicateur +est affiché à l'intérieur de chaque fiche. + + + Show Indicators inside pegs + Montrer les indicateurs sur les fiches + + + Use unique letters as indicators. + Utiliser des lettres uniques comme indicateurs. + + + Letter Indicators + Lettres indicateur + + + Use unique numbers as indicators. + Utiliser des chiffres uniques comme indicateurs. + + + Number Indicators + Chiffres indicateur + + + Use the same neutral background color for each peg, +when indicators are shown. + Utiliser la même couleur de fond neutre pour chaque fiche, +quand les indicateurs sont affichés. + + + Hide Colors + Cacher les couleurs + + + Click here if you have changed the color order +and now you want to revert it to it's initial state. + Cliquer ici si vous avez changé l'ordre des couleurs +et que vous voulez revenir à son état initial. + + + Reset Color Order + Réinitialiser l'ordre des couleurs + + + Game Settings + Préférences de jeu + + + Level Presets + Niveaux prédéfinis + + + Select from predefined combinations +of the three different level related settings, +the number of colors, the number of slots (columns) +and the possibility of pegs of the same color in one row. + Sélectionner un niveau à partir de +niveaux prédéfinis. + + + Number of Slots + Nombre de trous + + + Number of Colors + Nombre de couleurs + + + Number of pegs in a single row. +Higher values are harder to guess. + Nombre de fiches sur une rangée. +Plus le nombre est élevé, plus la combinaison +est difficile à deviner. + + + Number of all possible colors. +Higher values are harder to guess. + Nombre de couleurs autorisées. +Plus le nombre est élevé, plus la combinaison +est difficile à deviner. + + + If this option is checked, the hidden combination +may contain one or more (even all would be possible) +pegs of the same color. +If checked, the combination is generally harder to guess. + Si cette option est cochée, la combinaison cachée +peut contenir une ou plusieurs (ou toutes) fiches +de même couleur. Dans ce cas, la combinaison est +généralement plus difficile à deviner. + + + Allow Pegs of Same Color + Autoriser plusieurs fiches de même couleur + + + Game Mode + Mode de jeu + + + Select from the different game modes. +In the 1. mode you have to to guess the hidden, +computer generated combination, +In the 2. mode your computer will try to guess your +own secret combination. + Sélectionner un mode de jeu parmi deux +modes prédéfinis. + + + If checked, a row is closed as soon as you place the last peg +and your guess is submitted immediatly. +This option only affects the Human vs. Computer game mode. + Si cette opions est cochée, votre essai est immédiatement +évalué dès que la dernière fiche est placée dans son trou. + + + Close Rows when the last Peg is placed + Finaliser la rangée quand la dernière fiche est placée + + + If checked, the computer will determine the corresponding hints for the solver's guess. +This option affects only Computer vs. Human games. +If checked, you only have to place your secret combination. +Then the rest of the game runs automatically until the end. +But you can set a delay between the guesses. + Si cette option est cochée, l'ordinateur déterminera les indices pour l'essai. +Cette option affecte uniquement les jeus Ordinateur contre Humain. +Ensuite, le restant du jeu se déroule automatiquement jusques à la fin. +Mais vous pouvez régler un délai entre les essais. + + + Set Hints automatically + Afficher les indices automatiquement + + + Adjust the delay (in ms) between two guesses. + Régler le délai (en millisecondes) entre deux essais. + + + Delay in ms + Délai en millisecondes + + + Solver Strength + Force du solveur + + + Select from 3 different strength levels for your computer opponent. +This option only affects the Computer vs. Human game mode. +For the computer's guess in the Human vs. Computer mode +always the highest level will be used. + Sélectionner la force de votre adversaire parmi trois niveaux prédéfinis. + + + + RowHint + + Commit Your solution + Envoyer votre solution + + + Click the circles to rate my guess. +Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-) + Cliquer les cercles pour évaluer mon essai. +Pressez Ctrl+H ou le bouton de barre d'outils pour que je le fasse à votre place +de la manière la plus impartiales possible ;-) + + + diff --git a/plugins/ColorCode_plugin/trans_hu.qm b/plugins/ColorCode_plugin/trans_hu.qm new file mode 100644 index 0000000000000000000000000000000000000000..44f5691c304ebf8e8861aa761998de769c53ab53 GIT binary patch literal 19832 zcmc&+3veA*c|Lkrmaea4$8j8|B+km%iexJ{*h$@51g|gCJ-MeV- zuClvVLT-nqw4tGegrpFLnbIaLP$-WSI!!4JO`$^|DP?$OfI=YckijL8($Ewb68e4T zzx%kW)x&{KMkDQgoIU41|M?%^|5)w)Sb5WrGE3DmD=(N)%y2%-|@U^f8c;p>+ezRU%L|HpH}Tpe@&?! zH>!@Gy&CsEr8a#3aivCoLv82x9qZNhr(TBZklOv=gi`DNNgeujyHe*G>g4AhRBGdd zdd2R)QEKyhvE;GU(<5kyFusrhg*+*b4IC61FbiDA5p3pw3hp@{)Hcw>(v*u*6!Y? z)c)7C1|P>fzy5sdt&g{1+|JfFey2yNm;QO{2TNa9s^#|9`&(Sh^Xb;_z5eak$NjDU z-R*%tLF-RHvrQ>=S=+WtPAau^SKHLnpH`~%FXg&sy3PIAec0!>+v>Mt+<7mN>vq-l zrXOLyyKiW_~(a-)evFZp^dh-E!@Jb^8bI_!0K;7_QGK)!l*Xk8$0N z>;K|9h3ijny$9Ey;`%VIKgac1T%S{_rw>=q({oe%2kyl7dftd@3$72~+KTIwxPnh> zH{yzO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`GK?6wXAqt=jH9u!{n=~U( zgePr(5|5hGjq9%L+I*D$9z~yleh6`tSvEZuom)xr9G!@4zr_Eq(S5#{0HTHeK*6pr z{0jxPCGbjch$0f&(R3oW5#2=3ajnJ!IBbU1olDzw4v9Hs>8IvF%Qh2>LVyNG9b1tN W!(I)AF6qff2EWb+erZbLng0*As=$x{ literal 0 HcmV?d00001 diff --git a/plugins/ColorCode_plugin/trans_hu.ts b/plugins/ColorCode_plugin/trans_hu.ts new file mode 100644 index 000000000..3a181abbe --- /dev/null +++ b/plugins/ColorCode_plugin/trans_hu.ts @@ -0,0 +1,666 @@ + + + +UTF-8 + + About + + ColorCode + ColorCode + + + A needful game to train your brain ;-) + Az agytekervények megmozgatására szolgáló játék ;-) + + + <br><br>Free MasterMind clone including a built in,<br>rather intelligent solver. + <br><br>Egy ingyenes MasterMind klón,<br> kiegészítve egy meglehetősen intelligens megoldóval. + + + Version + Verzió + + + Author + Szerző + + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + Ez a program egy szabad szoftver, amit továbbadhatsz és/vagy módosíthatsz a GNU General Public Licensz alapján, amit a Free Software Foundation adott ki; a 2. Licensz verzió szerint, vagy bármely későbbi (tetszés szerint) verzió alapján. + + + About ColorCode + Névjegy: ColorCode + + + &Author + &Szerző + + + icon + ikon + + + &License + &Licensz + + + + ColorCode + + ColorCode + ColorCode + + + Done + Befejez + + + &New Game + &Új játék + + + Ctrl+N + Ctrl+N + + + &Restart Game + &Játék újrakezdése + + + Ctrl+Shift+N + Ctrl+Shift+N + + + &Throw In The Towel + Játék &feladása + + + Ctrl+G + Ctrl+G + + + E&xit + &Kilép + + + Ctrl+Q + Ctrl+Q + + + Show Toolbar + Eszköztár mutatása + + + Ctrl+T + Ctrl+T + + + Show Menubar + Menüsor mutatása + + + Ctrl+M + Ctrl+M + + + Show Statusbar + Állapotsor mutatása + + + Ctrl+S + Ctrl+S + + + Reset Color Order + Szín sorrend nullázása + + + Ctrl+Shift+R + Ctrl+Shift+R + + + Show Indicators + Jelzők használata + + + Ctrl+Shift+L + Ctrl+Shift+L + + + Allow Pegs of the Same Color + Azonos színű ékek engedélyezése + + + Ctrl+Shift+C + Ctrl+Shift+C + + + Disallow Pegs of the Same Color + Azonos színű ékek tiltása + + + Close Rows when the last Peg is placed + Sor zárolása az utolsó ék behelyezése után + + + Ctrl+L + Ctrl+L + + + Set Hints automatically + Automatikus útmutatások + + + Ctrl+Shift+H + Ctrl+Shift+H + + + Online &Help + Online &segítség + + + F1 + F1 + + + About &ColorCode + Névejgy: &ColorCode + + + Ctrl+A + Ctrl+A + + + About &Qt + Névjegy: &Qt + + + Ctrl+I + Ctrl+I + + + Fill Row by Random + Sorok kitöltése véletlenszerűen + + + Ctrl+R + Ctrl+R + + + Duplicate Previous Row + Előző sor duplázása + + + Ctrl+D + Ctrl+D + + + Clear Row + Sor törlése + + + Ctrl+C + Ctrl+C + + + Beginner (2 Colors, 2 Slots, Doubles) + Kezdő (2 szín, 2 lyuk, duplázás) + + + Easy (4 Colors, 3 Slots, No Doubles) + Könnyű (4 szín, 3 lyuk, nincs duplázás) + + + Classic (6 Colors, 4 Slots, Doubles) + Klasszikus (6 szín, 4 lyuk, duplázás) + + + Challenging (8 Colors, 4 Slots, Doubles) + Kihívás (8 szín, 4 lyuk, duplázás) + + + Hard (10 Colors, 5 Slots, Doubles) + Nehéz (10 szín, 5 lyuk, duplázás) + + + Computer's Guess + Gép tippje + + + Ctrl+H + Ctrl+H + + + Rate it for me + Értékeld nekem + + + Human vs Computer + Ember kontra számítógép + + + Computer vs Human + Számítógép kontra ember + + + Preferences + Beállítások + + + Ctrl+P + Ctrl+P + + + &Game + &Játék + + + &Row + &Sor + + + &Settings + &Beállítások + + + Game Mode + Játék mód + + + Level Presets + Nehézség beállítása + + + &Help + &Segítség + + + Game + Játék + + + Colors + Színek + + + Slots + Lyukak + + + Level + Nehézség + + + Message + Üzenet + + + The changed settings will only apply to new games! +Do you want to give in the current and start a new Game? + A megváltozott beállítások csak az új játékra lesznek érvényesek! +Feladod a jelenlegi játékot, és indítasz egy újat? + + + New Game + Új játék + + + Do you want to give in +and start a new Game? + Feladod, és kezdesz egy újat? + + + Give In + Felad + + + Do you really want to give in? + Tényleg feladod? + + + About Qt + Névjegy: Qt + + + Press the Hint Field or Key Enter if You're done. + Nyomd meg az útmutatás mezőt, vagy üsd le az entert ha kész vagy. + + + Place Your pegs ... + Helyezd el az ékeket... + + + Press the button below or Key Enter if You're done. + Nyomd meg a fenti gombot, vagy üsd le az entert ha végeztél. + + + The chosen settings do not allow pegs of the same color! + A megadott beállítások nem engedélyezik az azonos színeket! + + + Place Your secret ColorCode ... + Helyezd el a titkos színkombinációt... + + + Yes + Igen + + + No + Nem + + + Pegs of Same Color + Azonos színű ékek + + + Please rate the guess. Press OK or Key Enter if You're done. + Értékeld a tippet. Kattints az OK-ra, vagy üss entert ha kész vagy. + + + Congratulation! You have won! + Gratulálok! Nyertél! + + + Sorry! You lost! + Sajnálom! Vesztettél! + + + Sure, You're too weak for me! + Biztos, Túl kevés vagy hozzám! + + + The impossible happened, sorry. + A lehetetlen megtörtént, bocsi. + + + Yeah! I guessed it, man! + Fain! Kitalátam öcsém! + + + Embarrassing! I lost a game! + Lenyűgöző! Elvesztettem a játékot! + + + Don't you like to see me winning? ;-) + Nem akarsz győzni látni engem? ;-) + + + Nope! Thats impossible! Did you gave me false hints? + Neee! Ez hihetetlen! Hamis útmutatást adtál nekem? + + + + PrefDialog + + ... Select from predefined level settings + ... Válassz az előre meghatározott szint beállítások közül + + + Beginner (2 Colors, 2 Slots, Doubles) + Kezdő (2szín, 2 lyuk, duplázás) + + + Easy (4 Colors, 3 Slots, No Doubles) + Könnyű (4 szín, 3 lyuk, nincs duplázás) + + + Classic (6 Colors, 4 Slots, Doubles) + Klasszikus (6 szín, 4 lyuk, duplázás) + + + Challenging (8 Colors, 4 Slots, Doubles) + Kihívás (8 szín, 4 lyuk, duplázás) + + + Hard (10 Colors, 5 Slots, Doubles) + Nehéz (10 szín, 5 lyuk, duplázás) + + + Slots + Lyukak + + + Colors + Színek + + + Human vs. Computer + Ember kontra számítógép + + + Computer vs. Human + Számítógép kontra ember + + + Low + Könnyű + + + Medium + Közepes + + + High + Nehéz + + + Preferences + Beállítások + + + Appearance + Megjelenés + + + Controls + Gombok + + + Show or hide the Menubar. + Menüsor mutatása vagy elrejtése. + + + Show Menubar + Meüsor mutatása + + + Show or hide the Toolbar. + Eszköztár mutatása vagy elrejtése. + + + Show Toolbar + Eszköztár mutatása + + + Show or hide the Statusbar. + Állapotsor mutatása vagy elrejtése. + + + Show Statusbar + Állapotsor mutatása + + + Indicators + Jelzők + + + If this option is checked, an indicator +inside each peg is displayed. + Ha ez az opció be van jelölve, +akkor minden ékben megjelenik egy jelző. + + + Show Indicators inside pegs + Jelzők mutatása az ékeken belül + + + Use unique letters as indicators. + Egyedi betűk használata jelzőként. + + + Letter Indicators + Betű jelzők + + + Use unique numbers as indicators. + Egydi számok használata jelzőként. + + + Number Indicators + Szám jelzők + + + Use the same neutral background color for each peg, +when indicators are shown. + Egyforma sima háttér használata az ékeknél, +amikor a jelzők látszanak. + + + Hide Colors + Színek elrejtése + + + Click here if you have changed the color order +and now you want to revert it to it's initial state. + Kattints ide ha megváltoztattad a szín sorrendet, +és visszakarod állatani az eredetire. + + + Reset Color Order + Szín sorrend nullázása + + + Game Settings + Játék beállítások + + + Level Presets + Nehézségi beállítások + + + Select from predefined combinations +of the three different level related settings, +the number of colors, the number of slots (columns) +and the possibility of pegs of the same color in one row. + Válassz az előre meghatározott nehézségi szint +3 különböző lehetősége közül, +színek száma, lyukak (oszlop) száma, +és az egy sorban lehetséges azonos színek száma. + + + Number of Slots + Lyukak száma + + + Number of Colors + Színek száma + + + Number of pegs in a single row. +Higher values are harder to guess. + Ékek száma egy sorban. +A nyagyobb értéket nehezebb eltalálni. + + + Number of all possible colors. +Higher values are harder to guess. + A lehetséges színek száma. +A nagyobb értéket nehezebb eltalálni. + + + If this option is checked, the hidden combination +may contain one or more (even all would be possible) +pegs of the same color. +If checked, the combination is generally harder to guess. + Amennyiben ez a lehetőség be van kapcsolva, +akkor a rejtett kombináció tartalmazhat egy vagy több +(akár az összes) azonos színű éket. +Ha be van kapcsolva, nehezebb megfejteni a kombinációt. + + + Allow Pegs of Same Color + Azonons színű ékek engedélyezése + + + Game Mode + Játék mód + + + Select from the different game modes. +In the 1. mode you have to to guess the hidden, +computer generated combination, +In the 2. mode your computer will try to guess your +own secret combination. + Válassz a különböző játék módok közül. +Az 1. módban neked kell kitalálnod a titkos kombinációt, +amit a gép kigondolt. +A 2. módban a gépnek kell kitalálnia +az általad megadott kombinációt. + + + If checked, a row is closed as soon as you place the last peg +and your guess is submitted immediatly. +This option only affects the Human vs. Computer game mode. + Ha ez be van kapcsolva, akkor a sor zárolásra kerül, amint beraktad az utolsó éket, +és a tipped azonnal ki lesz értékelve. +Ez az opció csak az Ember kontra számítógép módban működik. + + + Close Rows when the last Peg is placed + Sor zárolása, amint az utolsó ék is a helyére került + + + If checked, the computer will determine the corresponding hints for the solver's guess. +This option affects only Computer vs. Human games. +If checked, you only have to place your secret combination. +Then the rest of the game runs automatically until the end. +But you can set a delay between the guesses. + Ha ezt bekapcsolod, akkor a gép automatikusan kiértékeli a tippet a jelzők segítségével. +Ez a lehetőség csak a Számítógép kontra ember módnál működik. +Bekapcsolt állapotban, csak titkos kombinációt kell megadnod, +majd a játék hátralevő részét a gép automatikusan lejátsza. +De meg tudsz adni késleltetést a tippek közé. + + + Set Hints automatically + Jelzők automatikus használata + + + Adjust the delay (in ms) between two guesses. + Tippek közti késleltetés megadása. + + + Delay in ms + Késleltelés ms-ban + + + Solver Strength + Megoldási nehézség + + + Select from 3 different strength levels for your computer opponent. +This option only affects the Computer vs. Human game mode. +For the computer's guess in the Human vs. Computer mode +always the highest level will be used. + Válassz a 3 különböző nehézség közül a gépi ellenfél számára. +Ez az opció csak a Számítógép kontra ember módot befolyásolja. +A gép tippjeinél az Ember kontra számítógép módban +a legnehezebb nehézségi szint lesz használva. + + + + RowHint + + Commit Your solution + Kövesd a megoldásodat + + + Click the circles to rate my guess. +Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-) + Kattints a körökbe, hogy kiértékeld a tippemet. +Vagy nyomd le a Ctrl+H billentyűkombinációt, vagy használd az eszköztár adott gombját, hogy megtegyem ezt helyetted;-) + + +