Reformatting code using Kernighan & Ritchie style, tabs, tab width=4.

Command line: astyle --style=kr --indent=force-tab=4 --lineend=linux -n -r <file names>
This commit is contained in:
lotodore
2011-02-11 20:02:08 +00:00
parent 29dca1846e
commit 02518c67b2
232 changed files with 22743 additions and 21044 deletions
+32 -33
View File
@@ -1,7 +1,7 @@
//
// C++ Implementation: mycardspixmaplabel
//
// Description:
// Description:
//
//
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
@@ -15,7 +15,7 @@
#include "gametablestylereader.h"
MyNameLabel::MyNameLabel(QGroupBox* parent)
: QLabel(parent), myW(0)
: QLabel(parent), myW(0)
{
}
@@ -24,44 +24,43 @@ MyNameLabel::~MyNameLabel()
{
}
void MyNameLabel::setText ( const QString &t, bool trans, bool guest, bool computerplayer) {
void MyNameLabel::setText ( const QString &t, bool trans, bool guest, bool computerplayer)
{
QString text;
QColor transColor;
transColor.setNamedColor("#"+myW->getMyGameTableStyle()->getPlayerNickTextColor());
QString red = QString::number(transColor.red());
QString green = QString::number(transColor.green());
QString blue = QString::number(transColor.blue());
QString text;
QColor transColor;
transColor.setNamedColor("#"+myW->getMyGameTableStyle()->getPlayerNickTextColor());
QString red = QString::number(transColor.red());
QString green = QString::number(transColor.green());
QString blue = QString::number(transColor.blue());
if(trans) {
this->setStyleSheet("QLabel { "+ myW->getMyGameTableStyle()->getFont2String() +" font-size: "+myW->getMyGameTableStyle()->getPlayerNameLabelFontSize()+"px; font-weight: bold; color: rgba("+red+", "+green+", "+blue+", 80); }");
}
else {
this->setStyleSheet("QLabel { "+ myW->getMyGameTableStyle()->getFont2String() +" font-size: "+myW->getMyGameTableStyle()->getPlayerNameLabelFontSize()+"px; font-weight: bold; color: #"+myW->getMyGameTableStyle()->getPlayerNickTextColor()+"; }");
}
if(trans) {
this->setStyleSheet("QLabel { "+ myW->getMyGameTableStyle()->getFont2String() +" font-size: "+myW->getMyGameTableStyle()->getPlayerNameLabelFontSize()+"px; font-weight: bold; color: rgba("+red+", "+green+", "+blue+", 80); }");
} else {
this->setStyleSheet("QLabel { "+ myW->getMyGameTableStyle()->getFont2String() +" font-size: "+myW->getMyGameTableStyle()->getPlayerNameLabelFontSize()+"px; font-weight: bold; color: #"+myW->getMyGameTableStyle()->getPlayerNickTextColor()+"; }");
}
if(myW->getSession()) {
if(myW->getSession()) {
if(myW->getSession()->getGameType() == Session::GAME_TYPE_INTERNET && !guest && !computerplayer ) {
if(myW->getSession()->getGameType() == Session::GAME_TYPE_INTERNET && !guest && !computerplayer ) {
// for internet game show players name with links to their profile included
this->setTextFormat(Qt::RichText);
QString linkString = QString("http://pokerth.net/redirect_user_profile.php?nick="+QUrl::toPercentEncoding(t));
this->setTextFormat(Qt::RichText);
QString linkString = QString("http://pokerth.net/redirect_user_profile.php?nick="+QUrl::toPercentEncoding(t));
if(trans) {
text = "<a style='color: rgba("+red+", "+green+", "+blue+", 80);' href='"+linkString+"'>"+t+"</a>";
}
else {
text = "<a style='color: #"+myW->getMyGameTableStyle()->getPlayerNickTextColor()+";' href='"+linkString+"'>"+t+"</a>";
}
if(trans) {
text = "<a style='color: rgba("+red+", "+green+", "+blue+", 80);' href='"+linkString+"'>"+t+"</a>";
} else {
text = "<a style='color: #"+myW->getMyGameTableStyle()->getPlayerNickTextColor()+";' href='"+linkString+"'>"+t+"</a>";
}
}
else {
this->setTextFormat(Qt::PlainText);
text = t;
}
}
else { text = t; }
} else {
this->setTextFormat(Qt::PlainText);
text = t;
}
} else {
text = t;
}
QLabel::setText(text);
QLabel::setText(text);
}