#include "simapi.h"
/****************************************************************************
** Form implementation generated from reading ui file './discoinfobase.ui'
**
** Created: вт мар 30 17:34:45 2004
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.1.2   edited Dec 19 11:45 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "discoinfobase.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qtabwidget.h>
#include <qwidget.h>
#include <qmultilineedit.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

#include "listview.h"
static const char* const img0_discoinfobase[] = { 
"22 22 2 1",
". c None",
"# c #a1c410",
"........######........",
".....###########......",
"....##############....",
"...################...",
"..######......######..",
"..#####........#####..",
".#####.......#..#####.",
".####.......###..####.",
"####.......#####..####",
"####......#####...####",
"####....#######...####",
"####....######....####",
"####...########...####",
".####.##########..####",
".####..####.#########.",
".#####..##...########.",
"..#####.......#######.",
"..######......######..",
"...###################",
"....##################",
"......###########.###.",
"........######.....#.."};


/* 
 *  Constructs a DiscoInfoBase as a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
DiscoInfoBase::DiscoInfoBase( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl ),
      image0( (const char **) img0_discoinfobase )
{
    if ( !name )
	setName( "DiscoInfo" );
    setProperty( "sizeGripEnabled", QVariant( TRUE, 0 ) );
    DiscoInfoLayout = new QVBoxLayout( this, 11, 6, "DiscoInfoLayout"); 

    tabInfo = new QTabWidget( this, "tabInfo" );

    tabInfo_2 = new QWidget( tabInfo, "tabInfo_2" );
    tabInfoLayout = new QGridLayout( tabInfo_2, 1, 1, 11, 6, "tabInfoLayout"); 

    edtNameSpace = new QMultiLineEdit( tabInfo_2, "edtNameSpace" );

    tabInfoLayout->addWidget( edtNameSpace, 3, 1 );

    TextLabel3 = new QLabel( tabInfo_2, "TextLabel3" );
    TextLabel3->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabInfoLayout->addWidget( TextLabel3, 3, 0 );

    TextLabel2 = new QLabel( tabInfo_2, "TextLabel2" );
    TextLabel2->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabInfoLayout->addWidget( TextLabel2, 2, 0 );

    edtCategory = new QLineEdit( tabInfo_2, "edtCategory" );

    tabInfoLayout->addWidget( edtCategory, 2, 1 );

    TextLabel1 = new QLabel( tabInfo_2, "TextLabel1" );
    TextLabel1->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabInfoLayout->addWidget( TextLabel1, 1, 0 );

    edtType = new QLineEdit( tabInfo_2, "edtType" );

    tabInfoLayout->addWidget( edtType, 1, 1 );

    edtJName = new QLineEdit( tabInfo_2, "edtJName" );

    tabInfoLayout->addWidget( edtJName, 0, 1 );

    TextLabel10 = new QLabel( tabInfo_2, "TextLabel10" );
    TextLabel10->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabInfoLayout->addWidget( TextLabel10, 0, 0 );
    tabInfo->insertTab( tabInfo_2, QString("") );

    tabVersion = new QWidget( tabInfo, "tabVersion" );
    tabVersionLayout = new QGridLayout( tabVersion, 1, 1, 11, 6, "tabVersionLayout"); 

    TextLabel4 = new QLabel( tabVersion, "TextLabel4" );
    TextLabel4->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabVersionLayout->addWidget( TextLabel4, 0, 0 );

    edtName = new QLineEdit( tabVersion, "edtName" );

    tabVersionLayout->addWidget( edtName, 0, 1 );

    TextLabel5 = new QLabel( tabVersion, "TextLabel5" );
    TextLabel5->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabVersionLayout->addWidget( TextLabel5, 1, 0 );

    edtVersion = new QLineEdit( tabVersion, "edtVersion" );

    tabVersionLayout->addWidget( edtVersion, 1, 1 );

    TextLabel6 = new QLabel( tabVersion, "TextLabel6" );
    TextLabel6->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabVersionLayout->addWidget( TextLabel6, 2, 0 );

    edtSystem = new QLineEdit( tabVersion, "edtSystem" );

    tabVersionLayout->addWidget( edtSystem, 2, 1 );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    tabVersionLayout->addItem( spacer, 3, 0 );
    tabInfo->insertTab( tabVersion, QString("") );

    tabTime = new QWidget( tabInfo, "tabTime" );
    tabTimeLayout = new QGridLayout( tabTime, 1, 1, 11, 6, "tabTimeLayout"); 

    lblTime = new QLabel( tabTime, "lblTime" );
    lblTime->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabTimeLayout->addWidget( lblTime, 0, 0 );

    edtTime = new QLineEdit( tabTime, "edtTime" );

    tabTimeLayout->addWidget( edtTime, 0, 1 );

    edtLast = new QLineEdit( tabTime, "edtLast" );

    tabTimeLayout->addWidget( edtLast, 1, 1 );

    lblLast = new QLabel( tabTime, "lblLast" );
    lblLast->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabTimeLayout->addWidget( lblLast, 1, 0 );
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    tabTimeLayout->addItem( spacer_2, 2, 0 );
    tabInfo->insertTab( tabTime, QString("") );

    tabStat = new QWidget( tabInfo, "tabStat" );
    tabStatLayout = new QVBoxLayout( tabStat, 11, 6, "tabStatLayout"); 

    lstStat = new ListView( tabStat, "lstStat" );
    tabStatLayout->addWidget( lstStat );
    tabInfo->insertTab( tabStat, QString("") );

    tabVCard = new QWidget( tabInfo, "tabVCard" );
    tabVCardLayout = new QGridLayout( tabVCard, 1, 1, 11, 6, "tabVCardLayout"); 

    TextLabel4_2 = new QLabel( tabVCard, "TextLabel4_2" );
    TextLabel4_2->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabVCardLayout->addWidget( TextLabel4_2, 1, 0 );

    TextLabel10_2 = new QLabel( tabVCard, "TextLabel10_2" );
    TextLabel10_2->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabVCardLayout->addWidget( TextLabel10_2, 3, 0 );

    edtNick = new QLineEdit( tabVCard, "edtNick" );

    tabVCardLayout->addWidget( edtNick, 1, 1 );

    TextLabel9 = new QLabel( tabVCard, "TextLabel9" );
    TextLabel9->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabVCardLayout->addWidget( TextLabel9, 2, 0 );

    edtBirthday = new QLineEdit( tabVCard, "edtBirthday" );

    tabVCardLayout->addWidget( edtBirthday, 2, 1 );

    edtFirstName = new QLineEdit( tabVCard, "edtFirstName" );

    tabVCardLayout->addWidget( edtFirstName, 0, 1 );

    TextLabel3_2 = new QLabel( tabVCard, "TextLabel3_2" );
    TextLabel3_2->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabVCardLayout->addWidget( TextLabel3_2, 0, 0 );

    Layout3 = new QHBoxLayout( 0, 0, 6, "Layout3"); 

    edtUrl = new QLineEdit( tabVCard, "edtUrl" );
    Layout3->addWidget( edtUrl );

    btnUrl = new QPushButton( tabVCard, "btnUrl" );
    Layout3->addWidget( btnUrl );

    tabVCardLayout->addLayout( Layout3, 3, 1 );
    QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    tabVCardLayout->addItem( spacer_3, 6, 1 );

    TextLabel1_2 = new QLabel( tabVCard, "TextLabel1_2" );
    TextLabel1_2->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabVCardLayout->addWidget( TextLabel1_2, 4, 0 );

    edtEMail = new QLineEdit( tabVCard, "edtEMail" );

    tabVCardLayout->addWidget( edtEMail, 4, 1 );

    TextLabel2_2 = new QLabel( tabVCard, "TextLabel2_2" );
    TextLabel2_2->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabVCardLayout->addWidget( TextLabel2_2, 5, 0 );

    edtPhone = new QLineEdit( tabVCard, "edtPhone" );

    tabVCardLayout->addWidget( edtPhone, 5, 1 );
    tabInfo->insertTab( tabVCard, QString("") );
    DiscoInfoLayout->addWidget( tabInfo );

    Layout4 = new QHBoxLayout( 0, 0, 6, "Layout4"); 
    QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout4->addItem( spacer_4 );

    buttonApply = new QPushButton( this, "buttonApply" );
    buttonApply->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    Layout4->addWidget( buttonApply );

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    buttonOk->setProperty( "default", QVariant( TRUE, 0 ) );
    Layout4->addWidget( buttonOk );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    Layout4->addWidget( buttonCancel );
    DiscoInfoLayout->addLayout( Layout4 );
    languageChange();
    resize( QSize(451, 308).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );

    // tab order
    setTabOrder( tabInfo_2, edtJName );
    setTabOrder( edtJName, edtType );
    setTabOrder( edtType, edtCategory );
    setTabOrder( edtCategory, edtNameSpace );
    setTabOrder( edtNameSpace, edtName );
    setTabOrder( edtName, edtVersion );
    setTabOrder( edtVersion, edtSystem );
    setTabOrder( edtSystem, edtTime );
    setTabOrder( edtTime, edtLast );
    setTabOrder( edtLast, buttonCancel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DiscoInfoBase::languageChange()
{
    setProperty( "caption", i18n( "DiscoInfo" ) );
    TextLabel3->setProperty( "text", i18n( "Namespaces:" ) );
    TextLabel2->setProperty( "text", i18n( "Category:" ) );
    TextLabel1->setProperty( "text", i18n( "Type:" ) );
    TextLabel10->setProperty( "text", i18n( "Name:" ) );
    tabInfo->changeTab( tabInfo_2, i18n( "&Info" ) );
    TextLabel4->setProperty( "text", i18n( "Name:" ) );
    TextLabel5->setProperty( "text", i18n( "Version:" ) );
    TextLabel6->setProperty( "text", i18n( "System:" ) );
    tabInfo->changeTab( tabVersion, i18n( "&Version" ) );
    lblTime->setProperty( "text", i18n( "UTC client time:" ) );
    lblLast->setProperty( "text", i18n( "Last activity, idle response:" ) );
    tabInfo->changeTab( tabTime, i18n( "&Time" ) );
    lstStat->setProperty( "caption", QString::null );
    tabInfo->changeTab( tabStat, i18n( "&Statistic" ) );
    TextLabel4_2->setProperty( "text", i18n( "Nick:" ) );
    TextLabel10_2->setProperty( "text", i18n( "Homepage:" ) );
    TextLabel9->setProperty( "text", i18n( "Birth date:" ) );
    TextLabel3_2->setProperty( "text", i18n( "First name:" ) );
    btnUrl->setProperty( "text", QString::null );
    TextLabel1_2->setProperty( "text", i18n( "EMail:" ) );
    TextLabel2_2->setProperty( "text", i18n( "Phone:" ) );
    tabInfo->changeTab( tabVCard, i18n( "&Info" ) );
    buttonApply->setProperty( "text", i18n( "&Apply" ) );
    buttonOk->setProperty( "text", i18n( "&OK" ) );
    buttonCancel->setProperty( "text", i18n( "&Close" ) );
}

#include "discoinfobase.moc"
