adds myavatarlabel for vote-kicks
This commit is contained in:
@@ -149,6 +149,7 @@ HEADERS += \
|
|||||||
src/gui/qt/mainwindow/mycardspixmaplabel.h \
|
src/gui/qt/mainwindow/mycardspixmaplabel.h \
|
||||||
src/gui/qt/mainwindow/mysetlabel.h \
|
src/gui/qt/mainwindow/mysetlabel.h \
|
||||||
src/gui/qt/mainwindow/mystatuslabel.h \
|
src/gui/qt/mainwindow/mystatuslabel.h \
|
||||||
|
src/gui/qt/mainwindow/myavatarlabel.h \
|
||||||
src/gui/qt/mainwindow/myrighttabwidget.h \
|
src/gui/qt/mainwindow/myrighttabwidget.h \
|
||||||
src/gui/qt/mainwindow/mylefttabwidget.h \
|
src/gui/qt/mainwindow/mylefttabwidget.h \
|
||||||
src/gui/qt/mainwindow/startsplash/startsplash.h \
|
src/gui/qt/mainwindow/startsplash/startsplash.h \
|
||||||
@@ -208,6 +209,7 @@ SOURCES += \
|
|||||||
src/gui/qt/mainwindow/mycardspixmaplabel.cpp \
|
src/gui/qt/mainwindow/mycardspixmaplabel.cpp \
|
||||||
src/gui/qt/mainwindow/mysetlabel.cpp \
|
src/gui/qt/mainwindow/mysetlabel.cpp \
|
||||||
src/gui/qt/mainwindow/mystatuslabel.cpp \
|
src/gui/qt/mainwindow/mystatuslabel.cpp \
|
||||||
|
src/gui/qt/mainwindow/myavatarlabel.cpp \
|
||||||
src/gui/qt/mainwindow/myrighttabwidget.cpp \
|
src/gui/qt/mainwindow/myrighttabwidget.cpp \
|
||||||
src/gui/qt/mainwindow/mylefttabwidget.cpp \
|
src/gui/qt/mainwindow/mylefttabwidget.cpp \
|
||||||
src/gui/qt/mainwindow/startsplash/startsplash.cpp \
|
src/gui/qt/mainwindow/startsplash/startsplash.cpp \
|
||||||
|
|||||||
@@ -220,7 +220,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="label_Avatar2" >
|
<widget class="MyAvatarLabel" name="label_Avatar2" >
|
||||||
<property name="geometry" >
|
<property name="geometry" >
|
||||||
<rect>
|
<rect>
|
||||||
<x>17</x>
|
<x>17</x>
|
||||||
@@ -465,7 +465,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="label_Avatar3" >
|
<widget class="MyAvatarLabel" name="label_Avatar3" >
|
||||||
<property name="geometry" >
|
<property name="geometry" >
|
||||||
<rect>
|
<rect>
|
||||||
<x>17</x>
|
<x>17</x>
|
||||||
@@ -707,7 +707,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="label_Avatar4" >
|
<widget class="MyAvatarLabel" name="label_Avatar4" >
|
||||||
<property name="geometry" >
|
<property name="geometry" >
|
||||||
<rect>
|
<rect>
|
||||||
<x>17</x>
|
<x>17</x>
|
||||||
@@ -962,7 +962,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="label_Avatar5" >
|
<widget class="MyAvatarLabel" name="label_Avatar5" >
|
||||||
<property name="geometry" >
|
<property name="geometry" >
|
||||||
<rect>
|
<rect>
|
||||||
<x>17</x>
|
<x>17</x>
|
||||||
@@ -1238,7 +1238,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="label_Avatar1" >
|
<widget class="MyAvatarLabel" name="label_Avatar1" >
|
||||||
<property name="geometry" >
|
<property name="geometry" >
|
||||||
<rect>
|
<rect>
|
||||||
<x>17</x>
|
<x>17</x>
|
||||||
@@ -1848,7 +1848,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="label_Avatar6" >
|
<widget class="MyAvatarLabel" name="label_Avatar6" >
|
||||||
<property name="geometry" >
|
<property name="geometry" >
|
||||||
<rect>
|
<rect>
|
||||||
<x>17</x>
|
<x>17</x>
|
||||||
@@ -2282,7 +2282,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_Avatar0" >
|
<widget class="MyAvatarLabel" name="label_Avatar0" >
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize" >
|
||||||
<size>
|
<size>
|
||||||
<width>50</width>
|
<width>50</width>
|
||||||
@@ -3379,6 +3379,11 @@
|
|||||||
<extends>QLabel</extends>
|
<extends>QLabel</extends>
|
||||||
<header>mycardspixmaplabel.h</header>
|
<header>mycardspixmaplabel.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>MyAvatarLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>myavatarlabel.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include "startsplash.h"
|
#include "startsplash.h"
|
||||||
#include "mycardspixmaplabel.h"
|
#include "mycardspixmaplabel.h"
|
||||||
#include "mysetlabel.h"
|
#include "mysetlabel.h"
|
||||||
|
#include "myavatarlabel.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "chat.h"
|
#include "chat.h"
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ class BoardInterface;
|
|||||||
// class HandInterface;
|
// class HandInterface;
|
||||||
class PlayerInterface;
|
class PlayerInterface;
|
||||||
class MyCardsPixmapLabel;
|
class MyCardsPixmapLabel;
|
||||||
|
class MyAvatarLabel;
|
||||||
class newGameDialogImpl;
|
class newGameDialogImpl;
|
||||||
class settingsDialogImpl;
|
class settingsDialogImpl;
|
||||||
class selectAvatarDialogImpl;
|
class selectAvatarDialogImpl;
|
||||||
@@ -392,7 +393,7 @@ private:
|
|||||||
MySetLabel *setLabelArray[MAX_NUMBER_OF_PLAYERS];
|
MySetLabel *setLabelArray[MAX_NUMBER_OF_PLAYERS];
|
||||||
QLabel *actionLabelArray[MAX_NUMBER_OF_PLAYERS];
|
QLabel *actionLabelArray[MAX_NUMBER_OF_PLAYERS];
|
||||||
QLabel *playerNameLabelArray[MAX_NUMBER_OF_PLAYERS];
|
QLabel *playerNameLabelArray[MAX_NUMBER_OF_PLAYERS];
|
||||||
QLabel *playerAvatarLabelArray[MAX_NUMBER_OF_PLAYERS];
|
MyAvatarLabel *playerAvatarLabelArray[MAX_NUMBER_OF_PLAYERS];
|
||||||
|
|
||||||
QGroupBox *groupBoxArray[MAX_NUMBER_OF_PLAYERS];
|
QGroupBox *groupBoxArray[MAX_NUMBER_OF_PLAYERS];
|
||||||
MyCardsPixmapLabel *boardCardsArray[5];
|
MyCardsPixmapLabel *boardCardsArray[5];
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
//
|
||||||
|
// C++ Implementation: mycardspixmaplabel
|
||||||
|
//
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
|
||||||
|
//
|
||||||
|
// Copyright: See COPYING file that comes with this distribution
|
||||||
|
//
|
||||||
|
//
|
||||||
|
#include "mysetlabel.h"
|
||||||
|
|
||||||
|
#include "mainwindowimpl.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
MyAvatarLabel::MyAvatarLabel(QGroupBox* parent)
|
||||||
|
: QLabel(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
myContextMenu = new QMenu;
|
||||||
|
myContextMenu->addAction(tr("Vote for kick this user"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
MyAvatarLabel::~MyAvatarLabel()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent * event ) {
|
||||||
|
|
||||||
|
// showContextMenu(event->globalPos());
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyAvatarLabel::showContextMenu(const QPoint &pos) {
|
||||||
|
|
||||||
|
// myContextMenu->popup(pos);
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
//
|
||||||
|
// C++ Interface: mycardspixmaplabel
|
||||||
|
//
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
|
||||||
|
//
|
||||||
|
// Copyright: See COPYING file that comes with this distribution
|
||||||
|
//
|
||||||
|
//
|
||||||
|
#ifndef MYAVATARLABEL_H
|
||||||
|
#define MYAVATARLABEL_H
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <QtGui>
|
||||||
|
#include <QtCore>
|
||||||
|
|
||||||
|
class mainWindowImpl;
|
||||||
|
|
||||||
|
class MyAvatarLabel : public QLabel
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
MyAvatarLabel(QGroupBox*);
|
||||||
|
|
||||||
|
~MyAvatarLabel();
|
||||||
|
|
||||||
|
|
||||||
|
void setMyW ( mainWindowImpl* theValue ) { myW = theValue; }
|
||||||
|
|
||||||
|
void contextMenuEvent ( QContextMenuEvent * event );
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
void showContextMenu(const QPoint &pos);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
mainWindowImpl *myW;
|
||||||
|
QMenu *myContextMenu;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user