summaryrefslogtreecommitdiffstats
path: root/knights/setpagedisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knights/setpagedisplay.cpp')
-rw-r--r--knights/setpagedisplay.cpp206
1 files changed, 103 insertions, 103 deletions
diff --git a/knights/setpagedisplay.cpp b/knights/setpagedisplay.cpp
index 1cf82d9..aedeb91 100644
--- a/knights/setpagedisplay.cpp
+++ b/knights/setpagedisplay.cpp
@@ -20,15 +20,15 @@
#include <kmessagebox.h>
#include <kcolordialog.h>
#include <kfontdialog.h>
-#include <qstyle.h>
-#include <qregexp.h>
+#include <tqstyle.h>
+#include <tqregexp.h>
#include <kiconloader.h>
#include <kfiledialog.h>
#include <kio/netaccess.h>
-setPageDisplay::setPageDisplay(QWidget *parent, resource *Rsrc ) : QVBoxLayout(parent)
+setPageDisplay::setPageDisplay(TQWidget *tqparent, resource *Rsrc ) : TQVBoxLayout(tqparent)
{
- QStyle& Style = QApplication::style();
+ TQStyle& Style = TQApplication::tqstyle();
Resource = Rsrc;
margin = Style.defaultFrameWidth();
NewBoards = 0;
@@ -37,7 +37,7 @@ setPageDisplay::setPageDisplay(QWidget *parent, resource *Rsrc ) : QVBoxLayout(
refreshBoard = FALSE;
rebuildConsole = FALSE;
- TabParent = new QTabWidget( parent, "setPageDisplay" );
+ TabParent = new TQTabWidget( tqparent, "setPageDisplay" );
initTab1();
initTab2();
addWidget( TabParent );
@@ -66,87 +66,87 @@ setPageDisplay::~setPageDisplay()
///////////////////////////////////////
void setPageDisplay::initTab1( void )
{
- Tab1 = new QVBox( TabParent );
+ Tab1 = new TQVBox( TabParent );
Tab1->setMargin( margin );
- BOX_Themes = new QHBox( Tab1 );
- GROUP_Boards = new QGroupBox( 1,
+ BOX_Themes = new TQHBox( Tab1 );
+ GROUP_Boards = new TQGroupBox( 1,
Qt::Vertical,
i18n( "Board Themes" ),
BOX_Themes );
Current_Boards = new KComboBox ( GROUP_Boards );
- GROUP_Chessmen = new QGroupBox( 1,
+ GROUP_Chessmen = new TQGroupBox( 1,
Qt::Vertical,
i18n( "Chessman Themes" ),
BOX_Themes );
Current_Chessmen = new KComboBox ( GROUP_Chessmen );
- GROUP_Theme_Size = new QGroupBox( 3,
+ GROUP_Theme_Size = new TQGroupBox( 3,
Qt::Horizontal,
i18n( "Theme Size" ),
Tab1 );
- Size_Min = new QLabel( i18n( "Small" ), GROUP_Theme_Size );
- Current_Theme_Size = new QSlider ( 0,
+ Size_Min = new TQLabel( i18n( "Small" ), GROUP_Theme_Size );
+ Current_Theme_Size = new TQSlider ( 0,
14,
2,
( Resource->ThemeSize - IMAGE_MIN ) / 8 ,
- QSlider::Horizontal,
+ Qt::Horizontal,
GROUP_Theme_Size );
- Size_Max = new QLabel( i18n( "Large" ), GROUP_Theme_Size );
+ Size_Max = new TQLabel( i18n( "Large" ), GROUP_Theme_Size );
- GROUP_SCID_Images = new QGroupBox( 2, Qt::Horizontal, i18n("Player Images File:"), Tab1 );
+ GROUP_SCID_Images = new TQGroupBox( 2, Qt::Horizontal, i18n("Player Images File:"), Tab1 );
EDIT_SCID_Images = new KLineEdit( GROUP_SCID_Images );
EDIT_SCID_Images->setText( Resource->SCID_Image_Path );
- connect( EDIT_SCID_Images, SIGNAL( textChanged(const QString&) ), this, SLOT( slot_SCID_Images(const QString&) ) );
- BUTTON_SCID_Images = new QPushButton( GROUP_SCID_Images );
- BUTTON_SCID_Images->setPixmap( Resource->LoadIcon( QString( "fileopen" ), KIcon::Toolbar ) );
- connect( BUTTON_SCID_Images, SIGNAL( clicked() ), this, SLOT( slot_SCID_Images_Button() ) );
+ connect( EDIT_SCID_Images, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( slot_SCID_Images(const TQString&) ) );
+ BUTTON_SCID_Images = new TQPushButton( GROUP_SCID_Images );
+ BUTTON_SCID_Images->setPixmap( Resource->LoadIcon( TQString( "fileopen" ), KIcon::Toolbar ) );
+ connect( BUTTON_SCID_Images, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_SCID_Images_Button() ) );
- GROUP_General_Graphics = new QGroupBox( 4,
+ GROUP_General_Graphics = new TQGroupBox( 4,
Qt::Vertical,
i18n( "Other Display Options" ),
Tab1 );
- Board_Orientation = new QCheckBox( i18n( "Reverse Board Orientation" ), GROUP_General_Graphics );
+ Board_Orientation = new TQCheckBox( i18n( "Reverse Board Qt::Orientation" ), GROUP_General_Graphics );
Board_Orientation->setChecked( Resource->OPTION_Board_Orientation );
- connect( Board_Orientation, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Board_Orientation(bool) ) );
+ connect( Board_Orientation, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Board_Orientation(bool) ) );
- Show_Splashscreen = new QCheckBox( i18n( "Display Startup Logo" ), GROUP_General_Graphics );
+ Show_Splashscreen = new TQCheckBox( i18n( "Display Startup Logo" ), GROUP_General_Graphics );
Show_Splashscreen->setChecked( Resource->OPTION_Show_Splash );
- connect( Show_Splashscreen, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Splashscreen(bool) ) );
+ connect( Show_Splashscreen, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Splashscreen(bool) ) );
- Auto_Preview = new QCheckBox( i18n( "Automatic Preview" ), GROUP_General_Graphics );
+ Auto_Preview = new TQCheckBox( i18n( "Automatic Preview" ), GROUP_General_Graphics );
Auto_Preview->setChecked( Resource->OPTION_Auto_Preview );
- connect( Auto_Preview, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Auto_Preview(bool) ) );
+ connect( Auto_Preview, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Auto_Preview(bool) ) );
- Show_Last_Move = new QCheckBox( i18n( "Show Last Move" ), GROUP_General_Graphics );
+ Show_Last_Move = new TQCheckBox( i18n( "Show Last Move" ), GROUP_General_Graphics );
Show_Last_Move->setChecked( Resource->OPTION_Show_Last_Move );
- connect( Show_Last_Move, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Show_Last_Move(bool) ) );
+ connect( Show_Last_Move, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Show_Last_Move(bool) ) );
- Animate_Move = new QCheckBox( i18n( "Animate Moves" ), GROUP_General_Graphics );
+ Animate_Move = new TQCheckBox( i18n( "Animate Moves" ), GROUP_General_Graphics );
Animate_Move->setChecked( Resource->OPTION_Animate_Moves );
- connect( Animate_Move, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Animate_Move(bool) ) );
+ connect( Animate_Move, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Animate_Move(bool) ) );
- Show_Coord = new QCheckBox( i18n( "Show Coordinates" ), GROUP_General_Graphics );
+ Show_Coord = new TQCheckBox( i18n( "Show Coordinates" ), GROUP_General_Graphics );
Show_Coord->setChecked( Resource->OPTION_Show_Coord );
- connect( Show_Coord, SIGNAL( toggled(bool) ),
- this, SLOT( slotToggle_Show_Coord(bool) ) );
+ connect( Show_Coord, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotToggle_Show_Coord(bool) ) );
- Current_Theme_Size->setTickmarks( QSlider::Below );
+ Current_Theme_Size->setTickmarks( TQSlider::Below );
Current_Boards->setEditable( FALSE );
Current_Chessmen->setEditable( FALSE );
buildThemeList();
- connect( Current_Boards, SIGNAL( activated(int) ),
- this, SLOT( slotCurrent_Boards(int) ) );
- connect( Current_Chessmen, SIGNAL( activated(int) ),
- this, SLOT( slotCurrent_Chessmen(int) ) );
- connect( Current_Theme_Size, SIGNAL( valueChanged(int) ),
- this, SLOT( slotCurrent_Theme_Size(int) ) );
+ connect( Current_Boards, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT( slotCurrent_Boards(int) ) );
+ connect( Current_Chessmen, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT( slotCurrent_Chessmen(int) ) );
+ connect( Current_Theme_Size, TQT_SIGNAL( valueChanged(int) ),
+ this, TQT_SLOT( slotCurrent_Theme_Size(int) ) );
TabParent->addTab( Tab1, i18n("General") );
}
///////////////////////////////////////
@@ -156,77 +156,77 @@ void setPageDisplay::initTab1( void )
///////////////////////////////////////
void setPageDisplay::initTab2( void )
{
- QPixmap ColorsIcon( Resource->LoadIcon( QString("colorize"), KIcon::Toolbar ) );
- Tab2 = new QFrame( TabParent );
+ TQPixmap ColorsIcon( Resource->LoadIcon( TQString("colorize"), KIcon::Toolbar ) );
+ Tab2 = new TQFrame( TabParent );
Tab2->setMargin( margin );
- GRID_Style = new QGridLayout( Tab2, 11, 5, margin );
+ GRID_Style = new TQGridLayout( Tab2, 11, 5, margin );
- Console_Sample = new QTextView( Tab2 );
- Console_Sample->setTextFormat( Qt::RichText );
+ Console_Sample = new TQTextView( Tab2 );
+ Console_Sample->setTextFormat( TQt::RichText );
GRID_Style->addMultiCellWidget( Console_Sample, 5, 10, 1, 1 );
- Default_Button = new QPushButton( i18n("Restore Defaults"), Tab2 );
- connect( Default_Button, SIGNAL( clicked() ), this, SLOT( slot_setDefault() ) );
+ Default_Button = new TQPushButton( i18n("Restore Defaults"), Tab2 );
+ connect( Default_Button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_setDefault() ) );
GRID_Style->addWidget( Default_Button, 11, 1 );
- Fonts_Button_Standard = new QPushButton( i18n("Standard Font..."), Tab2 );
- connect( Fonts_Button_Standard, SIGNAL( clicked() ), this, SLOT( slot_Font_Standard() ) );
+ Fonts_Button_Standard = new TQPushButton( i18n("Standard Font..."), Tab2 );
+ connect( Fonts_Button_Standard, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_Standard() ) );
GRID_Style->addWidget( Fonts_Button_Standard, 5, 3 );
- Colors_Button_Standard = new QPushButton( Tab2 );
+ Colors_Button_Standard = new TQPushButton( Tab2 );
Colors_Button_Standard->setPixmap( ColorsIcon );
- connect( Colors_Button_Standard, SIGNAL( clicked() ), this, SLOT( slot_Color_Standard() ) );
+ connect( Colors_Button_Standard, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_Standard() ) );
GRID_Style->addWidget( Colors_Button_Standard, 5, 5 );
- Fonts_Button_PrivateTell = new QPushButton( i18n("Private Font..."), Tab2 );
- connect( Fonts_Button_PrivateTell, SIGNAL( clicked() ), this, SLOT( slot_Font_PrivateTell() ) );
+ Fonts_Button_PrivateTell = new TQPushButton( i18n("Private Font..."), Tab2 );
+ connect( Fonts_Button_PrivateTell, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_PrivateTell() ) );
GRID_Style->addWidget( Fonts_Button_PrivateTell, 6, 3 );
- Colors_Button_PrivateTell = new QPushButton( Tab2 );
+ Colors_Button_PrivateTell = new TQPushButton( Tab2 );
Colors_Button_PrivateTell->setPixmap( ColorsIcon );
- connect( Colors_Button_PrivateTell, SIGNAL( clicked() ), this, SLOT( slot_Color_PrivateTell() ) );
+ connect( Colors_Button_PrivateTell, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_PrivateTell() ) );
GRID_Style->addWidget( Colors_Button_PrivateTell, 6, 5 );
- Fonts_Button_ChannelTell = new QPushButton( i18n("Channel Font..."), Tab2 );
- connect( Fonts_Button_ChannelTell, SIGNAL( clicked() ), this, SLOT( slot_Font_ChannelTell() ) );
+ Fonts_Button_ChannelTell = new TQPushButton( i18n("Channel Font..."), Tab2 );
+ connect( Fonts_Button_ChannelTell, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_ChannelTell() ) );
GRID_Style->addWidget( Fonts_Button_ChannelTell, 7, 3 );
- Colors_Button_ChannelTell = new QPushButton( Tab2 );
+ Colors_Button_ChannelTell = new TQPushButton( Tab2 );
Colors_Button_ChannelTell->setPixmap( ColorsIcon );
- connect( Colors_Button_ChannelTell, SIGNAL( clicked() ), this, SLOT( slot_Color_ChannelTell() ) );
+ connect( Colors_Button_ChannelTell, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_ChannelTell() ) );
GRID_Style->addWidget( Colors_Button_ChannelTell, 7, 5 );
- Fonts_Button_Shout = new QPushButton( i18n("Shout Font..."), Tab2 );
- connect( Fonts_Button_Shout, SIGNAL( clicked() ), this, SLOT( slot_Font_Shout() ) );
+ Fonts_Button_Shout = new TQPushButton( i18n("Shout Font..."), Tab2 );
+ connect( Fonts_Button_Shout, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_Shout() ) );
GRID_Style->addWidget( Fonts_Button_Shout, 8, 3 );
- Colors_Button_Shout = new QPushButton( Tab2 );
+ Colors_Button_Shout = new TQPushButton( Tab2 );
Colors_Button_Shout->setPixmap( ColorsIcon );
- connect( Colors_Button_Shout, SIGNAL( clicked() ), this, SLOT( slot_Color_Shout() ) );
+ connect( Colors_Button_Shout, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_Shout() ) );
GRID_Style->addWidget( Colors_Button_Shout, 8, 5 );
- Fonts_Button_Whisper = new QPushButton( i18n("Whisper Font..."), Tab2 );
- connect( Fonts_Button_Whisper, SIGNAL( clicked() ), this, SLOT( slot_Font_Whisper() ) );
+ Fonts_Button_Whisper = new TQPushButton( i18n("Whisper Font..."), Tab2 );
+ connect( Fonts_Button_Whisper, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_Whisper() ) );
GRID_Style->addWidget( Fonts_Button_Whisper, 9, 3 );
- Colors_Button_Whisper = new QPushButton( Tab2 );
+ Colors_Button_Whisper = new TQPushButton( Tab2 );
Colors_Button_Whisper->setPixmap( ColorsIcon );
- connect( Colors_Button_Whisper, SIGNAL( clicked() ), this, SLOT( slot_Color_Whisper() ) );
+ connect( Colors_Button_Whisper, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_Whisper() ) );
GRID_Style->addWidget( Colors_Button_Whisper, 9, 5 );
- Fonts_Button_Notification = new QPushButton( i18n("Notification Font..."), Tab2 );
- connect( Fonts_Button_Notification, SIGNAL( clicked() ), this, SLOT( slot_Font_Notification() ) );
+ Fonts_Button_Notification = new TQPushButton( i18n("Notification Font..."), Tab2 );
+ connect( Fonts_Button_Notification, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Font_Notification() ) );
GRID_Style->addWidget( Fonts_Button_Notification, 10, 3 );
- Colors_Button_Notification = new QPushButton( Tab2 );
+ Colors_Button_Notification = new TQPushButton( Tab2 );
Colors_Button_Notification->setPixmap( ColorsIcon );
- connect( Colors_Button_Notification, SIGNAL( clicked() ), this, SLOT( slot_Color_Notification() ) );
+ connect( Colors_Button_Notification, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_Notification() ) );
GRID_Style->addWidget( Colors_Button_Notification, 10, 5 );
- Colors_Button_Background = new QPushButton( Tab2 );
+ Colors_Button_Background = new TQPushButton( Tab2 );
Colors_Button_Background->setPixmap( ColorsIcon );
- connect( Colors_Button_Background, SIGNAL( clicked() ), this, SLOT( slot_Color_Background() ) );
+ connect( Colors_Button_Background, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slot_Color_Background() ) );
GRID_Style->addWidget( Colors_Button_Background, 11, 5 );
resetSampleConsole();
@@ -247,11 +247,11 @@ void setPageDisplay::slot_setDefault(void)
Resource->FONT_Notification = KGlobalSettings::fixedFont();
Resource->COLOR_Background = Resource->COLOR_White;
Resource->COLOR_Standard = Resource->COLOR_Black;
- Resource->COLOR_PrivateTell = QColor( 128, 0, 128 ); // Purple
- Resource->COLOR_ChannelTell = QColor( 0, 0, 160 ); // Blue
- Resource->COLOR_Shout = QColor( 160, 0, 0 ); // Red
- Resource->COLOR_Whisper = QColor( 0, 160, 0 ); // Green
- Resource->COLOR_Notification = QColor( 0, 128, 128 ); // Cyan
+ Resource->COLOR_PrivateTell = TQColor( 128, 0, 128 ); // Purple
+ Resource->COLOR_ChannelTell = TQColor( 0, 0, 160 ); // Blue
+ Resource->COLOR_Shout = TQColor( 160, 0, 0 ); // Red
+ Resource->COLOR_Whisper = TQColor( 0, 160, 0 ); // Green
+ Resource->COLOR_Notification = TQColor( 0, 128, 128 ); // Cyan
resetSampleConsole();
rebuildConsole = TRUE;
emit enableApply();
@@ -472,7 +472,7 @@ void setPageDisplay::slotToggle_Show_Coord( bool state )
///////////////////////////////////////
void setPageDisplay::buildThemeList( void )
{
- QString buffer;
+ TQString buffer;
int tmp(0);
Current_Boards->clear();
@@ -483,10 +483,10 @@ void setPageDisplay::buildThemeList( void )
buffer = Resource->getBoard( tmp );
if( buffer.isEmpty() ) break;
buffer.remove( 0, 2 );
- buffer.replace( QRegExp("_"), " " );
- buffer.replace( QRegExp(".tar"), "" );
- buffer.replace( QRegExp(".gz"), "" );
- buffer.replace( QRegExp(".bz2"), "" );
+ buffer.tqreplace( TQRegExp("_"), " " );
+ buffer.tqreplace( TQRegExp(".tar"), "" );
+ buffer.tqreplace( TQRegExp(".gz"), "" );
+ buffer.tqreplace( TQRegExp(".bz2"), "" );
Current_Boards->insertItem( buffer, tmp );
if( Resource->getBoard() == Resource->getBoard( tmp ) )
{
@@ -502,10 +502,10 @@ void setPageDisplay::buildThemeList( void )
buffer = Resource->getChessmen( tmp );
if( buffer.isEmpty() ) break;
buffer.remove( 0, 2 );
- buffer.replace( QRegExp("_"), " " );
- buffer.replace( QRegExp(".tar"), "" );
- buffer.replace( QRegExp(".gz"), "" );
- buffer.replace( QRegExp(".bz2"), "" );
+ buffer.tqreplace( TQRegExp("_"), " " );
+ buffer.tqreplace( TQRegExp(".tar"), "" );
+ buffer.tqreplace( TQRegExp(".gz"), "" );
+ buffer.tqreplace( TQRegExp(".bz2"), "" );
Current_Chessmen->insertItem( buffer, tmp );
if( Resource->getChessmen() == Resource->getChessmen( tmp ) )
{
@@ -523,20 +523,20 @@ void setPageDisplay::buildThemeList( void )
void setPageDisplay::resetSampleConsole( void )
{
Resource->buildStyle();
- Console_Sample->setPaper( QBrush( Resource->COLOR_Background ) );
- Console_Sample->setText( QString( "<K_STD>" + i18n( "Standard" ) + "</K_STD>\n" ) );
- Console_Sample->append( QString( "<K_PVT>" + i18n( "Private Tell" ) + "</K_PVT>\n" ) );
- Console_Sample->append( QString( "<K_CH>" + i18n( "Channel Tell" ) + "</K_CH>\n" ) );
- Console_Sample->append( QString( "<K_SHT>" + i18n( "Shout" ) + "</K_SHT>\n" ) );
- Console_Sample->append( QString( "<K_WSP>" + i18n( "Whisper" ) + "</K_WSP>\n" ) );
- Console_Sample->append( QString( "<K_NOT>" + i18n( "Notification" ) + "</K_NOT>" ) );
+ Console_Sample->setPaper( TQBrush( Resource->COLOR_Background ) );
+ Console_Sample->setText( TQString( "<K_STD>" + i18n( "Standard" ) + "</K_STD>\n" ) );
+ Console_Sample->append( TQString( "<K_PVT>" + i18n( "Private Tell" ) + "</K_PVT>\n" ) );
+ Console_Sample->append( TQString( "<K_CH>" + i18n( "Channel Tell" ) + "</K_CH>\n" ) );
+ Console_Sample->append( TQString( "<K_SHT>" + i18n( "Shout" ) + "</K_SHT>\n" ) );
+ Console_Sample->append( TQString( "<K_WSP>" + i18n( "Whisper" ) + "</K_WSP>\n" ) );
+ Console_Sample->append( TQString( "<K_NOT>" + i18n( "Notification" ) + "</K_NOT>" ) );
}
///////////////////////////////////////
//
// setPageDisplay::slot_SCID_Images
//
///////////////////////////////////////
-void setPageDisplay::slot_SCID_Images( const QString& string )
+void setPageDisplay::slot_SCID_Images( const TQString& string )
{
Resource->SCID_Image_Path = string;
emit enableApply();
@@ -548,10 +548,10 @@ void setPageDisplay::slot_SCID_Images( const QString& string )
///////////////////////////////////////
void setPageDisplay::slot_SCID_Images_Button( void )
{
- QString temp;
+ TQString temp;
- temp = KFileDialog::getOpenFileName( QString::null,
- QString( "*" ),
+ temp = KFileDialog::getOpenFileName( TQString(),
+ TQString( "*" ),
Tab1,
i18n( "Find Player Images File..." ) );
if( temp.isEmpty() ) return;