GCI2012: No More Hovering
authordag10
Mon, 14 Jan 2013 12:45:01 +0100
changeset 8382 67e257b98422
parent 8381 588a8e6e2041
child 8383 b557c73a7593
GCI2012: No More Hovering
QTfrontend/ui/page/pagemain.cpp
QTfrontend/ui/page/pagenetgame.cpp
QTfrontend/ui/page/pageoptions.cpp
QTfrontend/ui/page/pagescheme.cpp
QTfrontend/ui/page/pagesingleplayer.cpp
QTfrontend/ui/widget/gamecfgwidget.cpp
QTfrontend/ui/widget/teamselhelper.cpp
--- a/QTfrontend/ui/page/pagemain.cpp	Mon Jan 14 12:35:01 2013 +0100
+++ b/QTfrontend/ui/page/pagemain.cpp	Mon Jan 14 12:45:01 2013 +0100
@@ -42,13 +42,11 @@
     pageLayout->setRowStretch(4, 1);
 
     BtnSinglePlayer = addButton(":/res/LocalPlay.png", pageLayout, 2, 0, 1, 2, true);
-    BtnSinglePlayer->setToolTip(tr("Local Game"));
     BtnSinglePlayer->setWhatsThis(tr("Play a game on a single computer"));
     pageLayout->setAlignment(BtnSinglePlayer, Qt::AlignHCenter);
 
     //BtnNet = addButton(":/res/NetworkPlay.png", (QBoxLayout*)netLayout, 1, true);
     BtnNet = addButton(":/res/NetworkPlay.png", pageLayout, 2, 2, 1, 2, true);
-    BtnNet->setToolTip(tr("Network Game"));
     BtnNet->setWhatsThis(tr("Play a game across a network"));
     pageLayout->setAlignment(BtnNet, Qt::AlignHCenter);
     connect(BtnNet, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice()));
@@ -65,13 +63,11 @@
     netLayout->setAlignment(Qt::AlignHCenter);
 
     BtnNetLocal = addButton("Play local network game", (QBoxLayout*)netLayout, 0, false);
-    BtnNetLocal->setToolTip(tr("Play a local network game"));
     BtnNetLocal->setWhatsThis(tr("Play a game across a local area network"));
     BtnNetLocal->setFixedSize(BtnNet->width() - 50, 60);
     BtnNetLocal->setVisible(false);
 
     BtnNetOfficial = addButton("Play official network game", (QBoxLayout*)netLayout, 0, false);
-    BtnNetOfficial->setToolTip(tr("Play a network game"));
     BtnNetOfficial->setWhatsThis(tr("Play a game on an official server"));
     BtnNetOfficial->setFixedSize(BtnNet->width() - 50, 60);
     BtnNetOfficial->setVisible(false);
@@ -79,7 +75,6 @@
     // button order matters for overlapping (what's on top and what isn't)
     BtnInfo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true);
     BtnInfo->setStyleSheet("border: transparent;background: transparent;");
-    //BtnInfo->setToolTip(tr("Credits")); //tooltip looks horrible with transparent background buttons
     BtnInfo->setWhatsThis(tr("Read about who is behind the Hedgewars Project"));
     pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter);
 
@@ -90,7 +85,6 @@
 
     BtnDataDownload = addButton(tr("Downloadable Content"), pageLayout, 5, 0, 1, 4, false);
     BtnDataDownload->setFixedSize(176, 27);
-    //BtnDataDownload->setToolTip(tr(Downloadable Content"));
     BtnDataDownload->setWhatsThis(tr("Access the user created content downloadable from our website"));
     pageLayout->setAlignment(BtnDataDownload, Qt::AlignHCenter);
 
--- a/QTfrontend/ui/page/pagenetgame.cpp	Mon Jan 14 12:35:01 2013 +0100
+++ b/QTfrontend/ui/page/pagenetgame.cpp	Mon Jan 14 12:45:01 2013 +0100
@@ -76,7 +76,6 @@
 
     //Button to signify whether the player is ready to start playing
     BtnGo = new QPushButton(this);
-    BtnGo->setToolTip(QPushButton::tr("Ready"));
     BtnGo->setIcon(QIcon(":/res/lightbulb_off.png"));
     BtnGo->setIconSize(QSize(25, 34));
     BtnGo->setMinimumWidth(50);
