Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Commit

Permalink
hide What's this buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
velnias75 committed Nov 28, 2014
1 parent 7089041 commit 0d95ad2
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/connectionlogdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ ConnectionLogDialog::ConnectionLogDialog(QWidget *p) : QDialog(p, Qt::Window),

setupUi(this);

Qt::WindowFlags f = windowFlags();
f &= ~Qt::WindowContextHelpButtonHint;
f &= ~Qt::WindowSystemMenuHint;
setWindowFlags(f);

setAttribute(Qt::WA_QuitOnClose, false);

m_ctxPopup->addAction(actionCopy);
Expand All @@ -57,6 +62,8 @@ ConnectionLogDialog::ConnectionLogDialog(QWidget *p) : QDialog(p, Qt::Window),
QObject::connect(logView, SIGNAL(customContextMenuRequested(const QPoint &)),
this, SLOT(showContextMenu(const QPoint &)));

logView->setAttribute(Qt::WA_Hover, false);

readSettings();
}

Expand Down
5 changes: 5 additions & 0 deletions src/deleteserversdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ DeleteServersDialog::DeleteServersDialog(const QStandardItemModel *model, QWidge

setupUi(this);

Qt::WindowFlags f = windowFlags();
f &= ~Qt::WindowContextHelpButtonHint;
f &= ~Qt::WindowSystemMenuHint;
setWindowFlags(f);

serversList->setModel(&m_model);

QObject::connect(buttonBox, SIGNAL(accepted()), this, SLOT(deleteServers()));
Expand Down
6 changes: 6 additions & 0 deletions src/jackchoosedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@
#include "jackchoosedialog.h"

JackChooseDialog::JackChooseDialog(QWidget *p) : QDialog(p) {

setupUi(this);

Qt::WindowFlags f = windowFlags();
f &= ~Qt::WindowContextHelpButtonHint;
f &= ~Qt::WindowSystemMenuHint;
setWindowFlags(f);

heartsSuit->setToolTip(suitToolTip(NetMauMau::Common::ICard::HEARTS));
diamondsSuit->setToolTip(suitToolTip(NetMauMau::Common::ICard::DIAMONDS));
clubsSuit->setToolTip(suitToolTip(NetMauMau::Common::ICard::CLUBS));
Expand Down
5 changes: 5 additions & 0 deletions src/launchserverdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ LaunchServerDialog::LaunchServerDialog(LocalServerOutputView *lsov, QWidget *p)

setupUi(this);

Qt::WindowFlags f = windowFlags();
f &= ~Qt::WindowContextHelpButtonHint;
f &= ~Qt::WindowSystemMenuHint;
setWindowFlags(f);

QSettings settings;
settings.beginGroup("Launcher");
launchStartup->setChecked(settings.value("onStartup", false).toBool());
Expand Down
5 changes: 5 additions & 0 deletions src/localserveroutputview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ LocalServerOutputView::LocalServerOutputView(QWidget *p) : QWidget(p), m_text(QS

setupUi(this);

Qt::WindowFlags f = windowFlags();
f &= ~Qt::WindowContextHelpButtonHint;
f &= ~Qt::WindowSystemMenuHint;
setWindowFlags(f);

setAttribute(Qt::WA_QuitOnClose, false);

m_textFont.setStyleHint(QFont::TypeWriter);
Expand Down
12 changes: 12 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ MainWindow::MainWindow(QWidget *p) : QMainWindow(p), m_client(0L), m_ui(new Ui::
setCorner(Qt::BottomLeftCorner, Qt::BottomDockWidgetArea);
setCorner(Qt::BottomRightCorner, Qt::BottomDockWidgetArea);

setAttribute(Qt::WA_AlwaysShowToolTips, true);

if(!m_ui->actionReconnect->icon().hasThemeIcon("go-previous")) {
m_ui->actionReconnect->setIcon(QIcon(":/go-previous.png"));
}
Expand Down Expand Up @@ -448,6 +450,11 @@ void MainWindow::clientPlayerLost(const QString &p, std::size_t t, std::size_t p

icon.addFile(QString::fromUtf8(":/nmm_qt_client.png"), QSize(), QIcon::Normal, QIcon::Off);

Qt::WindowFlags f = lost.windowFlags();
f &= ~Qt::WindowContextHelpButtonHint;
f &= ~Qt::WindowSystemMenuHint;
lost.setWindowFlags(f);

lost.setWindowIcon(icon);
lost.setWindowTitle(tr("Sorry"));
lost.setWindowModality(Qt::ApplicationModal);
Expand Down Expand Up @@ -479,6 +486,11 @@ void MainWindow::clientPlayerWins(const QString &p, std::size_t t) {
gameOver.setWindowModality(Qt::ApplicationModal);
gameOver.setWindowIcon(icon);

Qt::WindowFlags f = gameOver.windowFlags();
f &= ~Qt::WindowContextHelpButtonHint;
f &= ~Qt::WindowSystemMenuHint;
gameOver.setWindowFlags(f);

if(isMe(p)) {

gameOver.setIconPixmap(QIcon::fromTheme("face-smile-big",
Expand Down
5 changes: 5 additions & 0 deletions src/serverdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ const QRegExp hostRex("^(?=.{1,255}$)[0-9A-Za-z]" \
ServerDialog::ServerDialog(QWidget *p) : QDialog(p), m_model(), m_forceRefresh(false),
m_lastServer(QString::null), m_deleteServersDlg(new DeleteServersDialog(&m_model, this)) {

Qt::WindowFlags f = windowFlags();
f &= ~Qt::WindowContextHelpButtonHint;
f &= ~Qt::WindowSystemMenuHint;
setWindowFlags(f);

setupUi(this);

portSpin->setValue(Client::getDefaultPort());
Expand Down

0 comments on commit 0d95ad2

Please sign in to comment.