pokerth logo in game list bg

This commit is contained in:
doitux
2007-10-30 12:14:42 +00:00
parent 26157027dc
commit 2275a8eca8
5 changed files with 100 additions and 1 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

+2
View File
@@ -160,6 +160,7 @@ HEADERS += \
src/gui/qt/changehumanplayernamedialog/changehumanplayernamedialogimpl.h \
src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.h \
src/gui/qt/gamelobbydialog/gamelobbydialogimpl.h \
src/gui/qt/gamelobbydialog/mygamelisttreewidget.h \
src/gui/qt/gamelobbydialog/lobbychat/lobbychat.h \
src/gui/qttoolsinterface.h \
src/gui/qt/qttools/qttoolswrapper.h \
@@ -214,6 +215,7 @@ SOURCES += \
src/gui/qt/changehumanplayernamedialog/changehumanplayernamedialogimpl.cpp \
src/gui/qt/changecompleteblindsdialog/changecompleteblindsdialogimpl.cpp \
src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp \
src/gui/qt/gamelobbydialog/mygamelisttreewidget.cpp \
src/gui/qt/gamelobbydialog/lobbychat/lobbychat.cpp
TRANSLATIONS = \
+11 -1
View File
@@ -56,13 +56,16 @@
</widget>
</item>
<item row="0" column="1" >
<widget class="QTreeWidget" name="treeWidget_GameList" >
<widget class="MyGameListTreeWidget" name="treeWidget_GameList" >
<property name="minimumSize" >
<size>
<width>400</width>
<height>0</height>
</size>
</property>
<property name="horizontalScrollBarPolicy" >
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<column>
<property name="text" >
<string>Game</string>
@@ -505,6 +508,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>MyGameListTreeWidget</class>
<extends>QTreeWidget</extends>
<header>mygamelisttreewidget.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>treeWidget_GameList</tabstop>
<tabstop>pushButton_CreateGame</tabstop>
@@ -35,6 +35,8 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(QWidget *parent, ConfigFile *c)
waitStartGameMsgBoxTimer = new QTimer(this);
waitStartGameMsgBoxTimer->setSingleShot(TRUE);
treeWidget_GameList->setGameListBackgroundImage(myAppDataPath +"gfx/gui/misc/background_gamelist.png");
connect( pushButton_CreateGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
connect( pushButton_JoinGame, SIGNAL( clicked() ), this, SLOT( joinGame() ) );
connect( treeWidget_GameList, SIGNAL( currentItemChanged ( QTreeWidgetItem*, QTreeWidgetItem*) ), this, SLOT( gameSelected(QTreeWidgetItem*, QTreeWidgetItem*) ) );
@@ -404,6 +406,34 @@ void gameLobbyDialogImpl::clearDialog()
myPlayerId = 0;
hideShowGameDescription(FALSE);
/*
QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget_GameList, 0);
item->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item1 = new QTreeWidgetItem(treeWidget_GameList, 0);
item1->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item2 = new QTreeWidgetItem(treeWidget_GameList, 0);
item2->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item3 = new QTreeWidgetItem(treeWidget_GameList, 0);
item3->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item4 = new QTreeWidgetItem(treeWidget_GameList, 0);
item4->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item5 = new QTreeWidgetItem(treeWidget_GameList, 0);
item5->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item6 = new QTreeWidgetItem(treeWidget_GameList, 0);
item6->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item7 = new QTreeWidgetItem(treeWidget_GameList, 0);
item7->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item8 = new QTreeWidgetItem(treeWidget_GameList, 0);
item8->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item9 = new QTreeWidgetItem(treeWidget_GameList, 0);
item9->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item10 = new QTreeWidgetItem(treeWidget_GameList, 0);
item10->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item11 = new QTreeWidgetItem(treeWidget_GameList, 0);
item11->setData(0, Qt::DisplayRole, "lololol");
QTreeWidgetItem *item12 = new QTreeWidgetItem(treeWidget_GameList, 0);
item12->setData(0, Qt::DisplayRole, "lololol");*/
}
void gameLobbyDialogImpl::checkPlayerQuantity() {
@@ -0,0 +1,57 @@
//
// C++ Implementation: mycardspixmaplabel
//
// Description:
//
//
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "mygamelisttreewidget.h"
#include <QDebug>
#include <iostream>
using namespace std;
MyGameListTreeWidget::MyGameListTreeWidget(QDialog* parent)
: QTreeWidget(parent)
{
//set the pixmap cache size in the main function only one time
QPixmapCache::setCacheLimit(1024);
}
MyGameListTreeWidget::~MyGameListTreeWidget()
{
}
void MyGameListTreeWidget::setGameListBackgroundImage(QString pmString) {
gameListBGPixmap.load(pmString);
}
void MyGameListTreeWidget::paintEvent(QPaintEvent *event) {
QPainter painter(viewport());
painter.drawPixmap(50, 5, gameListBGPixmap);
QTreeWidget::paintEvent(event);
}
// bool MyGameListTreeWidget::event(QEvent *event)
// {
// cout << event->type() << endl;
// // if(event->type() == 12) paintEvent(event);
//
// QTreeWidget::event(event);
// }
void MyGameListTreeWidget::scrollContentsBy ( int dx, int dy ) {
viewport()->update();
QTreeWidget::scrollContentsBy ( dx,dy );
}