--- a/QTfrontend/ui/page/pageoptions.cpp	Mon Jan 14 12:35:01 2013 +0100
+++ b/QTfrontend/ui/page/pageoptions.cpp	Mon Jan 14 12:45:01 2013 +0100
@@ -99,7 +99,7 @@
             GBTlayout->addWidget(CBTeamName, 0, 0);
 
             BtnNewTeam = new QPushButton(teamsBox);
-            BtnNewTeam->setToolTip(tr("New team"));
+            BtnNewTeam->setWhatsThis(tr("New team"));
             BtnNewTeam->setIconSize(pmNew.size());
             BtnNewTeam->setIcon(pmNew);
             BtnNewTeam->setMaximumWidth(pmNew.width() + 6);
@@ -107,7 +107,7 @@
             GBTlayout->addWidget(BtnNewTeam, 0, 1);
 
             BtnEditTeam = new QPushButton(teamsBox);
-            BtnEditTeam->setToolTip(tr("Edit team"));
+            BtnEditTeam->setWhatsThis(tr("Edit team"));
             BtnEditTeam->setIconSize(pmEdit.size());
             BtnEditTeam->setIcon(pmEdit);
             BtnEditTeam->setMaximumWidth(pmEdit.width() + 6);
@@ -115,7 +115,7 @@
             GBTlayout->addWidget(BtnEditTeam, 0, 2);
 
             BtnDeleteTeam = new QPushButton(teamsBox);
-            BtnDeleteTeam->setToolTip(tr("Delete team"));
+            BtnDeleteTeam->setWhatsThis(tr("Delete team"));
             BtnDeleteTeam->setIconSize(pmDelete.size());
             BtnDeleteTeam->setIcon(pmDelete);
             BtnDeleteTeam->setMaximumWidth(pmDelete.width() + 6);
@@ -253,7 +253,7 @@
 
             btnUpdateNow = new QPushButton(groupMisc);
             connect(btnUpdateNow, SIGNAL(clicked()), this, SLOT(checkForUpdates()));
-            btnUpdateNow->setToolTip(tr("Check for updates"));
+            btnUpdateNow->setWhatsThis(tr("Check for updates"));
             btnUpdateNow->setText("Check now");
             btnUpdateNow->setFixedSize(130, 30);
             MiscLayout->addWidget(btnUpdateNow, 7, 1, 1, 1);
--- a/QTfrontend/ui/page/pagescheme.cpp	Mon Jan 14 12:35:01 2013 +0100
+++ b/QTfrontend/ui/page/pagescheme.cpp	Mon Jan 14 12:45:01 2013 +0100
@@ -68,127 +68,102 @@
     // Left
 
     TBW_mode_Forts = new ToggleButtonWidget(gbGameModes, ":/res/btnForts@2x.png");
-    TBW_mode_Forts->setToolTip("<b>" + ToggleButtonWidget::tr("Fort Mode") + "</b>");
     TBW_mode_Forts->setWhatsThis(tr("Defend your fort and destroy the opponents, two team colours max!"));
     glGMLayout->addWidget(TBW_mode_Forts,0,0,1,1);
 
     TBW_teamsDivide = new ToggleButtonWidget(gbGameModes, ":/res/btnTeamsDivide@2x.png");
-    TBW_teamsDivide->setToolTip("<b>" + ToggleButtonWidget::tr("Divide Teams") + "</b>");
     TBW_teamsDivide->setWhatsThis(tr("Teams will start on opposite sides of the terrain, two team colours max!"));
     glGMLayout->addWidget(TBW_teamsDivide,0,1,1,1);
 
     TBW_solid = new ToggleButtonWidget(gbGameModes, ":/res/btnSolid@2x.png");
-    TBW_solid->setToolTip("<b>" + ToggleButtonWidget::tr("Solid Land") + "</b>");
     TBW_solid->setWhatsThis(tr("Land can not be destroyed!"));
     glGMLayout->addWidget(TBW_solid,0,2,1,1);
 
     TBW_border = new ToggleButtonWidget(gbGameModes, ":/res/btnBorder@2x.png");
-    TBW_border->setToolTip("<b>" + ToggleButtonWidget::tr("Add Border") + "</b>");
     TBW_border->setWhatsThis(tr("Add an indestructible border around the terrain"));
     glGMLayout->addWidget(TBW_border,0,3,1,1);
 
     TBW_lowGravity = new ToggleButtonWidget(gbGameModes, ":/res/btnLowGravity@2x.png");
