back to lobby button + gui fixes
This commit is contained in:
@@ -2895,6 +2895,19 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="0" >
|
||||||
|
<widget class="QPushButton" name="pushButton_backToLobby" >
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Back to lobby</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -3213,7 +3226,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1000</width>
|
<width>1000</width>
|
||||||
<height>28</height>
|
<height>29</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuView" >
|
<widget class="QMenu" name="menuView" >
|
||||||
@@ -3224,6 +3237,7 @@
|
|||||||
<addaction name="actionShowHideChat" />
|
<addaction name="actionShowHideChat" />
|
||||||
<addaction name="actionShowHideHelp" />
|
<addaction name="actionShowHideHelp" />
|
||||||
<addaction name="actionShowHideLog" />
|
<addaction name="actionShowHideLog" />
|
||||||
|
<addaction name="actionShowHideAway" />
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuSpiel" >
|
<widget class="QMenu" name="menuSpiel" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
@@ -3335,6 +3349,14 @@
|
|||||||
<string>Ctrl+I</string>
|
<string>Ctrl+I</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionShowHideAway" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Show/Hide Away Window</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut" >
|
||||||
|
<string>Ctrl+A</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|||||||
@@ -375,6 +375,8 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
|
|
||||||
pushButton_break->setStyleSheet("QPushButton:enabled { background-color: #145300; color: white;} QPushButton:disabled { background-color: #145300; color: #486F3E; font-weight: 900;}");
|
pushButton_break->setStyleSheet("QPushButton:enabled { background-color: #145300; color: white;} QPushButton:disabled { background-color: #145300; color: #486F3E; font-weight: 900;}");
|
||||||
|
|
||||||
|
pushButton_backToLobby->setStyleSheet("QPushButton { background-color: #145300; color: white;}");
|
||||||
|
|
||||||
// horizontalSlider_speed->setStyleSheet("QSlider::groove:horizontal { border: 1px solid #286400; height: 3px; background: #689700; } QSlider::handle:horizontal { background: #689700; border: 1px solid #286400; width: 10px; margin: -8px 0; border-radius: 3px; }");
|
// horizontalSlider_speed->setStyleSheet("QSlider::groove:horizontal { border: 1px solid #286400; height: 3px; background: #689700; } QSlider::handle:horizontal { background: #689700; border: 1px solid #286400; width: 10px; margin: -8px 0; border-radius: 3px; }");
|
||||||
|
|
||||||
statusbar->setStyleSheet(" QStatusBar { "+ font1String +" font-size: 12px; color: white; }");
|
statusbar->setStyleSheet(" QStatusBar { "+ font1String +" font-size: 12px; color: white; }");
|
||||||
@@ -508,11 +510,16 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
connect( actionShowHideChat, SIGNAL( triggered() ), this, SLOT( switchChatWindow() ) );
|
connect( actionShowHideChat, SIGNAL( triggered() ), this, SLOT( switchChatWindow() ) );
|
||||||
connect( actionShowHideHelp, SIGNAL( triggered() ), this, SLOT( switchHelpWindow() ) );
|
connect( actionShowHideHelp, SIGNAL( triggered() ), this, SLOT( switchHelpWindow() ) );
|
||||||
connect( actionShowHideLog, SIGNAL( triggered() ), this, SLOT( switchLogWindow() ) );
|
connect( actionShowHideLog, SIGNAL( triggered() ), this, SLOT( switchLogWindow() ) );
|
||||||
|
connect( actionShowHideAway, SIGNAL( triggered() ), this, SLOT( switchAwayWindow() ) );
|
||||||
|
|
||||||
|
|
||||||
connect( pushButton_BetRaise, SIGNAL( clicked(bool) ), this, SLOT( pushButtonBetRaiseClicked(bool) ) );
|
connect( pushButton_BetRaise, SIGNAL( clicked(bool) ), this, SLOT( pushButtonBetRaiseClicked(bool) ) );
|
||||||
connect( pushButton_Fold, SIGNAL( clicked(bool) ), this, SLOT( pushButtonFoldClicked(bool) ) );
|
connect( pushButton_Fold, SIGNAL( clicked(bool) ), this, SLOT( pushButtonFoldClicked(bool) ) );
|
||||||
connect( pushButton_CallCheck, SIGNAL( clicked(bool) ), this, SLOT( pushButtonCallCheckClicked(bool) ) );
|
connect( pushButton_CallCheck, SIGNAL( clicked(bool) ), this, SLOT( pushButtonCallCheckClicked(bool) ) );
|
||||||
connect( pushButton_AllIn, SIGNAL( clicked(bool) ), this, SLOT(pushButtonAllInClicked(bool) ) );
|
connect( pushButton_AllIn, SIGNAL( clicked(bool) ), this, SLOT(pushButtonAllInClicked(bool) ) );
|
||||||
|
connect( pushButton_backToLobby , SIGNAL( clicked(bool) ), this, SLOT(leaveCurrentNetworkGame() ) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
connect( horizontalSlider_bet, SIGNAL( valueChanged(int)), this, SLOT ( changeSpinBoxBetValue(int) ) );
|
connect( horizontalSlider_bet, SIGNAL( valueChanged(int)), this, SLOT ( changeSpinBoxBetValue(int) ) );
|
||||||
|
|
||||||
@@ -3407,10 +3414,31 @@ void mainWindowImpl::switchHelpWindow() {
|
|||||||
|
|
||||||
void mainWindowImpl::switchLogWindow() {
|
void mainWindowImpl::switchLogWindow() {
|
||||||
|
|
||||||
|
int tab = 0;
|
||||||
if (groupBox_RightToolBox->isHidden()) {
|
if (groupBox_RightToolBox->isHidden()) {
|
||||||
|
tabWidget_Right->setCurrentIndex(tab);
|
||||||
groupBox_RightToolBox->show();
|
groupBox_RightToolBox->show();
|
||||||
} else {
|
} else {
|
||||||
groupBox_RightToolBox->hide();
|
if (tabWidget_Right->currentIndex() == tab) {
|
||||||
|
groupBox_RightToolBox->hide();
|
||||||
|
} else {
|
||||||
|
tabWidget_Right->setCurrentIndex(tab);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void mainWindowImpl::switchAwayWindow() {
|
||||||
|
|
||||||
|
int tab = 1;
|
||||||
|
if (groupBox_RightToolBox->isHidden()) {
|
||||||
|
tabWidget_Right->setCurrentIndex(tab);
|
||||||
|
groupBox_RightToolBox->show();
|
||||||
|
} else {
|
||||||
|
if (tabWidget_Right->currentIndex() == tab) {
|
||||||
|
groupBox_RightToolBox->hide();
|
||||||
|
} else {
|
||||||
|
tabWidget_Right->setCurrentIndex(tab);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3465,6 +3493,7 @@ void mainWindowImpl::localGameModification() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pushButton_break->show();
|
pushButton_break->show();
|
||||||
|
pushButton_backToLobby->hide();
|
||||||
|
|
||||||
//Set the playing mode to "manual"
|
//Set the playing mode to "manual"
|
||||||
radioButton_manualAction->click();
|
radioButton_manualAction->click();
|
||||||
@@ -3480,7 +3509,7 @@ void mainWindowImpl::networkGameModification() {
|
|||||||
myChat->clearNewGame();
|
myChat->clearNewGame();
|
||||||
|
|
||||||
pushButton_break->hide();
|
pushButton_break->hide();
|
||||||
|
pushButton_backToLobby->show();
|
||||||
//Set the playing mode to "manual"
|
//Set the playing mode to "manual"
|
||||||
radioButton_manualAction->click();
|
radioButton_manualAction->click();
|
||||||
|
|
||||||
@@ -3612,3 +3641,9 @@ void mainWindowImpl::changeSpinBoxBetValue(int value) {
|
|||||||
else
|
else
|
||||||
spinBox_set->setValue((int)((value/50)*50));
|
spinBox_set->setValue((int)((value/50)*50));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mainWindowImpl::leaveCurrentNetworkGame() {
|
||||||
|
|
||||||
|
assert(mySession);
|
||||||
|
mySession->sendLeaveCurrentGame();
|
||||||
|
}
|
||||||
|
|||||||
@@ -296,6 +296,7 @@ public slots:
|
|||||||
void switchChatWindow();
|
void switchChatWindow();
|
||||||
void switchHelpWindow();
|
void switchHelpWindow();
|
||||||
void switchLogWindow();
|
void switchLogWindow();
|
||||||
|
void switchAwayWindow();
|
||||||
void switchFullscreen();
|
void switchFullscreen();
|
||||||
|
|
||||||
void paintStartSplash();
|
void paintStartSplash();
|
||||||
@@ -304,6 +305,8 @@ public slots:
|
|||||||
void checkChatInputLength(QString);
|
void checkChatInputLength(QString);
|
||||||
void tabSwitchAction();
|
void tabSwitchAction();
|
||||||
|
|
||||||
|
void leaveCurrentNetworkGame();
|
||||||
|
|
||||||
void networkError(int, int);
|
void networkError(int, int);
|
||||||
void networkNotification(int);
|
void networkNotification(int);
|
||||||
void networkStart(boost::shared_ptr<Game> game);
|
void networkStart(boost::shared_ptr<Game> game);
|
||||||
|
|||||||
@@ -29,15 +29,24 @@ MyRightTabWidget::MyRightTabWidget(QGroupBox *parent)
|
|||||||
QString font1String("font-family: \"Arial\";");
|
QString font1String("font-family: \"Arial\";");
|
||||||
int paddingTop = 1;
|
int paddingTop = 1;
|
||||||
int paddingSide = 3;
|
int paddingSide = 3;
|
||||||
|
|
||||||
|
QFontMetrics tempMetrics = this->fontMetrics();
|
||||||
|
int tabMinWidth = tempMetrics.width(this->tabText(0));
|
||||||
|
if(tabMinWidth < tempMetrics.width(this->tabText(1)))
|
||||||
|
tabMinWidth = tempMetrics.width(this->tabText(1));
|
||||||
|
|
||||||
|
QString tabMinWidthString(QString::number(tabMinWidth,10)+"px;");
|
||||||
|
|
||||||
#else
|
#else
|
||||||
QString font1String("font-family: \"Nimbus Sans L\";");
|
QString font1String("font-family: \"Nimbus Sans L\";");
|
||||||
int paddingTop = 0;
|
int paddingTop = 0;
|
||||||
int paddingSide = 1;
|
int paddingSide = 1;
|
||||||
|
QString tabMinWidthString = "8ex;";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QTabBar *myTabBar = this->tabBar();
|
QTabBar *myTabBar = this->tabBar();
|
||||||
|
|
||||||
myTabBar->setStyleSheet("QTabBar::tab{ "+ font1String +" font-size: 11px; color: white; background-color: #145300; border: 2px solid #286400; border-bottom-color: #286400; border-top-left-radius: 4px; border-top-right-radius: 4px; min-width: 8ex; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:selected, QTabBar::tab:hover { background-color: #145300; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:selected { border-color: #286400; border-bottom-color: #145300; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:!selected { margin-top: 2px; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:selected { margin-left: -4px; margin-right: -4px; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:first:selected { margin-left: 0; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:last:selected { margin-right: 0; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:only-one { margin: 0; } QTabBar::tab:disabled { font-size: 11px; font-weight: 900; color: #144D03; background-color: #144D03; border-left-color: #255704; border-right-color: #255704; border-top-color: #255704; }");
|
myTabBar->setStyleSheet("QTabBar::tab{ "+ font1String +" font-size: 11px; color: white; background-color: #145300; border: 2px solid #286400; border-bottom-color: #286400; border-top-left-radius: 4px; border-top-right-radius: 4px; min-width: "+tabMinWidthString+" padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:selected, QTabBar::tab:hover { background-color: #145300; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:selected { border-color: #286400; border-bottom-color: #145300; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:!selected { margin-top: 2px; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:selected { margin-left: -4px; margin-right: -4px; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:first:selected { margin-left: 0; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:last:selected { margin-right: 0; padding-top: "+QString::number(paddingTop,10)+"px; padding-left:"+QString::number(paddingSide,10)+"px; padding-right:"+QString::number(paddingSide,10)+"px;} QTabBar::tab:only-one { margin: 0; } QTabBar::tab:disabled { font-size: 11px; font-weight: 900; color: #144D03; background-color: #144D03; border-left-color: #255704; border-right-color: #255704; border-top-color: #255704; }");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user