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

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

#include "propertiespagegui.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqframe.h>
#include <ntqgroupbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "propertiespagegui.ui.h"

/*
 *  Constructs a PropertiesPageGUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
PropertiesPageGUI::PropertiesPageGUI( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "PropertiesPageGUI" );
    PropertiesPageGUILayout = new TQVBoxLayout( this, 0, 6, "PropertiesPageGUILayout"); 

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

    folderLbl = new TQLabel( this, "folderLbl" );
    layout6->addWidget( folderLbl );

    urlRq = new KURLRequester( this, "urlRq" );
    layout6->addWidget( urlRq );
    PropertiesPageGUILayout->addLayout( layout6 );

    shareChk = new TQCheckBox( this, "shareChk" );
    shareChk->setChecked( true );
    PropertiesPageGUILayout->addWidget( shareChk );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );
    PropertiesPageGUILayout->addWidget( line1 );

    shareFrame = new TQFrame( this, "shareFrame" );
    shareFrame->setFrameShape( TQFrame::NoFrame );
    shareFrame->setFrameShadow( TQFrame::Raised );
    shareFrameLayout = new TQVBoxLayout( shareFrame, 0, 6, "shareFrameLayout"); 

    nfsChk = new TQCheckBox( shareFrame, "nfsChk" );
    nfsChk->setChecked( true );
    shareFrameLayout->addWidget( nfsChk );

    nfsGrp = new TQGroupBox( shareFrame, "nfsGrp" );
    nfsGrp->setColumnLayout(0, TQt::Vertical );
    nfsGrp->layout()->setSpacing( 6 );
    nfsGrp->layout()->setMargin( 11 );
    nfsGrpLayout = new TQVBoxLayout( nfsGrp->layout() );
    nfsGrpLayout->setAlignment( TQt::AlignTop );

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

    publicNFSChk = new TQCheckBox( nfsGrp, "publicNFSChk" );
    publicNFSChk->setChecked( true );
    layout6_2->addWidget( publicNFSChk );

    writableNFSChk = new TQCheckBox( nfsGrp, "writableNFSChk" );
    writableNFSChk->setChecked( false );
    layout6_2->addWidget( writableNFSChk );
    spacer5 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6_2->addItem( spacer5 );
    nfsGrpLayout->addLayout( layout6_2 );

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

    moreNFSBtn = new KPushButton( nfsGrp, "moreNFSBtn" );
    layout4->addWidget( moreNFSBtn );
    spacer3 = new TQSpacerItem( 156, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer3 );
    nfsGrpLayout->addLayout( layout4 );
    shareFrameLayout->addWidget( nfsGrp );

    sambaChk = new TQCheckBox( shareFrame, "sambaChk" );
    sambaChk->setChecked( true );
    shareFrameLayout->addWidget( sambaChk );

    sambaGrp = new TQGroupBox( shareFrame, "sambaGrp" );
    sambaGrp->setColumnLayout(0, TQt::Vertical );
    sambaGrp->layout()->setSpacing( 6 );
    sambaGrp->layout()->setMargin( 11 );
    sambaGrpLayout = new TQVBoxLayout( sambaGrp->layout() );
    sambaGrpLayout->setAlignment( TQt::AlignTop );

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

    textLabel1 = new TQLabel( sambaGrp, "textLabel1" );
    layout3->addWidget( textLabel1 );

    sambaNameEdit = new KLineEdit( sambaGrp, "sambaNameEdit" );
    layout3->addWidget( sambaNameEdit );
    sambaGrpLayout->addLayout( layout3 );

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

    publicSambaChk = new TQCheckBox( sambaGrp, "publicSambaChk" );
    publicSambaChk->setChecked( true );
    layout5->addWidget( publicSambaChk );

    writableSambaChk = new TQCheckBox( sambaGrp, "writableSambaChk" );
    writableSambaChk->setChecked( false );
    layout5->addWidget( writableSambaChk );
    spacer4_3 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer4_3 );
    sambaGrpLayout->addLayout( layout5 );

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

    moreSambaBtn = new KPushButton( sambaGrp, "moreSambaBtn" );
    layout3_2->addWidget( moreSambaBtn );
    spacer4_2 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3_2->addItem( spacer4_2 );
    sambaGrpLayout->addLayout( layout3_2 );
    shareFrameLayout->addWidget( sambaGrp );
    PropertiesPageGUILayout->addWidget( shareFrame );
    spacer4 = new TQSpacerItem( 20, 1, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    PropertiesPageGUILayout->addItem( spacer4 );
    languageChange();
    resize( TQSize(433, 348).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( sambaChk, TQ_SIGNAL( toggled(bool) ), sambaGrp, TQ_SLOT( setEnabled(bool) ) );
    connect( nfsChk, TQ_SIGNAL( toggled(bool) ), nfsGrp, TQ_SLOT( setEnabled(bool) ) );
    connect( publicSambaChk, TQ_SIGNAL( toggled(bool) ), writableSambaChk, TQ_SLOT( setEnabled(bool) ) );
    connect( publicNFSChk, TQ_SIGNAL( toggled(bool) ), writableNFSChk, TQ_SLOT( setEnabled(bool) ) );
    connect( shareChk, TQ_SIGNAL( toggled(bool) ), shareFrame, TQ_SLOT( setEnabled(bool) ) );
    connect( shareChk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changedSlot() ) );
    connect( sambaChk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changedSlot() ) );
    connect( publicSambaChk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changedSlot() ) );
    connect( writableSambaChk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changedSlot() ) );
    connect( nfsChk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changedSlot() ) );
    connect( publicNFSChk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changedSlot() ) );
    connect( writableNFSChk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changedSlot() ) );
    connect( moreNFSBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( moreNFSBtn_clicked() ) );
    connect( sambaChk, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( sambaChkToggled(bool) ) );
    connect( sambaNameEdit, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( changedSlot() ) );
    connect( publicSambaChk, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( publicSambaChkToggled(bool) ) );
    connect( publicNFSChk, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( publicNFSChkToggled(bool) ) );
    connect( moreSambaBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( moreSambaBtnClicked() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PropertiesPageGUI::languageChange()
{
    folderLbl->setText( tr2i18n( "Folder:" ) );
    shareChk->setText( tr2i18n( "S&hare this folder in the local network" ) );
    nfsChk->setText( tr2i18n( "Share with &NFS (Linux/UNIX)" ) );
    nfsGrp->setTitle( tr2i18n( "NFS Options" ) );
    publicNFSChk->setText( tr2i18n( "Pu&blic" ) );
    writableNFSChk->setText( tr2i18n( "W&ritable" ) );
    moreNFSBtn->setText( tr2i18n( "More NFS Op&tions" ) );
    sambaChk->setText( tr2i18n( "Share with S&amba (Microsoft(R) Windows(R))" ) );
    sambaGrp->setTitle( tr2i18n( "Samba Options" ) );
    textLabel1->setText( tr2i18n( "Name:" ) );
    publicSambaChk->setText( tr2i18n( "P&ublic" ) );
    writableSambaChk->setText( tr2i18n( "&Writable" ) );
    moreSambaBtn->setText( tr2i18n( "Mor&e Samba Options" ) );
}

/****************************************************************************
** PropertiesPageGUI meta object code from reading C++ file 'propertiespagegui.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 "propertiespagegui.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 *PropertiesPageGUI::className() const
{
    return "PropertiesPageGUI";
}

TQMetaObject *PropertiesPageGUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PropertiesPageGUI( "PropertiesPageGUI", &PropertiesPageGUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* PropertiesPageGUI::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 = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"moreNFSBtn_clicked", 0, 0 };
    static const TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"sambaChkToggled", 1, param_slot_1 };
    static const TQUParameter param_slot_2[] = {
	{ "b", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"publicSambaChkToggled", 1, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ "b", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"publicNFSChkToggled", 1, param_slot_3 };
    static const TQUMethod slot_4 = {"moreSambaBtnClicked", 0, 0 };
    static const TQUMethod slot_5 = {"languageChange", 0, 0 };
    static const TQUMethod slot_6 = {"changedSlot", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "moreNFSBtn_clicked()", &slot_0, TQMetaData::Public },
	{ "sambaChkToggled(bool)", &slot_1, TQMetaData::Public },
	{ "publicSambaChkToggled(bool)", &slot_2, TQMetaData::Public },
	{ "publicNFSChkToggled(bool)", &slot_3, TQMetaData::Public },
	{ "moreSambaBtnClicked()", &slot_4, TQMetaData::Public },
	{ "languageChange()", &slot_5, TQMetaData::Protected },
	{ "changedSlot()", &slot_6, TQMetaData::Protected }
    };
    static const TQUMethod signal_0 = {"changed", 0, 0 };
    static const TQMetaData signal_tbl[] = {
	{ "changed()", &signal_0, TQMetaData::Public }
    };
    metaObj = TQMetaObject::new_metaobject(
	"PropertiesPageGUI", parentObject,
	slot_tbl, 7,
	signal_tbl, 1,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_PropertiesPageGUI.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

// TQ_SIGNAL changed
void PropertiesPageGUI::changed()
{
    activate_signal( staticMetaObject()->signalOffset() + 0 );
}

bool PropertiesPageGUI::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: moreNFSBtn_clicked(); break;
    case 1: sambaChkToggled((bool)static_QUType_bool.get(_o+1)); break;
    case 2: publicSambaChkToggled((bool)static_QUType_bool.get(_o+1)); break;
    case 3: publicNFSChkToggled((bool)static_QUType_bool.get(_o+1)); break;
    case 4: moreSambaBtnClicked(); break;
    case 5: languageChange(); break;
    case 6: changedSlot(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool PropertiesPageGUI::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: changed(); break;
    default:
	return TQWidget::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

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

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