-    TBW_lowGravity->setToolTip("<b>" + ToggleButtonWidget::tr("Low Gravity") + "</b>");
     TBW_lowGravity->setWhatsThis(tr("Lower gravity"));
     glGMLayout->addWidget(TBW_lowGravity,0,4,1,1);
 
     TBW_laserSight = new ToggleButtonWidget(gbGameModes, ":/res/btnLaserSight@2x.png");
-    TBW_laserSight->setToolTip("<b>" + ToggleButtonWidget::tr("Laser Sight") + "</b>");
     TBW_laserSight->setWhatsThis(tr("Assisted aiming with laser sight"));
     glGMLayout->addWidget(TBW_laserSight,1,0,1,1);
 
     TBW_invulnerable = new ToggleButtonWidget(gbGameModes, ":/res/btnInvulnerable@2x.png");
-    TBW_invulnerable->setToolTip("<b>" + ToggleButtonWidget::tr("Invulnerable") + "</b>");
     TBW_invulnerable->setWhatsThis(tr("All hogs have a personal forcefield"));
     glGMLayout->addWidget(TBW_invulnerable,1,1,1,1);
 
     TBW_resethealth = new ToggleButtonWidget(gbGameModes, ":/res/btnResetHealth@2x.png");
-    TBW_resethealth->setToolTip("<b>" + ToggleButtonWidget::tr("Reset Health") + "</b>");
     TBW_resethealth->setWhatsThis(tr("All (living) hedgehogs are fully restored at the end of turn"));
     glGMLayout->addWidget(TBW_resethealth,1,2,1,1);
 
     TBW_vampiric = new ToggleButtonWidget(gbGameModes, ":/res/btnVampiric@2x.png");
-    TBW_vampiric->setToolTip("<b>" + ToggleButtonWidget::tr("Vampirism") + "</b>");
     TBW_vampiric->setWhatsThis(tr("Gain 80% of the damage you do back in health"));
     glGMLayout->addWidget(TBW_vampiric,1,3,1,1);
 
     TBW_karma = new ToggleButtonWidget(gbGameModes, ":/res/btnKarma@2x.png");
-    TBW_karma->setToolTip("<b>" + ToggleButtonWidget::tr("Karma") + "</b>");
     TBW_karma->setWhatsThis(tr("Share your opponents pain, share their damage"));
     glGMLayout->addWidget(TBW_karma,1,4,1,1);
 
     TBW_artillery = new ToggleButtonWidget(gbGameModes, ":/res/btnArtillery@2x.png");
-    TBW_artillery->setToolTip("<b>" + ToggleButtonWidget::tr("Artillery") + "</b>");
     TBW_artillery->setWhatsThis(tr("Your hogs are unable to move, put your artillery skills to the test"));
     glGMLayout->addWidget(TBW_artillery,2,0,1,1);
 
     TBW_randomorder = new ToggleButtonWidget(gbGameModes, ":/res/btnRandomOrder@2x.png");
-    TBW_randomorder->setToolTip("<b>" + ToggleButtonWidget::tr("Random Order") + "</b>");
     TBW_randomorder->setWhatsThis(tr("Order of play is random instead of in room order."));
     glGMLayout->addWidget(TBW_randomorder,2,1,1,1);
 
     TBW_king = new ToggleButtonWidget(gbGameModes, ":/res/btnKing@2x.png");
-    TBW_king->setToolTip("<b>" + ToggleButtonWidget::tr("King") + "</b>");
     TBW_king->setWhatsThis(tr("Play with a King. If he dies, your side dies."));
     glGMLayout->addWidget(TBW_king,2,2,1,1);
 
     TBW_placehog = new ToggleButtonWidget(gbGameModes, ":/res/btnPlaceHog@2x.png");
-    TBW_placehog->setToolTip("<b>" + ToggleButtonWidget::tr("Place Hedgehogs") + "</b>");
     TBW_placehog->setWhatsThis(tr("Take turns placing your hedgehogs before the start of play."));
     glGMLayout->addWidget(TBW_placehog,2,3,1,1);
 
     TBW_sharedammo = new ToggleButtonWidget(gbGameModes, ":/res/btnSharedAmmo@2x.png");
-    TBW_sharedammo->setToolTip("<b>" + ToggleButtonWidget::tr("Clan Shares Ammo") + "</b>");
     TBW_sharedammo->setWhatsThis(tr("Ammo is shared between all teams that share a colour."));
     glGMLayout->addWidget(TBW_sharedammo,2,4,1,1);
 
     TBW_disablegirders = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableGirders@2x.png");
