#include "simapi.h"
/****************************************************************************
** Form implementation generated from reading ui file './servicesbase.ui'
**
** Created: вт мар 30 17:34:32 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 "servicesbase.h"

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

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

static const char* const img1_servicesbase[] = { 
"22 22 2 1",
". c None",
"# c #a4c610",
"........######........",
".....###########......",
"....##############....",
"...################...",
"..######......######..",
"..#####........#####..",
".#####.......#..#####.",
".####.......###..####.",
"####.......#####..####",
"####......#####...####",
"####....#######...####",
"####....######....####",
"####...########...####",
".####.##########..####",
".####..####.#########.",
".#####..##...########.",
"..#####.......#######.",
"..######......######..",
"...###################",
"....##################",
"......###########.###.",
"........######.....#.."};


/* 
 *  Constructs a ServicesBase as a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 */
ServicesBase::ServicesBase( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl ),
      image0( (const char **) img0_servicesbase ),
      image1( (const char **) img1_servicesbase )
{
    if ( !name )
	setName( "Services" );
    ServicesLayout = new QVBoxLayout( this, 11, 6, "ServicesLayout"); 

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

    tab = new QWidget( TabWidget5, "tab" );
    tabLayout = new QVBoxLayout( tab, 11, 6, "tabLayout"); 

    lblOffline2 = new QLabel( tab, "lblOffline2" );
    lblOffline2->setProperty( "alignment", int( QLabel::AlignCenter ) );
    tabLayout->addWidget( lblOffline2 );

    lblRegistered = new QLabel( tab, "lblRegistered" );
    tabLayout->addWidget( lblRegistered );

    lstAgents = new ListView( tab, "lstAgents" );
    tabLayout->addWidget( lstAgents );

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

    btnLogon = new QPushButton( tab, "btnLogon" );
    Layout3->addWidget( btnLogon );

    btnLogoff = new QPushButton( tab, "btnLogoff" );
    Layout3->addWidget( btnLogoff );

    btnUnregister = new QPushButton( tab, "btnUnregister" );
    Layout3->addWidget( btnUnregister );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout3->addItem( spacer );
    tabLayout->addLayout( Layout3 );
    TabWidget5->insertTab( tab, QString("") );

    tab_2 = new QWidget( TabWidget5, "tab_2" );
    tabLayout_2 = new QVBoxLayout( tab_2, 11, 6, "tabLayout_2"); 

    lblOffline = new QLabel( tab_2, "lblOffline" );
    lblOffline->setProperty( "alignment", int( QLabel::AlignCenter ) );
    tabLayout_2->addWidget( lblOffline );

    cmbAgents = new QComboBox( FALSE, tab_2, "cmbAgents" );
    tabLayout_2->addWidget( cmbAgents );

    wndInfo = new QWidgetStack( tab_2, "wndInfo" );
    tabLayout_2->addWidget( wndInfo );

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

    btnRegister = new QPushButton( tab_2, "btnRegister" );
    Layout1->addWidget( btnRegister );
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout1->addItem( spacer_2 );
    tabLayout_2->addLayout( Layout1 );
    TabWidget5->insertTab( tab_2, QString("") );
    ServicesLayout->addWidget( TabWidget5 );
    languageChange();
    resize( QSize(451, 366).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ServicesBase::languageChange()
{
    setProperty( "caption", i18n( "Form1" ) );
    lblOffline2->setProperty( "text", i18n( "Jabber agents are available online after login" ) );
    lblRegistered->setProperty( "text", i18n( "Registered agents:" ) );
    btnLogon->setProperty( "text", i18n( "Log &On" ) );
    btnLogoff->setProperty( "text", i18n( "Log O&ff" ) );
    btnUnregister->setProperty( "text", i18n( "&Unregister" ) );
    TabWidget5->changeTab( tab, i18n( "&Registered agents" ) );
    lblOffline->setProperty( "text", i18n( "Jabber agents are available online after login" ) );
    btnRegister->setProperty( "text", i18n( "&Register" ) );
    TabWidget5->changeTab( tab_2, i18n( "&Agents" ) );
}

#include "servicesbase.moc"
