Skip to content

Commit

Permalink
UI|Client: Renamed alignment.h to uidefs.h; added stub for ChoiceWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Aug 14, 2013
1 parent 5a994e2 commit 98134db
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 7 deletions.
8 changes: 5 additions & 3 deletions doomsday/client/client.pro
Expand Up @@ -340,14 +340,15 @@ DENG_HEADERS += \
include/ui/style.h \
include/ui/signalaction.h \
include/ui/sys_input.h \
include/ui/ui2_main.h \
include/ui/ui_main.h \
include/ui/ui_panel.h \
include/ui/widgets/alignment.h \
include/ui/ui2_main.h \
include/ui/uidefs.h \
include/ui/widgets/atlasproceduralimage.h \
include/ui/widgets/blurwidget.h \
include/ui/widgets/busywidget.h \
include/ui/widgets/buttonwidget.h \
include/ui/widgets/buttonwidget.h \
include/ui/widgets/choicewidget.h \
include/ui/widgets/consolecommandwidget.h \
include/ui/widgets/consolewidget.h \
include/ui/widgets/documentwidget.h \
Expand Down Expand Up @@ -652,6 +653,7 @@ SOURCES += \
src/ui/widgets/blurwidget.cpp \
src/ui/widgets/busywidget.cpp \
src/ui/widgets/buttonwidget.cpp \
src/ui/widgets/choicewidget.cpp \
src/ui/widgets/consolecommandwidget.cpp \
src/ui/widgets/consolewidget.cpp \
src/ui/widgets/documentwidget.cpp \
Expand Down
@@ -1,4 +1,4 @@
/** @file alignment.h Alignment flags.
/** @file uidefs.h Common ui namespace definitions.
*
* @authors Copyright (c) 2013 Jaakko Keränen <jaakko.keranen@iki.fi>
*
Expand All @@ -16,8 +16,8 @@
* http://www.gnu.org/licenses</small>
*/

#ifndef DENG_CLIENT_ALIGNMENT_H
#define DENG_CLIENT_ALIGNMENT_H
#ifndef DENG_CLIENT_UI_DEFS_H
#define DENG_CLIENT_UI_DEFS_H

#include <QFlags>

Expand Down Expand Up @@ -124,4 +124,4 @@ enum SizePolicy

} // namespace ui

#endif // DENG_CLIENT_ALIGNMENT_H
#endif // DENG_CLIENT_UI_DEFS_H
36 changes: 36 additions & 0 deletions doomsday/client/include/ui/widgets/choicewidget.h
@@ -0,0 +1,36 @@
/** @file choicewidget.h Widget for choosing from a set of alternatives.
*
* @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 DENG_CLIENT_CHOICEWIDGET_H
#define DENG_CLIENT_CHOICEWIDGET_H

#include "buttonwidget.h"

/**
* Widget for choosing an item from a set of alternatives.
*/
class ChoiceWidget : public ButtonWidget
{
public:
ChoiceWidget(de::String const &name = "");

private:
DENG2_PRIVATE(d)
};

#endif // DENG_CLIENT_CHOICEWIDGET_H
31 changes: 31 additions & 0 deletions doomsday/client/src/ui/widgets/choicewidget.cpp
@@ -0,0 +1,31 @@
/** @file choicewidget.cpp Widget for choosing from a set of alternatives.
*
* @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 "ui/widgets/choicewidget.h"
#include "ui/widgets/popupmenuwidget.h"

using namespace de;

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

ChoiceWidget::ChoiceWidget(String const &name) : ButtonWidget(name), d(new Instance(this))
{}

0 comments on commit 98134db

Please sign in to comment.