Skip to content

Commit

Permalink
libgui: Added Window base class, synced version with project version
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Apr 3, 2013
1 parent 0d935a5 commit 7c1ee4d
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 3 deletions.
1 change: 1 addition & 0 deletions doomsday/libgui/include/de/Window
@@ -0,0 +1 @@
#include "gui/window.h"
47 changes: 47 additions & 0 deletions doomsday/libgui/include/de/gui/window.h
@@ -0,0 +1,47 @@
/** @file window.h Top-level native window.
*
* @authors Copyright (c) 2013 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>This program 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 2 of the License, or (at your
* option) any later version. This program 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 this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#ifndef LIBGUI_WINDOW_H
#define LIBGUI_WINDOW_H

#include <QMainWindow>
#include <de/libdeng2.h>

#include "libgui.h"

namespace de {

/**
* Top-level native window.
*
* @ingroup gui
*/
class LIBGUI_PUBLIC Window : public QMainWindow
{
public:
Window();

// Events.

private:
DENG2_PRIVATE(d)
};

} // namespace de

#endif // LIBGUI_WINDOW_H
9 changes: 6 additions & 3 deletions doomsday/libgui/libgui.pro
Expand Up @@ -9,7 +9,7 @@ include(../config.pri)

TEMPLATE = lib
TARGET = deng_gui
VERSION = 0.1.0
VERSION = $$DENG_VERSION

CONFIG += deng_qtgui
include(../dep_deng2.pri)
Expand All @@ -26,13 +26,16 @@ INCLUDEPATH += include
# Public headers.
HEADERS += \
include/de/GuiApp \
include/de/Window \
\
include/de/gui/guiapp.h \
include/de/gui/libgui.h
include/de/gui/libgui.h \
include/de/gui/window.h

# Sources and private headers.
SOURCES += \
src/guiapp.cpp
src/guiapp.cpp \
src/window.cpp

# Installation ---------------------------------------------------------------

Expand Down
32 changes: 32 additions & 0 deletions doomsday/libgui/src/window.cpp
@@ -0,0 +1,32 @@
/** @file window.cpp Top-level native window.
*
* @authors Copyright (c) 2013 Jaakko Keränen <jaakko.keranen@iki.fi>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>This program 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 2 of the License, or (at your
* option) any later version. This program 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 this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#include "de/Window"

namespace de {

DENG2_PIMPL(Window)
{
Instance(Public *i) : Base(i)
{}
};

Window::Window() : d(new Instance(this))
{}

} // namespace de

0 comments on commit 7c1ee4d

Please sign in to comment.