kblackbox
kbbtutorial.cpp
Go to the documentation of this file.
93 m_playerAction->setWhatsThis(i18n("Describes what you should do to reach the next tutorial step."));
102 m_buttonPrevious = new KPushButton(KIcon( QLatin1String( "go-previous") ), i18nc("Previous tutorial step", "&Previous"), this);
106 m_buttonNext = new KPushButton(KIcon( QLatin1String( "go-next")) , i18nc("Next tutorial step", "&Next"), this);
148 void KBBTutorial::setGameWidget(KBBScalableGraphicWidget* gameWidget, KBBGraphicsItemTutorialMarker* marker)
169 setTexts(i18n("Welcome!"), i18n("This tutorial will teach you how to play KBlackBox, using a simple example.<br /><br />We are playing with a square black box of 6 columns and 6 rows. It has 3 balls <b>hidden</b> inside it and 24 laser probes around it.<br /><br />The goal is to <b>find the positions of the balls.</b>"), i18n("Click on \"Next\""));
174 setTexts(i18n("Black box principles"), i18n("The balls are not visible, but we can shoot laser beams into the box at different entry points and observe if the laser beams leave the box, and if they do, where they come out.<br /><br />The laser beams interact with the balls in various ways."), i18n("Please click on the marked laser to shoot a beam into the black box."));
179 setTexts(i18n("No interaction"), i18n("If a laser beam does not interact with any ball in the black box, it comes out at the point opposite the entry point.<br /><br />Example: Suppose we have 3 balls in the box as shown. They will not affect laser beam \"1\".<br /><br />As the game progresses, each pair of entry/exit points is marked with a different number."), i18n("Now shoot the marked laser to discover the first kind of interaction."));
187 setTexts(i18n("Hit"), i18n("A direct impact on a ball is called a \"<b>hit</b>\". A beam that hits a ball does <b>not</b> emerge from the black box.<br /><br />Example: The beam might have hit a ball at the position shown, but the exact position of the hit is not certain: There are many other possibilities."), i18n("Shoot the marked laser to discover the second kind of interaction."));
193 setTexts(i18n("Simple deflection"), i18n("The interaction of a beam that does not actually hit a ball, but aims to one side of it, is called a \"<b>deflection</b>\". The angle of deflection of the beam is always <b>90 degrees</b>.<br /><br />Example: The ball shown would deflect beam \"2\" upward, as shown, but this is <b>not</b> the only possibility."), i18n("Click on \"Next\" to see another combination of ball positions that deflects the laser beam as shown."));
200 setTexts(i18n("Several deflections"), i18n("As you can see, interactions in the black box can be quite complicated!<br />A laser beam entering and exiting at the positions \"2\" might have been deflected by this configuration of 3 balls."), i18n("Shoot the marked laser to discover another kind of result."));
208 setTexts(i18n("Reflection"), i18n("If the laser beam leaves the black box <b>at the entry point</b>, it has been reflected backward inside the black box.<br /><br />Example: We have placed 2 balls for you in a configuration that would lead to such a reflection."), i18n("Shoot the marked laser to see another backward reflection case."));
215 setTexts(i18n("Special reflection"), i18n("If a ball is <b>at the edge of the box</b> (with no other ball nearby), a beam which is aimed into the black box directly beside it causes a backward reflection.<br /><br />Example: The configuration shown can cause a backward reflection."), i18n("Nearly done. Click on \"Next\"."));
222 setTexts(i18n("Marker for \"free position\""), i18n("We are sure there are no balls in the first 2 columns. If there were any, the beam entering at position \"1\" would hit a ball or be deflected by a ball in column 2. You can mark a \"free position\" with a right mouse click (see also keyboard shortcuts).<br /><br />Example: There are 12 markers in the first 2 columns."), i18n("Click on \"Next\"."));
231 setTexts(i18n("Marking balls"), i18n("When you have worked out where a ball is, please use the left mouse button to mark it. To remove a ball mark, use the left mouse button again. Last tip: If you are not sure about a position, you can use a right click on a ball to mark it as \"unsure\". (See also keyboard shortcuts.)<br /><br />Example: We marked one position as sure, the other one as unsure."), i18n("Click on \"Next\"."));
238 setTexts(i18n("Let us play!"), i18n("<b>Congratulations!</b> You now know <b>all the rules</b> for KBlackBox.<br /><br /><b>You can start to play.</b> Try to finish this tutorial game by yourself!<br /><br />Tip: We have sent in enough beams to deduce the positions of the 3 balls with certainty. Of course, you can use some more shots if needed."), i18n("Finish placing the balls and click on \"Done!\" when you are done!"));
Marker used by the tutorial.
Definition: kbbgraphicsitemtutorialmarker.h:42
void setStyleSheet(const QString &styleSheet)
void setMaximum(int maximum)
void addMarkerNothing(const int boxPosition)
Definition: kbbscalablegraphicwidget.cpp:180
void setFixedWidth(int w)
void setBorderPosition(const int borderPosition)
Definition: kbbgraphicsitemtutorialmarker.cpp:47
void clicked(bool checked)
void setPixmap(const QPixmap &)
Scalable graphic central widget for KBlackBox.
Definition: kbbscalablegraphicwidget.h:62
void setAlignment(QFlags< Qt::AlignmentFlag >)
void hide()
void addBallUnsure(const int boxPosition)
Definition: kbbscalablegraphicwidget.cpp:173
void setFrameStyle(int style)
void setValue(int value)
void setFlat(bool flat)
void setMinimum(int minimum)
void setMinimumSize(const QSize &)
void drawRay(const int borderPosition)
Definition: kbbscalablegraphicwidget.cpp:191
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
void setLayout(QLayout *layout)
void start()
Start the tutorial Start or restart the tutorial at the 1st step.
Definition: kbbtutorial.cpp:251
void setText(const QString &)
void setFixedSize(const QSize &s)
void setFormat(const QString &format)
void removeAllBalls()
Definition: kbbscalablegraphicwidget.cpp:351
void setWhatsThis(const QString &)
bool mayShootRay(const int incomingPosition)
May the player shoot the ray?
Definition: kbbtutorial.cpp:131
void addStretch(int stretch)
void setGameWidget(KBBScalableGraphicWidget *gameWidget, KBBGraphicsItemTutorialMarker *marker)
Define the scalable graphic widget.
Definition: kbbtutorial.cpp:148
void addBall(int boxPosition)
Definition: kbbscalablegraphicwidget.cpp:150
void show()
void show()
void newGame(int columns, int rows, int ballNumber)
Definition: kbbscalablegraphicwidget.cpp:251
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setTextVisible(bool visible)
void setWordWrap(bool on)
void addLayout(QLayout *layout, int stretch)
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.