-    TBW_disablegirders->setToolTip("<b>" + ToggleButtonWidget::tr("Disable Girders") + "</b>");
     TBW_disablegirders->setWhatsThis(tr("Disable girders when generating random maps."));
     glGMLayout->addWidget(TBW_disablegirders,3,0,1,1);
 
     TBW_disablelandobjects = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableLandObjects@2x.png");
-    TBW_disablelandobjects->setToolTip("<b>" + ToggleButtonWidget::tr("Disable Land Objects") + "</b>");
     TBW_disablelandobjects->setWhatsThis(tr("Disable land objects when generating random maps."));
     glGMLayout->addWidget(TBW_disablelandobjects,3,1,1,1);
 
     TBW_aisurvival = new ToggleButtonWidget(gbGameModes, ":/res/btnAISurvival@2x.png");
-    TBW_aisurvival->setToolTip("<b>" + ToggleButtonWidget::tr("AI Survival Mode") + "</b>");
     TBW_aisurvival->setWhatsThis(tr("AI respawns on death."));
     glGMLayout->addWidget(TBW_aisurvival,3,2,1,1);
 
     TBW_infattack = new ToggleButtonWidget(gbGameModes, ":/res/btnInfAttack@2x.png");
-    TBW_infattack->setToolTip("<b>" + ToggleButtonWidget::tr("Unlimited Attacks") + "</b>");
     TBW_infattack->setWhatsThis(tr("Attacking does not end your turn."));
     glGMLayout->addWidget(TBW_infattack,3,3,1,1);
 
     TBW_resetweps = new ToggleButtonWidget(gbGameModes, ":/res/btnResetWeps@2x.png");
-    TBW_resetweps->setToolTip("<b>" + ToggleButtonWidget::tr("Reset Weapons") + "</b>");
     TBW_resetweps->setWhatsThis(tr("Weapons are reset to starting values each turn."));
     glGMLayout->addWidget(TBW_resetweps,3,4,1,1);
 
     TBW_perhogammo = new ToggleButtonWidget(gbGameModes, ":/res/btnPerHogAmmo@2x.png");
-    TBW_perhogammo->setToolTip("<b>" + ToggleButtonWidget::tr("Per Hedgehog Ammo") + "</b>");
     TBW_perhogammo->setWhatsThis(tr("Each hedgehog has its own ammo. It does not share with the team."));
     glGMLayout->addWidget(TBW_perhogammo,4,0,1,1);
 
     TBW_nowind = new ToggleButtonWidget(gbGameModes, ":/res/btnNoWind@2x.png");
-    TBW_nowind->setToolTip("<b>" + ToggleButtonWidget::tr("Disable Wind") + "</b>");
     TBW_nowind->setWhatsThis(tr("You will not have to worry about wind anymore."));
     glGMLayout->addWidget(TBW_nowind,4,1,1,1);
 
     TBW_morewind = new ToggleButtonWidget(gbGameModes, ":/res/btnMoreWind@2x.png");
-    TBW_morewind->setToolTip("<b>" + ToggleButtonWidget::tr("More Wind") + "</b>");
     TBW_morewind->setWhatsThis(tr("Wind will affect almost everything."));
     glGMLayout->addWidget(TBW_morewind,4,2,1,1);
 
     TBW_tagteam = new ToggleButtonWidget(gbGameModes, ":/res/btnTagTeam@2x.png");
-    TBW_tagteam->setToolTip("<b>" + ToggleButtonWidget::tr("Tag Team") + "</b>");
     TBW_tagteam->setWhatsThis(tr("Teams in each clan take successive turns sharing their turn time."));
     glGMLayout->addWidget(TBW_tagteam,4,3,1,1);
 
     TBW_bottomborder = new ToggleButtonWidget(gbGameModes, ":/res/btnBottomBorder@2x.png");
-    TBW_bottomborder->setToolTip("<b>" + ToggleButtonWidget::tr("Add Bottom Border") + "</b>");
     TBW_bottomborder->setWhatsThis(tr("Add an indestructible border along the bottom"));
     glGMLayout->addWidget(TBW_bottomborder,4,4,1,1);
 
--- a/QTfrontend/ui/page/pagesingleplayer.cpp	Mon Jan 14 12:35:01 2013 +0100
+++ b/QTfrontend/ui/page/pagesingleplayer.cpp	Mon Jan 14 12:45:01 2013 +0100
@@ -36,22 +36,18 @@
 
     topLine->addStretch();
     BtnSimpleGamePage = addButton(":/res/SimpleGame.png", topLine, 0, true);
