1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 07:49:56 +00:00
openmw-tes3mp/apps/opencs/view/doc/startup.cpp

28 lines
808 B
C++
Raw Normal View History

2013-02-02 15:14:58 +00:00
#include "startup.hpp"
2013-05-08 01:33:42 +00:00
#include <QApplication>
#include <QDesktopWidget>
2013-02-02 15:14:58 +00:00
#include <QPushButton>
#include <QHBoxLayout>
2013-05-08 01:33:42 +00:00
#include <QRect>
2013-02-02 15:14:58 +00:00
CSVDoc::StartupDialogue::StartupDialogue()
{
QHBoxLayout *layout = new QHBoxLayout (this);
QPushButton *createDocument = new QPushButton ("new", this);
connect (createDocument, SIGNAL (clicked()), this, SIGNAL (createDocument()));
layout->addWidget (createDocument);
QPushButton *loadDocument = new QPushButton ("load", this);
connect (loadDocument, SIGNAL (clicked()), this, SIGNAL (loadDocument()));
layout->addWidget (loadDocument);
setLayout (layout);
2013-05-08 01:33:42 +00:00
QRect scr = QApplication::desktop()->screenGeometry();
QRect rect = geometry();
move (scr.center().x() - rect.center().x(), scr.center().y() - rect.center().y());
}