diff options
Diffstat (limited to 'kmahjongg')
-rw-r--r-- | kmahjongg/BoardLayout.cpp | 4 | ||||
-rw-r--r-- | kmahjongg/BoardLayout.h | 2 | ||||
-rw-r--r-- | kmahjongg/Preview.cpp | 12 | ||||
-rw-r--r-- | kmahjongg/Preview.h | 2 | ||||
-rw-r--r-- | kmahjongg/Tileset.cpp | 14 | ||||
-rw-r--r-- | kmahjongg/Tileset.h | 6 | ||||
-rw-r--r-- | kmahjongg/kmahjongg.cpp | 2 | ||||
-rw-r--r-- | kmahjongg/settings.ui | 2 |
8 files changed, 22 insertions, 22 deletions
diff --git a/kmahjongg/BoardLayout.cpp b/kmahjongg/BoardLayout.cpp index c9fd188e..8da404ae 100644 --- a/kmahjongg/BoardLayout.cpp +++ b/kmahjongg/BoardLayout.cpp @@ -29,7 +29,7 @@ bool BoardLayout::saveBoardLayout(const TQString where) { return false; } - TQCString tmp = tqlayoutMagic1_0.utf8(); + TQCString tmp = layoutMagic1_0.utf8(); if (f.writeBlock(tmp, tmp.length()) == -1) { return(false); } @@ -71,7 +71,7 @@ bool BoardLayout::loadBoardLayout(const TQString from) t.setCodec(TQTextCodec::codecForName("UTF-8")); TQString s; s = t.readLine(); - if (s != tqlayoutMagic1_0) { + if (s != layoutMagic1_0) { f.close(); return(false); } diff --git a/kmahjongg/BoardLayout.h b/kmahjongg/BoardLayout.h index 7bf58003..a9a809c7 100644 --- a/kmahjongg/BoardLayout.h +++ b/kmahjongg/BoardLayout.h @@ -4,7 +4,7 @@ #include <tqstring.h> #include "KmTypes.h" -const TQString tqlayoutMagic1_0 = "kmahjongg-tqlayout-v1.0"; +const TQString layoutMagic1_0 = "kmahjongg-tqlayout-v1.0"; class BoardLayout { diff --git a/kmahjongg/Preview.cpp b/kmahjongg/Preview.cpp index 5c5871bf..b99b3fd3 100644 --- a/kmahjongg/Preview.cpp +++ b/kmahjongg/Preview.cpp @@ -197,7 +197,7 @@ void Preview::drawPreview() // specified bits in (tqlayout, background and tileset if (!m_selectedFile.isEmpty()) { - TQString backRaw, tqlayoutRaw, tilesetRaw, magic; + TQString backRaw, layoutRaw, tilesetRaw, magic; TQFile in(m_selectedFile); if (in.open(IO_ReadOnly)) @@ -212,7 +212,7 @@ void Preview::drawPreview() } tilesetRaw = stream.readLine(); backRaw = stream.readLine(); - tqlayoutRaw = stream.readLine(); + layoutRaw = stream.readLine(); in.close(); tile = tilesetRaw; @@ -233,11 +233,11 @@ void Preview::drawPreview() back = locate("appdata", back); } - tqlayout = tqlayoutRaw; + tqlayout = layoutRaw; tqlayout.tqreplace(":", "/kmahjongg/pics/"); if (!TQFile::exists(tqlayout)) { - tqlayout = tqlayoutRaw; + tqlayout = layoutRaw; tqlayout = "pics/" + tqlayout.right(tqlayout.length() - tqlayout.tqfind(":") - 1); tqlayout = locate("appdata", tqlayout); } @@ -288,7 +288,7 @@ void Preview::applyChange() } // don't redraw for a tqlayout change - if (m_previewType == board || m_previewType == theme) tqlayoutChange(); + if (m_previewType == board || m_previewType == theme) layoutChange(); else boardRedraw(true); // either way we mark the current value as unchanged @@ -382,7 +382,7 @@ void Preview::saveTheme() { KURL url = KFileDialog::getSaveURL( NULL, "*.theme", - tqparentWidget(), + parentWidget(), i18n("Save Theme" )); if ( url.isEmpty() ) return; diff --git a/kmahjongg/Preview.h b/kmahjongg/Preview.h index 0c4b37c2..a987b7d2 100644 --- a/kmahjongg/Preview.h +++ b/kmahjongg/Preview.h @@ -71,7 +71,7 @@ signals: void loadTileset(const TQString &); void loadBackground(const TQString &, bool); void loadBoard(const TQString &); - void tqlayoutChange(); + void layoutChange(); public slots: void selectionChanged(int which); diff --git a/kmahjongg/Tileset.cpp b/kmahjongg/Tileset.cpp index fb4b1d05..b8c6ec2f 100644 --- a/kmahjongg/Tileset.cpp +++ b/kmahjongg/Tileset.cpp @@ -16,9 +16,9 @@ static unsigned char mini_bits[] = { 0xff, 0xff, 0x0f, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x07, 0xff, 0xff, 0x03, }; -#define tqmask_width 40 -#define tqmask_height 56 -static unsigned char tqmask_bits[] = { +#define mask_width 40 +#define mask_height 56 +static unsigned char mask_bits[] = { 0xf0, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -48,8 +48,8 @@ static unsigned char tqmask_bits[] = { // --------------------------------------------------------- Tileset::Tileset(bool scale): - tqmaskBits(tqmask_width, tqmask_height, tqmask_bits, true), - tqmaskBitsMini(mini_width, mini_height, mini_bits, true) + maskBits(mask_width, mask_height, mask_bits, true), + maskBitsMini(mini_width, mini_height, mini_bits, true) { isScaled = scale; divisor = (isScaled) ? 2 : 1; @@ -198,10 +198,10 @@ void Tileset::createPixmap(TQRgb *src, TQPixmap &dest, bool scale, bool shadow) // create the pixmap and initialise the drawing tqmask if (!scale) { dest.convertFromImage(buff); - dest.setMask(tqmaskBits); + dest.setMask(maskBits); } else { dest.convertFromImage(buff.smoothScale(w/2, h/2)); - dest.setMask(tqmaskBitsMini); + dest.setMask(maskBitsMini); } } diff --git a/kmahjongg/Tileset.h b/kmahjongg/Tileset.h index f728dfb0..c93cf102 100644 --- a/kmahjongg/Tileset.h +++ b/kmahjongg/Tileset.h @@ -61,14 +61,14 @@ class Tileset { private: - TQBitmap tqmaskBits; // xbm tqmask for the tile - TQBitmap tqmaskBitsMini; // xbm tqmask for the tile + TQBitmap maskBits; // xbm tqmask for the tile + TQBitmap maskBitsMini; // xbm tqmask for the tile TQRgb* tiles; // Buffer containing all tiles (unselected glyphs) TQRgb* selectedTiles; // Buffer containing all tiles (selected glyphs) // in version 0.5 we have moved ftom using images and calculating - // tqmasks etc, to using pixmaps and letting the blt do the hard work, + // masks etc, to using pixmaps and letting the blt do the hard work, // in hardware. TQPixmap selectedPix[maxTiles]; // selected tiles TQPixmap unselectedPix[maxTiles]; // unselected tiles diff --git a/kmahjongg/kmahjongg.cpp b/kmahjongg/kmahjongg.cpp index d9f20522..49246f92 100644 --- a/kmahjongg/kmahjongg.cpp +++ b/kmahjongg/kmahjongg.cpp @@ -100,7 +100,7 @@ KMahjongg::KMahjongg( TQWidget* tqparent, const char *name) connect( previewLoad, TQT_SIGNAL( boardRedraw(bool) ), bw, TQT_SLOT( drawBoard(bool) ) ); - connect( previewLoad, TQT_SIGNAL( tqlayoutChange() ), + connect( previewLoad, TQT_SIGNAL( layoutChange() ), this, TQT_SLOT( newGame() ) ); diff --git a/kmahjongg/settings.ui b/kmahjongg/settings.ui index 2cb105d8..594cf9b7 100644 --- a/kmahjongg/settings.ui +++ b/kmahjongg/settings.ui @@ -167,5 +167,5 @@ </widget> </vbox> </widget> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> |