mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Remove MainWindow ui form
This commit is contained in:
parent
e5ef84617c
commit
a568d60cef
4 changed files with 12 additions and 56 deletions
|
@ -150,7 +150,6 @@ include_directories(include/events/messages)
|
|||
|
||||
qt5_wrap_ui (UI_HEADERS
|
||||
forms/ChatPage.ui
|
||||
forms/MainWindow.ui
|
||||
forms/RoomList.ui
|
||||
)
|
||||
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1066</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>950</width>
|
||||
<height>600</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Open Sans</family>
|
||||
<stylestrategy>PreferAntialias</stylestrategy>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true"> nheko </string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: #f9f9f9</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget"/>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -30,11 +30,6 @@
|
|||
#include "SlidingStackWidget.h"
|
||||
#include "WelcomePage.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -59,9 +54,6 @@ private slots:
|
|||
void removeOverlayProgressBar();
|
||||
|
||||
private:
|
||||
// The UI component of the main window.
|
||||
Ui::MainWindow *ui_;
|
||||
|
||||
// The initial welcome screen.
|
||||
WelcomePage *welcome_page_;
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
|
||||
#include "MainWindow.h"
|
||||
#include "ui_MainWindow.h"
|
||||
|
||||
#include <QLayout>
|
||||
#include <QNetworkReply>
|
||||
|
@ -24,15 +23,24 @@
|
|||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui_(new Ui::MainWindow)
|
||||
, progress_modal_{nullptr}
|
||||
, spinner_{nullptr}
|
||||
{
|
||||
ui_->setupUi(this);
|
||||
QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||
setSizePolicy(sizePolicy);
|
||||
setWindowTitle("nheko");
|
||||
|
||||
resize(1066, 600); // 16:9 ratio
|
||||
setMinimumSize(QSize(950, 600));
|
||||
setStyleSheet("background-color: #f9f9f9");
|
||||
|
||||
QFont font("Open Sans", 12);
|
||||
font.setStyleStrategy(QFont::PreferAntialias);
|
||||
setFont(font);
|
||||
|
||||
client_ = QSharedPointer<MatrixClient>(new MatrixClient("matrix.org"));
|
||||
|
||||
welcome_page_ = new WelcomePage(this);
|
||||
|
||||
login_page_ = new LoginPage(client_, this);
|
||||
register_page_ = new RegisterPage(client_, this);
|
||||
chat_page_ = new ChatPage(client_, this);
|
||||
|
@ -153,5 +161,4 @@ void MainWindow::showRegisterPage()
|
|||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui_;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue