本文整理汇总了C++中QToolBar::setContextMenuPolicy方法的典型用法代码示例。如果您正苦于以下问题:C++ QToolBar::setContextMenuPolicy方法的具体用法?C++ QToolBar::setContextMenuPolicy怎么用?C++ QToolBar::setContextMenuPolicy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QToolBar
的用法示例。
在下文中一共展示了QToolBar::setContextMenuPolicy方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createToolBars
void FujicoinGUI::createToolBars()
{
if(walletFrame)
{
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
appToolBar = toolbar;
toolbar->setContextMenuPolicy(Qt::PreventContextMenu);
toolbar->setMovable(false);
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
overviewAction->setChecked(true);
#ifdef ENABLE_WALLET
QWidget *spacer = new QWidget();
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
toolbar->addWidget(spacer);
m_wallet_selector = new QComboBox();
connect(m_wallet_selector, SIGNAL(currentIndexChanged(int)), this, SLOT(setCurrentWalletBySelectorIndex(int)));
m_wallet_selector_label = new QLabel();
m_wallet_selector_label->setText(tr("Wallet:") + " ");
m_wallet_selector_label->setBuddy(m_wallet_selector);
m_wallet_selector_label_action = appToolBar->addWidget(m_wallet_selector_label);
m_wallet_selector_action = appToolBar->addWidget(m_wallet_selector);
m_wallet_selector_label_action->setVisible(false);
m_wallet_selector_action->setVisible(false);
#endif
}
}
示例2: createToolBars
void BitcoinGUI::createToolBars()
{
if(walletFrame)
{
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
toolbar->setContextMenuPolicy(Qt::PreventContextMenu);
toolbar->setMovable(false);
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
overviewAction->setChecked(true);
}
}
示例3: createToolBars
void BitcoinGUI::createToolBars()
{
QToolBar *homeToolBar = new QToolBar(this);
QToolBar *menuToolBar = new QToolBar(this);
homeToolBar->setObjectName("homeToolBar");
menuToolBar->setObjectName("menuToolBar");
// homeToolBar->setFixedWidth(300);
// homeToolBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
menuToolBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
homeToolBar->setMovable(false);
menuToolBar->setMovable(false);
homeToolBar->setFloatable(false);
menuToolBar->setFloatable(false);
homeToolBar->setContextMenuPolicy(Qt::PreventContextMenu);
menuToolBar->setContextMenuPolicy(Qt::PreventContextMenu);
homeToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
menuToolBar->setToolButtonStyle(Qt::ToolButtonTextOnly);
homeToolBar->addAction(bitstarAction);
homeToolBar->setIconSize(QSize(24, 24));
menuToolBar->layout()->setSpacing(0);
// Add a spacer, so all menuToolBar items are right aligned...
QWidget* spacer = new QWidget();
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
menuToolBar->addWidget(spacer);
QToolButton *overviewButton = new QToolButton;
overviewButton->setDefaultAction(overviewAction);
overviewButton->setObjectName("overviewMenu");
menuToolBar->addWidget(overviewButton);
QToolButton *sendCoinsButton = new QToolButton;
sendCoinsButton->setDefaultAction(sendCoinsAction);
sendCoinsButton->setObjectName("sendcoinsMenu");
menuToolBar->addWidget(sendCoinsButton);
QToolButton *receiveCoinsButton = new QToolButton;
receiveCoinsButton->setDefaultAction(receiveCoinsAction);
receiveCoinsButton->setObjectName("receivecoinsMenu");
menuToolBar->addWidget(receiveCoinsButton);
QToolButton *historyButton = new QToolButton;
historyButton->setDefaultAction(historyAction);
historyButton->setObjectName("historyMenu");
menuToolBar->addWidget(historyButton);
QToolButton *addressBookButton = new QToolButton;
addressBookButton->setDefaultAction(addressBookAction);
addressBookButton->setObjectName("addressBookMenu");
menuToolBar->addWidget(addressBookButton);
lockToggleButton = new QToolButton;
lockToggleButton->setDefaultAction(lockWalletToggleAction);
lockToggleButton->setObjectName("lockToggleMenu");
lockToggleAction = menuToolBar->addWidget(lockToggleButton);
addToolBar(homeToolBar);
addToolBar(menuToolBar);
}
示例4: QDockWidget
TileCollisionDock::TileCollisionDock(QWidget *parent)
: QDockWidget(parent)
, mTile(nullptr)
, mTilesetDocument(nullptr)
, mDummyMapDocument(nullptr)
, mMapScene(new MapScene(this))
, mMapView(new MapView(this, MapView::NoStaticContents))
, mToolManager(new ToolManager(this))
, mApplyingChanges(false)
, mSynchronizing(false)
, mHasSelectedObjects(false)
{
setObjectName(QLatin1String("tileCollisionDock"));
mMapView->setScene(mMapScene);
mMapView->setResizeAnchor(QGraphicsView::AnchorViewCenter);
mMapView->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
mMapView->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
CreateObjectTool *rectangleObjectsTool = new CreateRectangleObjectTool(this);
CreateObjectTool *ellipseObjectsTool = new CreateEllipseObjectTool(this);
CreateObjectTool *polygonObjectsTool = new CreatePolygonObjectTool(this);
CreateObjectTool *polylineObjectsTool = new CreatePolylineObjectTool(this);;
QToolBar *toolBar = new QToolBar(this);
toolBar->setObjectName(QLatin1String("TileCollisionDockToolBar"));
toolBar->setMovable(false);
toolBar->setFloatable(false);
toolBar->setContextMenuPolicy(Qt::ActionsContextMenu);
mToolManager = new ToolManager(this);
toolBar->addAction(mToolManager->registerTool(new ObjectSelectionTool(this)));
toolBar->addAction(mToolManager->registerTool(new EditPolygonTool(this)));
toolBar->addAction(mToolManager->registerTool(rectangleObjectsTool));
toolBar->addAction(mToolManager->registerTool(ellipseObjectsTool));
toolBar->addAction(mToolManager->registerTool(polygonObjectsTool));
toolBar->addAction(mToolManager->registerTool(polylineObjectsTool));
auto widget = new QWidget(this);
auto vertical = new QVBoxLayout(widget);
vertical->setSpacing(0);
vertical->setMargin(0);
auto horizontal = new QHBoxLayout();
horizontal->addWidget(toolBar, 1);
vertical->addLayout(horizontal);
vertical->addWidget(mMapView);
setWidget(widget);
mMapScene->setSelectedTool(mToolManager->selectedTool());
connect(mToolManager, &ToolManager::selectedToolChanged,
this, &TileCollisionDock::setSelectedTool);
connect(mToolManager, &ToolManager::statusInfoChanged,
this, &TileCollisionDock::statusInfoChanged);
QComboBox *zoomComboBox = new QComboBox;
horizontal->addWidget(zoomComboBox);
Zoomable *zoomable = mMapView->zoomable();
zoomable->setComboBox(zoomComboBox);
retranslateUi();
}
示例5: createGui
void MainWindow::createGui()
{
// Menus
fileMenu = menuBar()->addMenu(tr("Файл"));
fileMenu->addAction(action_file_newdatabase);
fileMenu->addAction(action_file_open);
fileMenu->addSeparator();
fileMenu->addAction(action_file_save);
fileMenu->addAction(action_file_saveas);
fileMenu->addAction(action_file_export);
fileMenu->addSeparator();
fileMenu->addAction(action_file_properties);
fileMenu->addAction(action_file_print);
fileMenu->addSeparator();
fileMenu->addAction(action_file_exit);
editMenu = menuBar()->addMenu(tr("Правка"));
editMenu->addAction(action_edit_undo);
editMenu->addAction(action_edit_redo);
editMenu->addSeparator();
editMenu->addAction(action_edit_cut);
editMenu->addAction(action_edit_copy);
editMenu->addAction(action_edit_paste);
editMenu->addSeparator();
editMenu->addAction(action_edit_find);
editMenu->addAction(action_edit_selectall);
editMenu->addSeparator();
editMenu->addAction(action_edit_delete);
viewMenu = menuBar()->addMenu(tr("Вид"));
viewMenu->addAction(action_view_tree);
taskMenu = menuBar()->addMenu(tr("Инструменты"));
taskMenu->addAction(action_task_info);
taskMenu->addAction(action_task_calendar);
taskMenu->addAction(action_task_strat);
taskMenu->addAction(action_task_plan);
taskMenu->addAction(action_task_artifact);
taskMenu->addSeparator();
taskMenu->addAction(action_task_settings);
helpMenu = menuBar()->addMenu(tr("Справка"));
helpMenu->addAction(action_help_activation);
helpMenu->addSeparator();
helpMenu->addAction(action_help_about);
// Tool Bar
QToolBar *toolBar = new QToolBar;
toolBar->addActions(actions_toolbar);
addToolBar(Qt::TopToolBarArea, toolBar);
toolBar->setContextMenuPolicy(Qt::PreventContextMenu);
// Status Bar
statusBar()->showMessage(tr(" "));
// Central widget
centralWidget = new CentralWidget(this);
QWidget *w = new QWidget;
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(centralWidget);
//mainLayout->addWidget(console);
w->setLayout(mainLayout);
setCentralWidget(w);
// ObjectsTree dock
dock = new QDockWidget(this);
objectsTree = new ArchObjectsTree;
objectsTree->setupActions(actions_tasks);
dock->setWidget(objectsTree);
addDockWidget(Qt::LeftDockWidgetArea, dock);
dock->setWindowTitle(tr("Дерево объектов"));
// MainWindow
setWindowIcon(QIcon(":/images/logo.png"));
}
示例6: QMainWindow
Window::Window(QWidget* parent) :
QMainWindow(parent)
{
setObjectName("ChatWindow");
Settings::getInstance().load();
connect(&Settings::getInstance(), &Settings::dataChanged, this, &Window::applySettings);
QToolBar* toolbar = new QToolBar(this);
toolbar->setIconSize(QSize(24, 24));
toolbar->setFloatable(false);
toolbar->setContextMenuPolicy(Qt::PreventContextMenu);
addToolBar(toolbar);
//QAction* refreshAction = toolbar->addAction(QIcon(":/icons/refresh.png"), "refresh");
//connect(refreshAction, SIGNAL(triggered()), this, SLOT(refreshPlanets()));
QDockWidget* inputDock = new QDockWidget(this);
inputDock->setObjectName("Input dock");
inputDock->setFeatures(QDockWidget::NoDockWidgetFeatures);
inputDock->setTitleBarWidget(new QWidget(inputDock));
inputDock->setContextMenuPolicy(Qt::PreventContextMenu);
addDockWidget(Qt::BottomDockWidgetArea, inputDock);
QWidget* inputDockWidget = new QWidget(inputDock);
QHBoxLayout* inputDockWidgetLayout = new QHBoxLayout(inputDockWidget);
nickLabel = new QLabel(inputDockWidget);
nickLabel->hide();
inputLine = new QLineEdit(inputDockWidget);
connect(inputLine, &QLineEdit::returnPressed, this, &Window::sendMessage);
inputDockWidgetLayout->addWidget(nickLabel);
inputDockWidgetLayout->addWidget(inputLine);
inputDockWidgetLayout->setContentsMargins(2, 2, 2, 6);
inputDockWidget->setLayout(inputDockWidgetLayout);
inputDock->setFixedHeight(inputDock->height());
inputDock->setWidget(inputDockWidget);
QDockWidget* tabDock = new QDockWidget(this);
tabDock->setObjectName("Tab dock");
tabDock->setFeatures(QDockWidget::NoDockWidgetFeatures);
tabDock->setTitleBarWidget(new QWidget(tabDock));
tabDock->setContextMenuPolicy(Qt::PreventContextMenu);
addDockWidget(Qt::LeftDockWidgetArea, tabDock);
setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
tabTree = new TabTree(tabDock, 100);
tabTree->setHeaderLabel("Chats");
tabTree->setIndentation(8);
tabTree->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
tabTree->setMinimumWidth(1);
tabTree->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
tabDock->setWidget(tabTree);
tabTree->setContextMenuPolicy(Qt::CustomContextMenu);
connect(tabTree, &QTreeWidget::itemSelectionChanged, this, &Window::tabSelected);
connect(tabTree, &QTreeWidget::customContextMenuRequested, this, &Window::showTabTreeContextMenu);
QAction* connectAction = new QAction(QIcon(":/icons/connect.png"), "Connect", toolbar);
QAction* disconnectAction = new QAction(QIcon(":/icons/disconnect.png"), "Disconnect", toolbar);
QAction* settingsAction = toolbar->addAction(QIcon(":/icons/settings.png"), "Settings");
connect(connectAction, &QAction::triggered, this, &Window::connectToServer);
connect(disconnectAction, &QAction::triggered, this, &Window::disconnectFromServer);
connect(settingsAction, &QAction::triggered, this, &Window::showSettingsDialog);
toolbar->addActions(QList<QAction*>() << connectAction << disconnectAction << settingsAction);
serverTab = new QTreeWidgetItem(tabTree, QStringList() << "IRC Server");
tabTree->addTopLevelItem(serverTab);
userDock = new QDockWidget(this);
userDock->setObjectName("User dock");
userDock->setFeatures(QDockWidget::NoDockWidgetFeatures);
userDock->setTitleBarWidget(new QWidget(userDock));
userDock->setContextMenuPolicy(Qt::PreventContextMenu);
addDockWidget(Qt::RightDockWidgetArea, userDock);
setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
userTree = new UserTree(userDock, 100);
userTree->setItemsExpandable(false);
userTree->setIndentation(8);
userTree->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
userTree->setMinimumWidth(1);
userTree->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
userDock->setWidget(userTree);
connect(userTree, &UserTree::privateActionTriggered, this, &Window::startPrivate);
topicDock = new QDockWidget(this);
topicDock->setObjectName("Topic dock");
topicDock->setFeatures(QDockWidget::NoDockWidgetFeatures);
topicDock->setTitleBarWidget(new QWidget(topicDock));
topicDock->setContextMenuPolicy(Qt::PreventContextMenu);
addDockWidget(Qt::TopDockWidgetArea, topicDock);
topicLine = new TopicLabel(topicDock);
topicDock->setWidget(topicLine);
QMainWindow* pagesWindow = new QMainWindow(0);
pages = new QStackedWidget(pagesWindow);
serverPage = new ServerPage(serverTab, tabTree);
connect(serverPage, &ServerPage::connectActionTriggered, this, &Window::connectToServer);
connect(serverPage, &ServerPage::disconnectActionTriggered, this, &Window::disconnectFromServer);
//.........这里部分代码省略.........
示例7: key
MainUI::MainUI(bool debugmode) : QMainWindow(){
//Setup UI
DEBUG = debugmode;
AUTHCOMPLETE = false; //not performed yet
this->setWindowTitle(tr("AppCafe"));
//Need 1024 wide if possible
this->resize(1024,600);
this->setWindowIcon( QIcon(":icons/appcafe.png") );
if(this->centralWidget()==0){ this->setCentralWidget( new QWidget(this) ); }
this->centralWidget()->setLayout( new QVBoxLayout() );
this->centralWidget()->layout()->setContentsMargins(0,0,0,0);
this->setStatusBar(new QStatusBar());
//Setup the ToolBar
QToolBar *tb = this->addToolBar("");
tb->setMovable(false);
tb->setFloatable(false);
tb->setContextMenuPolicy(Qt::CustomContextMenu); //disable the built-in visibility context menu
backA = tb->addAction(QIcon(":icons/back.png"), tr("Back"), this, SLOT(GoBack()) );
forA = tb->addAction(QIcon(":icons/forward.png"), tr("Forward"), this, SLOT(GoForward()) );
refA = tb->addAction(QIcon(":icons/refresh.png"), tr("Refresh"), this, SLOT(GoRefresh()) );
stopA = tb->addAction(QIcon(":icons/stop.png"), tr("Stop"), this, SLOT(GoStop()) );
// - toolbar spacer
QWidget *spacer = new QWidget(this);
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
tb->addWidget(spacer);
// - Progress bar
progressBar = new QProgressBar(this);
progressBar->setRange(0,100);
progA = tb->addWidget(progressBar); //add it to the end of the toolbar
progA->setVisible(false); //start off invisible
// - List Button
listB = new QToolButton(this);
listB->setIcon( QIcon(":icons/list.png") );
listB->setToolTip( tr("AppCafe Options") );
listB->setStyleSheet( "QToolButton::menu-indicator{ image: none; }" );
listB->setPopupMode(QToolButton::InstantPopup);
tb->addWidget(listB);
//Setup the menu for this button
listMenu = new QMenu();
listMenu->addAction(QIcon(":icons/configure.png"), tr("Configure"), this, SLOT(GoConfigure() ) );
listMenu->addAction(QIcon(":icons/list.png"), tr("Save Pkg List"), this, SLOT(Save_pkglist() ) );
listMenu->addSeparator();
listMenu->addAction(QIcon(":icons/search.png"), tr("Search For Text"), this, SLOT(openSearch() ) );
listMenu->addSeparator();
listMenu->addAction(QIcon(":icons/close.png"), tr("Close AppCafe"), this, SLOT(GoClose() ) );
listB->setMenu(listMenu);
//Setup the search options
group_search = new QFrame(this);
group_search->setLayout( new QHBoxLayout() );
group_search->layout()->setContentsMargins(2,2,2,2);
line_search = new QLineEdit(this);
group_search->layout()->addWidget(line_search);
tool_search = new QToolButton(this);
group_search->layout()->addWidget(tool_search);
tool_search->setIcon( QIcon(":icons/search.png") );
group_search->layout()->addItem(new QSpacerItem(0,0,QSizePolicy::Expanding, QSizePolicy::Minimum) );
//Setup the Main Interface
webview = new QWebView(this);
this->centralWidget()->layout()->addWidget(webview);
if(webview->page()==0){ webview->setPage(new QWebPage(webview)); }
webview->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
this->centralWidget()->layout()->addWidget(group_search);
//Make sure the search bar is hidden to start with
group_search->setVisible(false);
//Create the special keyboard shortcuts
QKeySequence key(QKeySequence::Find);
ctrlF = new QShortcut( key, this );
key = QKeySequence(Qt::Key_Escape);
esc = new QShortcut( key, this );
//Connect signals/slots
connect(webview, SIGNAL(linkClicked(const QUrl&)), this, SLOT(LinkClicked(const QUrl&)) );
connect(webview, SIGNAL(loadStarted()), this, SLOT(PageStartLoading()) );
connect(webview, SIGNAL(loadProgress(int)), this, SLOT(PageLoadProgress(int)) );
connect(webview, SIGNAL(loadFinished(bool)), this, SLOT(PageDoneLoading(bool)) );
connect(webview->page()->networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)), this, SLOT( authenticate(QNetworkReply*) ) );
connect(tool_search, SIGNAL(clicked()), this, SLOT(GoSearch()) );
connect(line_search, SIGNAL(returnPressed()), this, SLOT(GoSearch()) );
connect(ctrlF, SIGNAL(activated()), this, SLOT(openSearch()) );
connect(esc, SIGNAL(activated()), this, SLOT(closeSearch()) );
if(DEBUG){
//connect(webview, SIGNAL(statusBarMessage(const QString&)), this, SLOT(StatusTextChanged(const QString&)) );
connect(webview->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)), this, SLOT(StatusTextChanged(const QString&)) );
}
this->statusBar()->setVisible(DEBUG);
loadHomePage();
webview->show();
}
示例8: QMainWindow
Window::Window(QWidget* parent):
QMainWindow(parent)
{
setObjectName("PlanetScannerWindow");
QToolBar* toolbar = new QToolBar(this);
toolbar->setIconSize(QSize(24, 24));
toolbar->setFloatable(false);
toolbar->setContextMenuPolicy(Qt::PreventContextMenu);
addToolBar(toolbar);
QAction* refreshAction = toolbar->addAction(QIcon(":/icons/refresh.png"), "Refresh");
connect(refreshAction, SIGNAL(triggered()), this, SLOT(refreshPlanets()));
QAction* settingsAction = toolbar->addAction(QIcon(":/icons/settings.png"), "Settings");
connect(settingsAction, SIGNAL(triggered()), this, SLOT(showSettingsDialog()));
planetTreeView = new QTreeView(this);
planetTreeView->setMinimumHeight(10);
planetTreeModel = new PlanetTreeModel(planetTreeView);
planetTreeProxyModel = new PlanetTreeSortFilterProxyModel(planetTreeModel);
planetTreeProxyModel->setSourceModel(planetTreeModel);
planetTreeView->setModel(planetTreeProxyModel);
planetTreeModel->setHorizontalHeaderLabels(QStringList() << "Hostname" << "Map" << "Gametype" << "Players" << "Address");
planetTreeView->setSortingEnabled(true);
planetTreeView->sortByColumn(0, Qt::AscendingOrder);
planetTreeView->setContextMenuPolicy(Qt::CustomContextMenu);
planetTreeView->setSelectionMode(QAbstractItemView::SingleSelection);
connect(planetTreeView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
QAction* connectAction = new QAction("Connect", planetTreeView);
QAction* connectAsSpectatorAction = new QAction("Connect as spectator", planetTreeView);
QAction* copyAction = new QAction("Copy", planetTreeView);
QAction* openProfileAction = new QAction("Open profile in a browser", planetTreeView);
connect(connectAction, SIGNAL(triggered()), this, SLOT(connectSelected()));
connect(connectAsSpectatorAction, SIGNAL(triggered()), this, SLOT(connectAsSpectatorSelected()));
connect(copyAction, SIGNAL(triggered()), this, SLOT(copySelected()));
connect(openProfileAction, &QAction::triggered, this, &Window::openProfileSelected);
gameContextMenu = new QMenu(planetTreeView);
planetContextMenu = new QMenu(planetTreeView);
registeredPlayerContextMenu = new QMenu(planetTreeView);
unregisteredPlayerContextMenu = new QMenu(planetTreeView);
gameContextMenu->addActions(QList<QAction*>() << connectAction << connectAsSpectatorAction << copyAction);
planetContextMenu->addActions(QList<QAction*>() << copyAction);
registeredPlayerContextMenu->addActions(QList<QAction*>() << openProfileAction << copyAction);
unregisteredPlayerContextMenu->addActions(QList<QAction*>() << copyAction);
setCentralWidget(planetTreeView);
game = new QProcess(this);
statistics = new StatisticsWebSite(this);
connect(statistics, &StatisticsWebSite::playersInfoRecieved, this, &Window::processStatisticsPlayers);
autoRefreshTimer = new QTimer(this);
connect(autoRefreshTimer, SIGNAL(timeout()), this, SLOT(refreshPlanets()));
contextMenuShown = false;
Settings& settings = Settings::getInstance();
connect(&settings, &Settings::dataChanged, this, &Window::applyChangedSettings);
settings.load();
applyChangedSettings();
::Settings::loadWindow(this);
refreshPlanets();
}