-    BtnSimpleGamePage->setToolTip(tr("Simple Game"));
     BtnSimpleGamePage->setWhatsThis(tr("Play a quick game against the computer with random settings"));
     topLine->addSpacing(60);
     BtnMultiplayer = addButton(":/res/Multiplayer.png", topLine, 1, true);
-    BtnMultiplayer->setToolTip(tr("Multiplayer"));
     BtnMultiplayer->setWhatsThis(tr("Play a hotseat game against your friends, or AI teams"));
     topLine->addStretch();
 
 
     BtnCampaignPage = addButton(":/res/Campaign.png", middleLine, 0, true);
-    BtnCampaignPage->setToolTip(tr("Campaign Mode"));
     BtnCampaignPage->setWhatsThis(tr("Campaign Mode"));
     BtnCampaignPage->setVisible(true);
 
     BtnTrainPage = addButton(":/res/Trainings.png", middleLine, 1, true);
-    BtnTrainPage->setToolTip(tr("Training Mode"));
     BtnTrainPage->setWhatsThis(tr("Practice your skills in a range of training missions"));
 
     return vLayout;
@@ -63,11 +59,9 @@
     bottomLine->addStretch();
 
     BtnDemos = addButton(":/res/Record.png", bottomLine, 1, true);
-    BtnDemos->setToolTip(tr("Demos"));
     BtnDemos->setWhatsThis(tr("Watch recorded demos"));
     BtnLoad = addButton(":/res/Load.png", bottomLine, 2, true);
     BtnLoad->setStyleSheet("QPushButton{margin: 24px 0 0 0;}");
-    BtnLoad->setToolTip(tr("Load"));
     BtnLoad->setWhatsThis(tr("Load a previously saved game"));
 
     bottomLine->setStretch(1,0);
--- a/QTfrontend/ui/widget/gamecfgwidget.cpp	Mon Jan 14 12:35:01 2013 +0100
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp	Mon Jan 14 12:45:01 2013 +0100
@@ -82,7 +82,7 @@
     QPixmap pmEdit(":/res/edit.png");
 
     QPushButton * goToSchemePage = new QPushButton(SchemeWidget);
-    goToSchemePage->setToolTip(tr("Edit schemes"));
+    goToSchemePage->setWhatsThis(tr("Edit schemes"));
     goToSchemePage->setIconSize(pmEdit.size());
     goToSchemePage->setIcon(pmEdit);
     goToSchemePage->setMaximumWidth(pmEdit.width() + 6);
@@ -97,7 +97,7 @@
     connect(WeaponsName, SIGNAL(currentIndexChanged(int)), this, SLOT(ammoChanged(int)));
 
     QPushButton * goToWeaponPage = new QPushButton(SchemeWidget);
-    goToWeaponPage->setToolTip(tr("Edit weapons"));
+    goToWeaponPage->setWhatsThis(tr("Edit weapons"));
     goToWeaponPage->setIconSize(pmEdit.size());
     goToWeaponPage->setIcon(pmEdit);
     goToWeaponPage->setMaximumWidth(pmEdit.width() + 6);
@@ -105,7 +105,7 @@
     connect(goToWeaponPage, SIGNAL(clicked()), this, SLOT(jumpToWeapons()));
 
     bindEntries = new QCheckBox(SchemeWidget);
-    bindEntries->setToolTip(tr("When this option is enabled selecting a game scheme will auto-select a weapon"));
+    bindEntries->setWhatsThis(tr("Game scheme will auto-select a weapon"));
     bindEntries->setChecked(true);
     bindEntries->setMaximumWidth(42);
     bindEntries->setStyleSheet( "QCheckBox::indicator:checked   { image: url(\":/res/lock.png\"); }"
--- a/QTfrontend/ui/widget/teamselhelper.cpp	Mon Jan 14 12:35:01 2013 +0100
+++ b/QTfrontend/ui/widget/teamselhelper.cpp	Mon Jan 14 12:45:01 2013 +0100
@@ -55,7 +55,7 @@
 
     butt = new QPushButton(difficultyIcon, team.name().replace("&","&&"), this);
     butt->setFlat(true);
-    butt->setToolTip(team.owner());
+    butt->setWhatsThis(tr("%1's team").arg(team.owner()));
     mainLayout.addWidget(butt);
     butt->setStyleSheet("QPushButton{"
                         "icon-size: 48px;"