-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_window.h
48 lines (39 loc) · 1001 Bytes
/
main_window.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* (C) Copyright 2014, MongoDB, Inc. */
#pragma once
#include <QAction>
#include <QMainWindow>
#include <QMenu>
#include <QTimer>
#include "ui_main_window.h"
class TestClusterModel;
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget* parent = nullptr);
protected:
virtual void closeEvent(QCloseEvent* event);
private:
void waitForAllStopped();
bool promptToSave();
bool promptToStopAll();
private slots:
void newCluster();
void openCluster();
void saveCluster();
void saveClusterAs();
void startAllHosts();
void stopAllHosts();
void addHost();
void doHostContextMenu(const QPoint& pos);
void hostDoubleClicked(const QModelIndex& index);
void updateHosts();
private:
Ui::MainWindow _ui;
TestClusterModel* _model;
QMenu* _hostContextMenu;
QAction* _startHostAction;
QAction* _stopHostAction;
QAction* _openMongoShellAction;
QAction* _removeAction;
QTimer* _updateTimer;
};