From 3625818283b4839fb9dd1c299b30cf5922f63f40 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 30 Aug 2014 16:21:25 +0200 Subject: [PATCH] Fixed: EOL --- .../src/plugins/georges_editor/actions.h | 94 +++++++-------- .../src/plugins/georges_editor/browser_ctrl.h | 94 +++++++-------- .../plugins/georges_editor/browser_ctrl_pvt.h | 108 +++++++++--------- .../src/plugins/gui_editor/action_list.cpp | 98 ++++++++-------- .../src/plugins/gui_editor/action_list.h | 58 +++++----- 5 files changed, 226 insertions(+), 226 deletions(-) diff --git a/code/studio/src/plugins/georges_editor/actions.h b/code/studio/src/plugins/georges_editor/actions.h index 0c57b0577..861eaef8e 100644 --- a/code/studio/src/plugins/georges_editor/actions.h +++ b/code/studio/src/plugins/georges_editor/actions.h @@ -1,48 +1,48 @@ -// Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 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 Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -#ifndef ACTIONS_H -#define ACTIONS_H - -#include -#include - -namespace GeorgesQt -{ - class CFormItem; - class CGeorgesFormModel; - - class CUndoFormArrayRenameCommand : public QUndoCommand - { - public: - CUndoFormArrayRenameCommand(CGeorgesFormModel *model, CFormItem *item, const QVariant &value, QUndoCommand *parent = 0); - ~CUndoFormArrayRenameCommand() {} - - void redo(); - void undo(); - - void update(bool redo); - - protected: - CFormItem *m_item; - CGeorgesFormModel *m_model; - - QString m_newValue; - QString m_oldValue; - }; -} - +// Object Viewer Qt - Georges Editor Plugin - MMORPG Framework +// Copyright (C) 2011 Adrian Jaekel +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef ACTIONS_H +#define ACTIONS_H + +#include +#include + +namespace GeorgesQt +{ + class CFormItem; + class CGeorgesFormModel; + + class CUndoFormArrayRenameCommand : public QUndoCommand + { + public: + CUndoFormArrayRenameCommand(CGeorgesFormModel *model, CFormItem *item, const QVariant &value, QUndoCommand *parent = 0); + ~CUndoFormArrayRenameCommand() {} + + void redo(); + void undo(); + + void update(bool redo); + + protected: + CFormItem *m_item; + CGeorgesFormModel *m_model; + + QString m_newValue; + QString m_oldValue; + }; +} + #endif // ACTIONS_H \ No newline at end of file diff --git a/code/studio/src/plugins/georges_editor/browser_ctrl.h b/code/studio/src/plugins/georges_editor/browser_ctrl.h index 9c70f51bb..d61d3b9e9 100644 --- a/code/studio/src/plugins/georges_editor/browser_ctrl.h +++ b/code/studio/src/plugins/georges_editor/browser_ctrl.h @@ -1,47 +1,47 @@ -#ifndef BROWSER_CTRL_H -#define BROWSER_CTRL_H - -#include - -namespace NLGEORGES -{ - class UForm; -} - -class QtTreePropertyBrowser; -class QModelIndex; -class QVariant; -class QtProperty; - -class BrowserCtrlPvt; - -class BrowserCtrl : public QObject -{ - Q_OBJECT -public: - BrowserCtrl( QtTreePropertyBrowser *browser ); - ~BrowserCtrl(); - void setForm( NLGEORGES::UForm *form ){ m_form = form; } - -public Q_SLOTS: - void clicked( const QModelIndex &idx ); - -Q_SIGNALS: - void arrayResized( const QString &name, int size ); - void modified(); - -private Q_SLOTS: - void onValueChanged( QtProperty *p, const QVariant &value ); - void onArrayResized( const QString &name, int size ); - void onModified(); - -private: - void enableMgrConnections(); - void disableMgrConnections(); - - - BrowserCtrlPvt *m_pvt; - NLGEORGES::UForm *m_form; -}; - -#endif +#ifndef BROWSER_CTRL_H +#define BROWSER_CTRL_H + +#include + +namespace NLGEORGES +{ + class UForm; +} + +class QtTreePropertyBrowser; +class QModelIndex; +class QVariant; +class QtProperty; + +class BrowserCtrlPvt; + +class BrowserCtrl : public QObject +{ + Q_OBJECT +public: + BrowserCtrl( QtTreePropertyBrowser *browser ); + ~BrowserCtrl(); + void setForm( NLGEORGES::UForm *form ){ m_form = form; } + +public Q_SLOTS: + void clicked( const QModelIndex &idx ); + +Q_SIGNALS: + void arrayResized( const QString &name, int size ); + void modified(); + +private Q_SLOTS: + void onValueChanged( QtProperty *p, const QVariant &value ); + void onArrayResized( const QString &name, int size ); + void onModified(); + +private: + void enableMgrConnections(); + void disableMgrConnections(); + + + BrowserCtrlPvt *m_pvt; + NLGEORGES::UForm *m_form; +}; + +#endif diff --git a/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h b/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h index 0d0363c1f..c34d5ce0c 100644 --- a/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h +++ b/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h @@ -1,54 +1,54 @@ -#ifndef BROWSER_CTRL_PVT_H -#define BROWSER_CTRL_PVT_H - -#include - -namespace NLGEORGES -{ - class CFormElm; - class UFormElm; - class CFormElmStruct; -} - -class QtVariantPropertyManager; -class QtVariantEditorFactory; -class QtTreePropertyBrowser; -class QVariant; -class QtProperty; - -class BrowserCtrlPvt : public QObject -{ - Q_OBJECT -public: - BrowserCtrlPvt( QObject *parent = NULL ); - ~BrowserCtrlPvt(); - - void clear(); - void setupNode( NLGEORGES::UFormElm *node ); - void onValueChanged( QtProperty *p, const QVariant &value ); - - QtVariantPropertyManager* manager() const{ return mgr; } - void setRootNode( NLGEORGES::CFormElm *root ){ m_rootNode = root; } - void setBrowser( QtTreePropertyBrowser *browser ){ m_browser = browser; } - -Q_SIGNALS: - void arrayResized( const QString &name, int size ); - void modified(); - -private: - void setupStruct( NLGEORGES::UFormElm *node ); - void setupArray( NLGEORGES::UFormElm *node ); - void setupAtom( NLGEORGES::CFormElmStruct::CFormElmStructElm &elm ); - - void onStructValueChanged( QtProperty *p, const QVariant &value ); - void onArrayValueChanged( QtProperty *p, const QVariant &value ); - - QtVariantPropertyManager *mgr; - QtVariantEditorFactory *factory; - QtTreePropertyBrowser *m_browser; - - NLGEORGES::UFormElm *m_currentNode; - NLGEORGES::CFormElm *m_rootNode; -}; - -#endif +#ifndef BROWSER_CTRL_PVT_H +#define BROWSER_CTRL_PVT_H + +#include + +namespace NLGEORGES +{ + class CFormElm; + class UFormElm; + class CFormElmStruct; +} + +class QtVariantPropertyManager; +class QtVariantEditorFactory; +class QtTreePropertyBrowser; +class QVariant; +class QtProperty; + +class BrowserCtrlPvt : public QObject +{ + Q_OBJECT +public: + BrowserCtrlPvt( QObject *parent = NULL ); + ~BrowserCtrlPvt(); + + void clear(); + void setupNode( NLGEORGES::UFormElm *node ); + void onValueChanged( QtProperty *p, const QVariant &value ); + + QtVariantPropertyManager* manager() const{ return mgr; } + void setRootNode( NLGEORGES::CFormElm *root ){ m_rootNode = root; } + void setBrowser( QtTreePropertyBrowser *browser ){ m_browser = browser; } + +Q_SIGNALS: + void arrayResized( const QString &name, int size ); + void modified(); + +private: + void setupStruct( NLGEORGES::UFormElm *node ); + void setupArray( NLGEORGES::UFormElm *node ); + void setupAtom( NLGEORGES::CFormElmStruct::CFormElmStructElm &elm ); + + void onStructValueChanged( QtProperty *p, const QVariant &value ); + void onArrayValueChanged( QtProperty *p, const QVariant &value ); + + QtVariantPropertyManager *mgr; + QtVariantEditorFactory *factory; + QtTreePropertyBrowser *m_browser; + + NLGEORGES::UFormElm *m_currentNode; + NLGEORGES::CFormElm *m_rootNode; +}; + +#endif diff --git a/code/studio/src/plugins/gui_editor/action_list.cpp b/code/studio/src/plugins/gui_editor/action_list.cpp index 8925e6d04..4cc30aecb 100644 --- a/code/studio/src/plugins/gui_editor/action_list.cpp +++ b/code/studio/src/plugins/gui_editor/action_list.cpp @@ -1,49 +1,49 @@ -#include "action_list.h" -#include "nel/gui/action_handler.h" -#include -#include - -ActionList::ActionList( QDialog *parent ) : -QDialog( parent ) -{ - setupUi( this ); -} - -ActionList::~ActionList() -{ -} - -void ActionList::load() -{ - actionList->clear(); - - NLGUI::CAHManager *am = NLGUI::CAHManager::getInstance(); - std::vector< std::string > handlers; - am->getActionHandlers( handlers ); - - std::vector< std::string >::const_iterator itr = handlers.begin(); - while( itr != handlers.end() ) - { - actionList->addItem( itr->c_str() ); - ++itr; - } -} - -void ActionList::accept() -{ - QListWidgetItem *item = actionList->currentItem(); - if( item == NULL ) - return; - - selectedAction = item->text(); - - QDialog::accept(); -} - -void ActionList::reject() -{ - selectedAction = ""; - - QDialog::reject(); -} - +#include "action_list.h" +#include "nel/gui/action_handler.h" +#include +#include + +ActionList::ActionList( QDialog *parent ) : +QDialog( parent ) +{ + setupUi( this ); +} + +ActionList::~ActionList() +{ +} + +void ActionList::load() +{ + actionList->clear(); + + NLGUI::CAHManager *am = NLGUI::CAHManager::getInstance(); + std::vector< std::string > handlers; + am->getActionHandlers( handlers ); + + std::vector< std::string >::const_iterator itr = handlers.begin(); + while( itr != handlers.end() ) + { + actionList->addItem( itr->c_str() ); + ++itr; + } +} + +void ActionList::accept() +{ + QListWidgetItem *item = actionList->currentItem(); + if( item == NULL ) + return; + + selectedAction = item->text(); + + QDialog::accept(); +} + +void ActionList::reject() +{ + selectedAction = ""; + + QDialog::reject(); +} + diff --git a/code/studio/src/plugins/gui_editor/action_list.h b/code/studio/src/plugins/gui_editor/action_list.h index 752d66467..f61e0d239 100644 --- a/code/studio/src/plugins/gui_editor/action_list.h +++ b/code/studio/src/plugins/gui_editor/action_list.h @@ -1,29 +1,29 @@ -#ifndef ACTION_LIST_H -#define ACTION_LIST_H - - -#include "ui_action_list.h" -#include - - -class ActionList : public QDialog, public Ui::ActionListDialog -{ - Q_OBJECT - -public: - ActionList( QDialog *parent = NULL ); - ~ActionList(); - void load(); - - QString getSelectedAction(){ return selectedAction; } - - -public Q_SLOTS: - void accept(); - void reject(); - -private: - QString selectedAction; -}; - -#endif +#ifndef ACTION_LIST_H +#define ACTION_LIST_H + + +#include "ui_action_list.h" +#include + + +class ActionList : public QDialog, public Ui::ActionListDialog +{ + Q_OBJECT + +public: + ActionList( QDialog *parent = NULL ); + ~ActionList(); + void load(); + + QString getSelectedAction(){ return selectedAction; } + + +public Q_SLOTS: + void accept(); + void reject(); + +private: + QString selectedAction; +}; + +#endif