From fe27f8eab8ff3787969e8e9a9c2e11b3c1698ada Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 6 Jun 2014 17:32:32 +0200 Subject: [PATCH] Use ui file for main window. --- src/calamares/CMakeLists.txt | 2 +- src/calamares/CalamaresWindow.cpp | 25 +++++++++++++++++++ src/calamares/CalamaresWindow.h | 10 ++++++-- src/calamares/{base.ui => CalamaresWindow.ui} | 0 4 files changed, 34 insertions(+), 3 deletions(-) rename src/calamares/{base.ui => CalamaresWindow.ui} (100%) diff --git a/src/calamares/CMakeLists.txt b/src/calamares/CMakeLists.txt index beae830bf..4af1b170f 100644 --- a/src/calamares/CMakeLists.txt +++ b/src/calamares/CMakeLists.txt @@ -11,7 +11,7 @@ set( calamaresSources ) set( calamaresUi - #ui files go here + CalamaresWindow.ui ) include_directories( diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index e69de29bb..ec410d28e 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -0,0 +1,25 @@ +/* === This file is part of Calamares - === + * + * Copyright 2014, Teo Mrnjavac + * + * Calamares is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Calamares is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Calamares. If not, see . + */ + +#include "CalamaresWindow.h" + +CalamaresWindow::CalamaresWindow( QWidget* parent ) + : QWidget( parent ) +{ + setupUi( this ); +} diff --git a/src/calamares/CalamaresWindow.h b/src/calamares/CalamaresWindow.h index d7c2cc63d..7fa297416 100644 --- a/src/calamares/CalamaresWindow.h +++ b/src/calamares/CalamaresWindow.h @@ -19,10 +19,16 @@ #ifndef CALAMARESWINDOW_H #define CALAMARESWINDOW_H -#include +#include "ui_CalamaresWindow.h" -class CalamaresWindow : public QMainWindow +#include + +class CalamaresWindow : public QWidget, private Ui::Base { + Q_OBJECT +public: + CalamaresWindow( QWidget* parent = 0 ); + virtual ~CalamaresWindow() {} }; diff --git a/src/calamares/base.ui b/src/calamares/CalamaresWindow.ui similarity index 100% rename from src/calamares/base.ui rename to src/calamares/CalamaresWindow.ui