#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'page_generalbase.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "page_generalbase.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqspinbox.h>
#include <ntqcheckbox.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a PageGeneralBase which is a child of 'parent', with the
 *  name 'name'.' 
 */
PageGeneralBase::PageGeneralBase( TQWidget* parent,  const char* name )
    : TQFrame( parent, name )
{
    if ( !name )
	setName( "PageGeneralBase" );
    setMinimumSize( TQSize( 425, 0 ) );
    setFrameShape( TQFrame::NoFrame );
    setFrameShadow( TQFrame::Plain );
    PageGeneralBaseLayout = new TQVBoxLayout( this, 0, 6, "PageGeneralBaseLayout"); 

    miscGB = new TQGroupBox( this, "miscGB" );
    miscGB->setFrameShape( TQGroupBox::GroupBoxPanel );
    miscGB->setFrameShadow( TQGroupBox::Sunken );
    miscGB->setColumnLayout(0, TQt::Vertical );
    miscGB->layout()->setSpacing( 6 );
    miscGB->layout()->setMargin( 11 );
    miscGBLayout = new TQGridLayout( miscGB->layout() );
    miscGBLayout->setAlignment( TQt::AlignTop );

    Layout11 = new TQHBoxLayout( 0, 0, 6, "Layout11"); 

    historyItemsLabel = new TQLabel( miscGB, "historyItemsLabel" );
    historyItemsLabel->setMaximumSize( TQSize( 120, 32767 ) );
    Layout11->addWidget( historyItemsLabel );

    historySB = new TQSpinBox( miscGB, "historySB" );
    historySB->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, historySB->sizePolicy().hasHeightForWidth() ) );
    historySB->setMaxValue( 10000 );
    Layout11->addWidget( historySB );

    miscGBLayout->addLayout( Layout11, 5, 1 );

    publicAway = new TQCheckBox( miscGB, "publicAway" );

    miscGBLayout->addWidget( publicAway, 2, 1 );

    autoCreateWindowCB = new TQCheckBox( miscGB, "autoCreateWindowCB" );

    miscGBLayout->addWidget( autoCreateWindowCB, 1, 0 );

    autoCreateWindowForNoticeCB = new TQCheckBox( miscGB, "autoCreateWindowForNoticeCB" );

    miscGBLayout->addWidget( autoCreateWindowForNoticeCB, 2, 0 );

    autoRejoinCB = new TQCheckBox( miscGB, "autoRejoinCB" );

    miscGBLayout->addWidget( autoRejoinCB, 1, 1 );

    dockPopupsCB = new TQCheckBox( miscGB, "dockPopupsCB" );

    miscGBLayout->addWidget( dockPopupsCB, 4, 1 );

    displayTopicCB = new TQCheckBox( miscGB, "displayTopicCB" );

    miscGBLayout->addWidget( displayTopicCB, 4, 0 );

    colorPickerPopupCB = new TQCheckBox( miscGB, "colorPickerPopupCB" );

    miscGBLayout->addWidget( colorPickerPopupCB, 0, 1 );

    oneLineEditCB = new TQCheckBox( miscGB, "oneLineEditCB" );

    miscGBLayout->addWidget( oneLineEditCB, 5, 0 );

    useColourNickListCB = new TQCheckBox( miscGB, "useColourNickListCB" );

    miscGBLayout->addWidget( useColourNickListCB, 3, 1 );
    spacer4 = new TQSpacerItem( 16, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    miscGBLayout->addItem( spacer4, 2, 2 );

    nickCompletionCB = new TQCheckBox( miscGB, "nickCompletionCB" );

    miscGBLayout->addWidget( nickCompletionCB, 3, 0 );

    dockedOnlyCB = new TQCheckBox( miscGB, "dockedOnlyCB" );

    miscGBLayout->addWidget( dockedOnlyCB, 0, 0 );

    autoSaveHistoryCB = new TQCheckBox( miscGB, "autoSaveHistoryCB" );

    miscGBLayout->addWidget( autoSaveHistoryCB, 6, 0 );
    PageGeneralBaseLayout->addWidget( miscGB );

    groupBox4 = new TQGroupBox( this, "groupBox4" );
    groupBox4->setColumnLayout(0, TQt::Vertical );
    groupBox4->layout()->setSpacing( 6 );
    groupBox4->layout()->setMargin( 11 );
    groupBox4Layout = new TQGridLayout( groupBox4->layout() );
    groupBox4Layout->setAlignment( TQt::AlignTop );

    timeStampCB = new TQCheckBox( groupBox4, "timeStampCB" );

    groupBox4Layout->addWidget( timeStampCB, 1, 0 );

    applyGloballyCB = new TQCheckBox( groupBox4, "applyGloballyCB" );

    groupBox4Layout->addMultiCellWidget( applyGloballyCB, 0, 0, 0, 1 );

    showTopicCB = new TQCheckBox( groupBox4, "showTopicCB" );

    groupBox4Layout->addWidget( showTopicCB, 1, 1 );

    beepCB = new TQCheckBox( groupBox4, "beepCB" );

    groupBox4Layout->addWidget( beepCB, 2, 0 );

    joinPartCB = new TQCheckBox( groupBox4, "joinPartCB" );

    groupBox4Layout->addWidget( joinPartCB, 3, 0 );

    enLoggingCB = new TQCheckBox( groupBox4, "enLoggingCB" );

    groupBox4Layout->addWidget( enLoggingCB, 2, 1 );

    layout2 = new TQHBoxLayout( 0, 0, 6, "layout2"); 

    encodingsL = new TQLabel( groupBox4, "encodingsL" );
    layout2->addWidget( encodingsL );

    encodingsCB = new TQComboBox( false, groupBox4, "encodingsCB" );
    layout2->addWidget( encodingsCB );

    groupBox4Layout->addMultiCellLayout( layout2, 4, 4, 0, 1 );
    PageGeneralBaseLayout->addWidget( groupBox4 );
    spacer2 = new TQSpacerItem( 31, 71, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    PageGeneralBaseLayout->addItem( spacer2 );
    languageChange();
    resize( TQSize(443, 489).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( autoCreateWindowCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( nickCompletionCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( displayTopicCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( beepCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( colorPickerPopupCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( autoRejoinCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( historySB, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( changed() ) );
    connect( publicAway, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( changed() ) );
    connect( showTopicCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( enLoggingCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( timeStampCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( applyGloballyCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( oneLineEditCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( useColourNickListCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( autoCreateWindowForNoticeCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( dockedOnlyCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( dockPopupsCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( encodingsCB, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( changed() ) );
    connect( joinPartCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );

    // tab order
    setTabOrder( autoCreateWindowCB, nickCompletionCB );
    setTabOrder( nickCompletionCB, displayTopicCB );
    setTabOrder( displayTopicCB, colorPickerPopupCB );
    setTabOrder( colorPickerPopupCB, autoRejoinCB );
    setTabOrder( autoRejoinCB, publicAway );
    setTabOrder( publicAway, historySB );
    setTabOrder( historySB, timeStampCB );
    setTabOrder( timeStampCB, beepCB );
    setTabOrder( beepCB, showTopicCB );
    setTabOrder( showTopicCB, enLoggingCB );

    // buddies
    historyItemsLabel->setBuddy( historySB );
    encodingsL->setBuddy( encodingsCB );
}

/*
 *  Destroys the object and frees any allocated resources
 */
PageGeneralBase::~PageGeneralBase()
{
    // no need to delete child widgets, TQt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PageGeneralBase::languageChange()
{
    setCaption( tr2i18n( "General" ) );
    miscGB->setTitle( tr2i18n( "Global Options" ) );
    historyItemsLabel->setText( tr2i18n( "Histor&y length:" ) );
    historySB->setSuffix( tr2i18n( " lines" ) );
    historySB->setSpecialValueText( tr2i18n( "unlimited" ) );
    TQToolTip::add( historySB, tr2i18n( "Stores up to this many lines of chat from each window as history" ) );
    TQWhatsThis::add( historySB, tr2i18n( "Stores up to this many lines of chat from each window, allowing you to scroll upwards and see what has already been said." ) );
    publicAway->setText( tr2i18n( "&Announce away messages" ) );
    TQToolTip::add( publicAway, tr2i18n( "See the messages when a user selects the away option" ) );
    TQWhatsThis::add( publicAway, tr2i18n( "If this is checked, you will see the messages when a user selects the away option. By default this option is not checked." ) );
    autoCreateWindowCB->setText( tr2i18n( "A&uto create window" ) );
    TQToolTip::add( autoCreateWindowCB, tr2i18n( "Will auto create a window for each user who sends a /msg to you" ) );
    TQWhatsThis::add( autoCreateWindowCB, tr2i18n( "If selected, KSirc  will automatically create a new window for each user who sends a /msg command to you. If not selected, any text sent to you with /msg is displayed in the current window and you can use /query username to create a window to chat to that user." ) );
    autoCreateWindowForNoticeCB->setText( tr2i18n( "Auto create &on notice" ) );
    autoRejoinCB->setText( tr2i18n( "Auto-re&join" ) );
    TQToolTip::add( autoRejoinCB, tr2i18n( "Rejoin channels automatically if you are disconnected." ) );
    TQWhatsThis::add( autoRejoinCB, tr2i18n( "If selected, it allows you to  rejoin channels automatically if you are disconnected." ) );
    dockPopupsCB->setText( tr2i18n( "Dock &passive popups" ) );
    displayTopicCB->setText( tr2i18n( "D&isplay topic in caption" ) );
    TQToolTip::add( displayTopicCB, tr2i18n( "Display the topic of the current channel in the window caption" ) );
    TQWhatsThis::add( displayTopicCB, tr2i18n( "Displays the topic of the current channel in the window caption. If not selected, the topic is only displayed inside the window." ) );
    colorPickerPopupCB->setText( tr2i18n( "Color pi&cker popup" ) );
    TQToolTip::add( colorPickerPopupCB, tr2i18n( "Allow you to get the color pickup dialog with Ctrl K" ) );
    TQWhatsThis::add( colorPickerPopupCB, tr2i18n( "If selected, a popup window from which to select the color of your text is presented when you press Ctrl K.  If not, you have to type the color codes manually." ) );
    oneLineEditCB->setText( tr2i18n( "One line te&xt entry box" ) );
    useColourNickListCB->setText( tr2i18n( "Us&e color nick list" ) );
    TQToolTip::add( useColourNickListCB, tr2i18n( "Use the colors set in the Colors tab of the Configure KSirc dialog for coloring the nicknames" ) );
    TQWhatsThis::add( useColourNickListCB, tr2i18n( "If selected, it will use the colors set in the Colors tab of the Configure KSirc dialog for coloring the nicknames." ) );
    nickCompletionCB->setText( tr2i18n( "&Nick completion" ) );
    TQToolTip::add( nickCompletionCB, tr2i18n( "Switch nickname completion on" ) );
    TQWhatsThis::add( nickCompletionCB, tr2i18n( "If selected, switches nickname completion on. Nickname completion works as follows: Type the first letters of a user's nickname, press the Tab key, the text you typed will be completed to match the username, including changes in capitalization if necessary." ) );
    dockedOnlyCB->setText( tr2i18n( "&Dock in system tray" ) );
    TQToolTip::add( dockedOnlyCB, tr2i18n( "Put the KSirc icon in the system tray" ) );
    TQWhatsThis::add( dockedOnlyCB, tr2i18n( "This allows KSirc to be docked in the system tray. By default this is not enabled. When KSirc is docked in the system tray, you are able to access several options by clicking on the KSirc icon. When you close KSirc window, the icon stays in the systray until you quit KSirc." ) );
    autoSaveHistoryCB->setText( tr2i18n( "Auto save history" ) );
    groupBox4->setTitle( tr2i18n( "Per Channel Options" ) );
    timeStampCB->setText( tr2i18n( "&Time stamp" ) );
    TQToolTip::add( timeStampCB, tr2i18n( "Add the time and date on the left of each message" ) );
    TQWhatsThis::add( timeStampCB, tr2i18n( "Prepends each thing said in the channel with the time it was said, in the form [HH:MM:SS]." ) );
    applyGloballyCB->setText( tr2i18n( "O&verride existing channel options" ) );
    TQToolTip::add( applyGloballyCB, tr2i18n( "The settings in this tab will be applied and each channel settings will be ignored" ) );
    TQWhatsThis::add( applyGloballyCB, tr2i18n( "If this is selected, the settings in this tab will override each channel's options so these settings will be applied in each channel, independently of your channel settings in the Channel menu. This setting will only work until next time you open the configuration dialog and it will be reset unchecked then; this is because you probably do not want to override the existing channels options all the time." ) );
    showTopicCB->setText( tr2i18n( "Sho&w topic" ) );
    TQToolTip::add( showTopicCB, tr2i18n( "Displays the channel topic on top" ) );
    TQWhatsThis::add( showTopicCB, tr2i18n( "Displays the channel topic on top of each channel window." ) );
    beepCB->setText( tr2i18n( "&Beep on change" ) );
    joinPartCB->setText( tr2i18n( "Hide part/join messages" ) );
    enLoggingCB->setText( tr2i18n( "Enable lo&gging" ) );
    TQToolTip::add( enLoggingCB, TQString::null );
    encodingsL->setText( tr2i18n( "Default en&coding:" ) );
}

void PageGeneralBase::setPreviewPixmap(bool)
{
    tqWarning( "PageGeneralBase::setPreviewPixmap(bool): Not implemented yet" );
}

void PageGeneralBase::showWallpaperPixmap(const TQString&)
{
    tqWarning( "PageGeneralBase::showWallpaperPixmap(const TQString&): Not implemented yet" );
}

void PageGeneralBase::changed()
{
    tqWarning( "PageGeneralBase::changed(): Not implemented yet" );
}

/****************************************************************************
** PageGeneralBase meta object code from reading C++ file 'page_generalbase.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "page_generalbase.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *PageGeneralBase::className() const
{
    return "PageGeneralBase";
}

TQMetaObject *PageGeneralBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PageGeneralBase( "PageGeneralBase", &PageGeneralBase::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString PageGeneralBase::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "PageGeneralBase", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString PageGeneralBase::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "PageGeneralBase", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* PageGeneralBase::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQFrame::staticMetaObject();
    static const TQUMethod slot_0 = {"changed", 0, 0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"setPreviewPixmap", 1, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"showWallpaperPixmap", 1, param_slot_3 };
    static const TQMetaData slot_tbl[] = {
	{ "changed()", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected },
	{ "setPreviewPixmap(bool)", &slot_2, TQMetaData::Protected },
	{ "showWallpaperPixmap(const TQString&)", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"PageGeneralBase", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_PageGeneralBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* PageGeneralBase::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "PageGeneralBase" ) )
	return this;
    return TQFrame::tqt_cast( clname );
}

bool PageGeneralBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: changed(); break;
    case 1: languageChange(); break;
    case 2: setPreviewPixmap((bool)static_QUType_bool.get(_o+1)); break;
    case 3: showWallpaperPixmap((const TQString&)static_QUType_TQString.get(_o+1)); break;
    default:
	return TQFrame::tqt_invoke( _id, _o );
    }
    return true;
}

bool PageGeneralBase::tqt_emit( int _id, TQUObject* _o )
{
    return TQFrame::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

bool PageGeneralBase::tqt_property( int id, int f, TQVariant* v)
{
    return TQFrame::tqt_property( id, f, v);
}

bool PageGeneralBase::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
