Commit bcdd6795 authored by Yuri Chornoivan's avatar Yuri Chornoivan
Browse files

Fix minor typos

parent ff588b7e
......@@ -350,7 +350,7 @@ bool Editor::saveBoard()
const QFileInfo f(filename);
if (f.exists()) {
// if it already exists, querie the user for replacement
// if it already exists, query the user for replacement
int res = KMessageBox::warningContinueCancel(this,
i18n("A file with that name already exists. Do you wish to overwrite it?"),
i18n("Save Board Layout"), KStandardGuiItem::save());
......@@ -426,7 +426,7 @@ void Editor::drawBackground(QPixmap * pixmap) const
// blast in a white background
p.fillRect(0, 0, pixmap->width(), pixmap->height(), Qt::white);
// now put in a grid of tile quater width squares
// now put in a grid of tile quarter width squares
for (int y = 0; y <= height; ++y) {
int nextY = m_borderTop + (y * m_tiles.qHeight());
p.drawLine(m_borderLeft, nextY, m_borderLeft + (width * m_tiles.qWidth()), nextY);
......@@ -471,7 +471,7 @@ void Editor::drawTiles(QPixmap * dest)
tile = (z * depth) + (y * height) + (x * width);
t = m_tiles.unselectedTile(0);
// Only one compilcation. Since we render top to bottom , left
// Only one complication. Since we render top to bottom , left
// to right situations arise where...:
// there exists a tile one q height above and to the left
// in this situation we would draw our top left border over it
......@@ -511,9 +511,9 @@ void Editor::transformPointToPosition(const QPoint & point, POSITION & mouseClic
// iterate over z coordinate from top to bottom
for (z = m_theBoard.getDepth() - 1; z >= 0; --z) {
// calculate mouse coordiantes --> position in game board
// calculate mouse coordinates --> position in game board
// the factor -theTiles.width()/2 must keep track with the
// offset for blitting in the print zvent (FIX ME)
// offset for blitting in the print event (FIX ME)
x = ((point.x() - m_borderLeft) - (z + 1) * m_tiles.levelOffsetX()) / m_tiles.qWidth();
y = ((point.y() - m_borderTop) + z * m_tiles.levelOffsetX()) / m_tiles.qHeight();
......
......@@ -882,7 +882,7 @@ bool GameData::findMove(POSITION & posA, POSITION & posB)
short posCount = 0; // store number of pairs found
// The new tile layout with non-contiguos horizantle spans
// The new tile layout with non-continuous horizantal spans
// can lead to huge numbers of matching pairs being exposed.
// we alter the loop to bail out when BoardLayout::maxTiles/2 pairs are found
// (or less);
......
......@@ -57,7 +57,7 @@ void GameItem::setAngle(TileViewAngle angle, QPixmap * selPix, QPixmap * unselPi
{
m_angle = angle;
// Set the new pictures realted to the new angle.
// Set the new pictures tilted to the new angle.
*m_selPix = *selPix;
*m_unselPix = *unselPix;
......
......@@ -98,7 +98,7 @@ public:
void setTileset(KMahjonggTileset * tiles);
/**
* Calculate all values that neccessary to paint all tiles.
* Calculate all values that necessary to paint all tiles.
*/
void updateTileCalculations();
......
......@@ -333,7 +333,7 @@ void GameView::selectionChanged()
void GameView::removeItem(POSITION & stItemPos)
{
// Adding the data to the protocoll.
// Adding the data to the protocol.
m_gameData->setMoveListData(m_gameData->m_tileNum, stItemPos);
// Put an empty item in the data object. (data part)
......@@ -541,7 +541,7 @@ void GameView::shuffle()
// Test if any moves are available
validMovesAvailable();
// Clear any tile selection done proir to the shuffle.
// Clear any tile selection done prior to the shuffle.
clearSelectedTile();
}
......@@ -654,7 +654,7 @@ void GameView::updateItemsPosition()
void GameView::updateItemsPosition(const QList<GameItem *> &gameItems)
{
// The width and height need to be corrected, related to the removedtiles
// view and wether it is shown or not. For now the removed tiles field can
// view and whether it is shown or not. For now the removed tiles field can
// only be placed to the right of the board.
qreal boardWidth = (!m_showRemovedTiles) ? width() : width() * (1 - m_remTilesWidthFactor - 0.05);
qreal boardHeight = height();
......@@ -668,7 +668,7 @@ void GameView::updateItemsPosition(const QList<GameItem *> &gameItems)
int angleYFactor = (m_angle == NW || m_angle == NE) ? -1 : 1;
// Get half width and height of tile faces: minimum spacing = 1 pixel.
// NOTE - qWidth is devided by 2 in kmahjonggtileset.cpp. The reason is
// NOTE - qWidth is divided by 2 in kmahjonggtileset.cpp. The reason is
// unknown for now. Please review this later.
qreal tileFaceWidth = m_tiles->qWidth() * 2 + 1;
qreal tileFaceHeight = m_tiles->qHeight() * 2 + 1;
......@@ -678,7 +678,7 @@ void GameView::updateItemsPosition(const QList<GameItem *> &gameItems)
// Because the positions of the tiles can be half-positioned, the width and
// height in GameData is two times higher. To get the maximum number of
// tiles in a row or column, the GameData-width and -height have to be
// devided by two.
// divided by two.
qreal numTilesX = m_gameData->m_width / 2;
qreal numTilesY = m_gameData->m_height / 2;
......@@ -958,7 +958,7 @@ void GameView::resizeEvent(QResizeEvent * event)
}
// The size need to be corrected, related to the removedtiles
// view and wether it is shown or not. For now the removed tiles field can
// view and whether it is shown or not. For now the removed tiles field can
// only be placed to the right of the board.
QSize size(event->size());
if (m_showRemovedTiles) {
......
......@@ -77,7 +77,7 @@ public:
virtual QList<GameItem *> getGameItems() const;
/**
* Set wether removed tiles should be shown.
* Set whether removed tiles should be shown.
* @param show True if removed tiles should be shown.
*/
void showRemovedTiles(bool show);
......@@ -140,7 +140,7 @@ public:
/**
* Get the match value.
*
* @return True when matching items of the eselected one will be displayed, else false. */
* @return True when matching items of the selected one will be displayed, else false. */
bool getMatch() const;
/**
......@@ -159,14 +159,14 @@ public:
* Sets the tileset path and tries to load it.
*
* @param tilesetPath The path to the tileset.
* @return True if setting and therfore loading success, else false. */
* @return True if setting and therefore loading success, else false. */
bool setTilesetPath(QString const & tilesetPath);
/**
* Sets the background path and tries to load it.
*
* @param backgroundPath The path to the background.
* @return True if setting and therfore loading success, else false. */
* @return True if setting and therefore loading success, else false. */
bool setBackgroundPath(QString const & backgroundPath);
/**
......@@ -225,7 +225,7 @@ public:
public slots:
/**
* Add a new item with teh given position and update imgages, position and order. */
* Add a new item with the given position and update images, position and order. */
void addItemAndUpdate(POSITION & stItemPos);
/**
......@@ -401,7 +401,7 @@ private:
* @param xStart The x position of the item.
* @param y The y position of the item.
* @param z The z position of the item.
* @param zCount The z count variable for ther order. */
* @param zCount The z count variable for the order. */
void orderLine(GameItem * startItem, int xStart, int xEnd, int xCounter, int y,
int yCounter, int z, int & zCount);
......
......@@ -312,7 +312,7 @@ void KMahjongg::loadSettings()
qCDebug(KMAHJONGG_LOG) << "An error occurred when loading the background " << Prefs::background() << " KMahjongg will continue with the default background.";
}
// Set wether removed tiles should be shown.
// Set whether removed tiles should be shown.
m_gameView->showRemovedTiles(Prefs::removedTiles());
// Maybe load a new layout and start a new game if the layout or random mode has changed.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment