summaryrefslogtreecommitdiffstats
path: root/kmahjongg/Preview.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-21 14:20:47 -0600
committerSlávek Banko <slavek.banko@axis.cz>2012-06-04 01:10:54 +0200
commitedee609d80715382db83adbc8b00c7f74793edcb (patch)
treeb11a53fb2d6b02c5f7613b8fcd724f4b7d5837bf /kmahjongg/Preview.cpp
parent00e58f1937047eb6c23edbdb3ae7ed5feec7a572 (diff)
downloadtdegames-edee609d80715382db83adbc8b00c7f74793edcb.tar.gz
tdegames-edee609d80715382db83adbc8b00c7f74793edcb.zip
Rename obsolete tq methods to standard names
(cherry picked from commit 36770452958a79a095f9d9e605e79f66cfa79a2b)
Diffstat (limited to 'kmahjongg/Preview.cpp')
-rw-r--r--kmahjongg/Preview.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/kmahjongg/Preview.cpp b/kmahjongg/Preview.cpp
index f6ff021a..9c6ac478 100644
--- a/kmahjongg/Preview.cpp
+++ b/kmahjongg/Preview.cpp
@@ -76,7 +76,7 @@ void Preview::initialise(const PreviewType type)
TQString extension;
TQString tile = Prefs::tileSet();
TQString back = Prefs::background();
- TQString tqlayout = Prefs::layout();
+ TQString layout = Prefs::layout();
// set up the concept of the current file. Initialised to the preferences
// value initially. Set the caption to indicate what we are doing
@@ -98,10 +98,10 @@ void Preview::initialise(const PreviewType type)
break;
case board:
- m_fileSelector = i18n("*.tqlayout|Board Layout File (*.tqlayout)\n");
+ m_fileSelector = i18n("*.layout|Board Layout File (*.layout)\n");
setCaption(i18n("Change Board Layout"));
- m_selectedFile = tqlayout;
- extension = "*.tqlayout";
+ m_selectedFile = layout;
+ extension = "*.layout";
break;
case theme:
@@ -167,7 +167,7 @@ void Preview::load() {
}
}
-// Top level preview drawing method. Background, tileset and tqlayout
+// Top level preview drawing method. Background, tileset and layout
// are initialised from the preferences. Depending on the type
// of preview dialog we pick up the selected file for one of these
// chaps.
@@ -176,7 +176,7 @@ void Preview::drawPreview()
{
TQString tile = Prefs::tileSet();
TQString back = Prefs::background();
- TQString tqlayout = Prefs::layout();
+ TQString layout = Prefs::layout();
switch (m_previewType)
{
@@ -189,12 +189,12 @@ void Preview::drawPreview()
break;
case board:
- tqlayout = m_selectedFile;
+ layout = m_selectedFile;
break;
case theme:
// a theme is quite a bit of work. We load the
- // specified bits in (tqlayout, background and tileset
+ // specified bits in (layout, background and tileset
if (!m_selectedFile.isEmpty())
{
TQString backRaw, layoutRaw, tilesetRaw, magic;
@@ -233,17 +233,17 @@ void Preview::drawPreview()
back = locate("appdata", back);
}
- tqlayout = layoutRaw;
- tqlayout.replace(":", "/kmahjongg/pics/");
- if (!TQFile::exists(tqlayout))
+ layout = layoutRaw;
+ layout.replace(":", "/kmahjongg/pics/");
+ if (!TQFile::exists(layout))
{
- tqlayout = layoutRaw;
- tqlayout = "pics/" + tqlayout.right(tqlayout.length() - tqlayout.find(":") - 1);
- tqlayout = locate("appdata", tqlayout);
+ layout = layoutRaw;
+ layout = "pics/" + layout.right(layout.length() - layout.find(":") - 1);
+ layout = locate("appdata", layout);
}
m_themeBack=back;
- m_themeLayout=tqlayout;
+ m_themeLayout=layout;
m_themeTileset=tile;
}
}
@@ -251,7 +251,7 @@ void Preview::drawPreview()
}
renderBackground(back);
- renderTiles(tile, tqlayout);
+ renderTiles(tile, layout);
}
void Preview::paintEvent( TQPaintEvent* ){
@@ -260,7 +260,7 @@ void Preview::paintEvent( TQPaintEvent* ){
// the user selected ok, or apply. This method passes the changes
// across to the game widget and if necessary forces a board redraw
-// (unnecessary on tqlayout changes since it only effects the next game)
+// (unnecessary on layout changes since it only effects the next game)
void Preview::applyChange()
{
switch (m_previewType)
@@ -287,7 +287,7 @@ void Preview::applyChange()
break;
}
- // don't redraw for a tqlayout change
+ // don't redraw for a layout change
if (m_previewType == board || m_previewType == theme) layoutChange();
else boardRedraw(true);
@@ -310,9 +310,9 @@ void Preview::renderBackground(const TQString &bg) {
// This method draws a mini-tiled board with no tiles missing.
-void Preview::renderTiles(const TQString &file, const TQString &tqlayout) {
+void Preview::renderTiles(const TQString &file, const TQString &layout) {
m_tiles.loadTileset(file, true);
- m_boardLayout.loadBoardLayout(tqlayout);
+ m_boardLayout.loadBoardLayout(layout);
TQPixmap *dest = m_drawFrame->getPreviewPixmap();
int xOffset = m_tiles.width()/2;
@@ -366,7 +366,7 @@ void Preview::renderTiles(const TQString &file, const TQString &tqlayout) {
void Preview::saveTheme() {
TQString tile = Prefs::tileSet();
TQString back = Prefs::background();
- TQString tqlayout = Prefs::layout();
+ TQString layout = Prefs::layout();
TQString with = ":";
// we want to replace any path in the default store
@@ -375,7 +375,7 @@ void Preview::saveTheme() {
back.replace(p,with);
tile.replace(p,with);
- tqlayout.replace(p,with);
+ layout.replace(p,with);
// Get the name of the file to save
@@ -417,7 +417,7 @@ void Preview::saveTheme() {
themeMagicV1_0,
tile.utf8().data(),
back.utf8().data(),
- tqlayout.utf8().data());
+ layout.utf8().data());
fclose(outFile);
}