Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Refactor|Client: GuiWidget is derived from QObject
All widgets will benefit from signals and slots.
  • Loading branch information
skyjake committed Jun 9, 2013
1 parent 3c9e6c0 commit 17faacf
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion doomsday/client/include/ui/widgets/consolecommandwidget.h
Expand Up @@ -30,7 +30,7 @@
*
* @ingroup gui
*/
class ConsoleCommandWidget : public QObject, public LineEditWidget
class ConsoleCommandWidget : public LineEditWidget
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/ui/widgets/consolewidget.h
Expand Up @@ -34,7 +34,7 @@
*
* @ingroup gui
*/
class ConsoleWidget : public QObject, public GuiWidget
class ConsoleWidget : public GuiWidget
{
Q_OBJECT

Expand Down
7 changes: 5 additions & 2 deletions doomsday/client/include/ui/widgets/guiwidget.h
Expand Up @@ -22,6 +22,7 @@
#include <de/Widget>
#include <de/RuleRectangle>
#include <de/GLBuffer>
#include <QObject>

#include "ui/style.h"

Expand Down Expand Up @@ -51,7 +52,7 @@ class GuiRootWidget;
* definition identifier (e.g., "editor.hint"). These style elements are then
* conveniently accessible using methods of GuiWidget.
*
* - Opacity properity. Opacities respect the hierarchical organization of
* - Opacity property. Opacities respect the hierarchical organization of
* widgets: GuiWidget::visibleOpacity() returns the opacity of a particular
* widget where all the parent widgets' opacities are factored in.
*
Expand All @@ -63,9 +64,11 @@ class GuiRootWidget;
* - Logic for handling more complicated interactions such as a mouse pointer
* click (press then release inside or outside).
*
* QObject is a base class for the signals and slots capabilities.
*
* @ingroup gui
*/
class GuiWidget : public de::Widget
class GuiWidget : public QObject, public de::Widget
{
public:
/**
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/ui/widgets/logwidget.h
Expand Up @@ -30,7 +30,7 @@
*
* @ingroup gui
*/
class LogWidget : public QObject, public GuiWidget
class LogWidget : public GuiWidget
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/ui/widgets/taskbarwidget.h
Expand Up @@ -30,7 +30,7 @@
*
* @ingroup gui
*/
class TaskBarWidget : public QObject, public GuiWidget
class TaskBarWidget : public GuiWidget
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/ui/widgets/guiwidget.cpp
Expand Up @@ -144,7 +144,7 @@ float GuiWidget::opacity() const
float GuiWidget::visibleOpacity() const
{
float opacity = d->opacity;
for(Widget *i = parent(); i != 0; i = i->parent())
for(Widget *i = Widget::parent(); i != 0; i = i->parent())
{
GuiWidget *w = dynamic_cast<GuiWidget *>(i);
if(w)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libshell/include/de/shell/textwidget.h
Expand Up @@ -42,7 +42,7 @@ class Action;
* It is assumed that the root widget under which text widgets are used is
* derived from TextRootWidget.
*
* QObject is a base class for signals and slots.
* QObject is a base class for the signals and slots capabilities.
*/
class LIBSHELL_PUBLIC TextWidget : public QObject, public Widget
{
Expand Down

0 comments on commit 17faacf

Please sign in to comment.