00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "gamesoverlay.h"
00021 #include "views/gamesview.h"
00022 #include "loginform.h"
00023
00024 #include <QGraphicsLinearLayout>
00025
00026 #include <Plasma/TabBar>
00027 #include <Plasma/Label>
00028 #include <KIcon>
00029
00030 GamesOverlay::GamesOverlay( QGraphicsItem* parent, Qt::WindowFlags wFlags )
00031 : QGraphicsWidget( parent, wFlags )
00032 , m_tabBar( new Plasma::TabBar( this ) )
00033 , m_gamesView( new GamesView( this ) )
00034 , m_loginForm( new LoginForm( this ) )
00035 {
00036 connect( m_gamesView, SIGNAL( gameToPlaySelected( QModelIndex ) ), SIGNAL( gameToPlaySelected( QModelIndex ) ) );
00037 connect( m_gamesView, SIGNAL( gameSelected( QModelIndex ) ), SIGNAL( gameSelected( QModelIndex ) ) );
00038 m_tabBar->addTab( KIcon( "applications-games" ), i18n( "Installed" ), m_gamesView );
00039
00040 Plasma::Label* m_tempLabel = new Plasma::Label( this );
00041 m_tempLabel->setText( i18n( "Coming Soon!" ) );
00042 m_tabBar->addTab( KIcon( "get-hot-new-stuff" ), i18n( "Available" ), m_tempLabel );
00043
00044 m_tabBar->addTab( KIcon( "network-connect" ), i18n( "Login" ), m_loginForm );
00045
00046 QGraphicsLinearLayout* layout = new QGraphicsLinearLayout( Qt::Vertical );
00047 layout->addItem( m_tabBar );
00048 setLayout( layout );
00049 }
00050
00051 GamesView* GamesOverlay::gamesView()
00052 {
00053 return m_gamesView;
00054 }
00055
00056 #include "gamesoverlay.moc"