summaryrefslogtreecommitdiffstats
path: root/kmahjongg/Preview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmahjongg/Preview.cpp')
-rw-r--r--kmahjongg/Preview.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kmahjongg/Preview.cpp b/kmahjongg/Preview.cpp
index 9c6ac478..ff635e5c 100644
--- a/kmahjongg/Preview.cpp
+++ b/kmahjongg/Preview.cpp
@@ -41,7 +41,7 @@ Preview::Preview(TQWidget* parent) : KDialogBase(parent), m_tiles(true)
m_changed = false;
setMainWidget(page);
- setFixedSize(sizeHint());
+ setFixedSize(tqsizeHint());
}
Preview::~Preview()
@@ -52,7 +52,7 @@ void Preview::selectionChanged(int which)
{
m_selectedFile = m_fileList[which];
drawPreview();
- m_drawFrame->repaint(0,0,-1,-1,false);
+ m_drawFrame->tqrepaint(0,0,-1,-1,false);
markChanged();
}
@@ -76,7 +76,7 @@ void Preview::initialise(const PreviewType type)
TQString extension;
TQString tile = Prefs::tileSet();
TQString back = Prefs::background();
- TQString layout = Prefs::layout();
+ TQString tqlayout = 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("*.layout|Board Layout File (*.layout)\n");
+ m_fileSelector = i18n("*.tqlayout|Board Layout File (*.tqlayout)\n");
setCaption(i18n("Change Board Layout"));
- m_selectedFile = layout;
- extension = "*.layout";
+ m_selectedFile = tqlayout;
+ extension = "*.tqlayout";
break;
case theme:
@@ -162,12 +162,12 @@ void Preview::load() {
if ( !url.isEmpty() ) {
m_selectedFile = url.path();
drawPreview();
- m_drawFrame->repaint(0,0,-1,-1,false);
+ m_drawFrame->tqrepaint(0,0,-1,-1,false);
markChanged();
}
}
-// Top level preview drawing method. Background, tileset and layout
+// Top level preview drawing method. Background, tileset and tqlayout
// 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 layout = Prefs::layout();
+ TQString tqlayout = Prefs::layout();
switch (m_previewType)
{
@@ -189,12 +189,12 @@ void Preview::drawPreview()
break;
case board:
- layout = m_selectedFile;
+ tqlayout = m_selectedFile;
break;
case theme:
// a theme is quite a bit of work. We load the
- // specified bits in (layout, background and tileset
+ // specified bits in (tqlayout, background and tileset
if (!m_selectedFile.isEmpty())
{
TQString backRaw, layoutRaw, tilesetRaw, magic;
@@ -233,17 +233,17 @@ void Preview::drawPreview()
back = locate("appdata", back);
}
- layout = layoutRaw;
- layout.replace(":", "/kmahjongg/pics/");
- if (!TQFile::exists(layout))
+ tqlayout = layoutRaw;
+ tqlayout.replace(":", "/kmahjongg/pics/");
+ if (!TQFile::exists(tqlayout))
{
- layout = layoutRaw;
- layout = "pics/" + layout.right(layout.length() - layout.find(":") - 1);
- layout = locate("appdata", layout);
+ tqlayout = layoutRaw;
+ tqlayout = "pics/" + tqlayout.right(tqlayout.length() - tqlayout.find(":") - 1);
+ tqlayout = locate("appdata", tqlayout);
}
m_themeBack=back;
- m_themeLayout=layout;
+ m_themeLayout=tqlayout;
m_themeTileset=tile;
}
}
@@ -251,16 +251,16 @@ void Preview::drawPreview()
}
renderBackground(back);
- renderTiles(tile, layout);
+ renderTiles(tile, tqlayout);
}
void Preview::paintEvent( TQPaintEvent* ){
- m_drawFrame->repaint(false);
+ m_drawFrame->tqrepaint(false);
}
// 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 layout changes since it only effects the next game)
+// (unnecessary on tqlayout 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 layout change
+ // don't redraw for a tqlayout 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 &layout) {
+void Preview::renderTiles(const TQString &file, const TQString &tqlayout) {
m_tiles.loadTileset(file, true);
- m_boardLayout.loadBoardLayout(layout);
+ m_boardLayout.loadBoardLayout(tqlayout);
TQPixmap *dest = m_drawFrame->getPreviewPixmap();
int xOffset = m_tiles.width()/2;
@@ -366,7 +366,7 @@ void Preview::renderTiles(const TQString &file, const TQString &layout) {
void Preview::saveTheme() {
TQString tile = Prefs::tileSet();
TQString back = Prefs::background();
- TQString layout = Prefs::layout();
+ TQString tqlayout = 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);
- layout.replace(p,with);
+ tqlayout.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(),
- layout.utf8().data());
+ tqlayout.utf8().data());
fclose(outFile);
}