parent
20835ab697
commit
95c54682b5
@ -1,74 +0,0 @@
|
|||||||
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
|
||||||
// Copyright (C) 2014 Jan BOON (jan.boon@kaetemi.be)
|
|
||||||
//
|
|
||||||
// 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#ifndef NLTOOLS_COMMAND_LOG_H
|
|
||||||
#define NLTOOLS_COMMAND_LOG_H
|
|
||||||
#include <nel/misc/types_nl.h>
|
|
||||||
|
|
||||||
// STL includes
|
|
||||||
|
|
||||||
// Qt includes
|
|
||||||
#include <QWidget>
|
|
||||||
#include <QTextEdit>
|
|
||||||
#include <QLineEdit>
|
|
||||||
|
|
||||||
// NeL includes
|
|
||||||
#include <nel/misc/log.h>
|
|
||||||
#include <nel/misc/displayer.h>
|
|
||||||
|
|
||||||
// Project includes
|
|
||||||
|
|
||||||
namespace NLTOOLS {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CCommandLog
|
|
||||||
* \brief CCommandLog
|
|
||||||
* \date 2010-02-05 20:27GMT
|
|
||||||
* \author Jan BOON (jan.boon@kaetemi.be)
|
|
||||||
*/
|
|
||||||
class CCommandLog : public QWidget, public NLMISC::IDisplayer
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
CCommandLog(QWidget *parent);
|
|
||||||
virtual ~CCommandLog();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void doDisplay(const NLMISC::CLog::TDisplayInfo& args, const char *message);
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void tSigDisplay(const QColor &c, const QString &text);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void returnPressed();
|
|
||||||
void tSlotDisplay(const QColor &c, const QString &text);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QTextEdit *m_DisplayerOutput;
|
|
||||||
QLineEdit *m_CommandInput;
|
|
||||||
|
|
||||||
private:
|
|
||||||
CCommandLog(const CCommandLog &);
|
|
||||||
CCommandLog &operator=(const CCommandLog &);
|
|
||||||
|
|
||||||
}; /* class CCommandLog */
|
|
||||||
|
|
||||||
} /* namespace NLTOOLS */
|
|
||||||
|
|
||||||
#endif /* #ifndef NLTOOLS_COMMAND_LOG_H */
|
|
||||||
|
|
||||||
/* end of file */
|
|
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
ADD_SUBDIRECTORY(src)
|
@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (C) 2010-2015 by authors
|
||||||
|
Author: Jan Boon <jan.boon@kaetemi.be>
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef NLQT_COMMAND_LOG_H
|
||||||
|
#define NLQT_COMMAND_LOG_H
|
||||||
|
#include <nel/misc/types_nl.h>
|
||||||
|
|
||||||
|
// STL includes
|
||||||
|
|
||||||
|
// Qt includes
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QTextEdit>
|
||||||
|
#include <QLineEdit>
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
#include <nel/misc/log.h>
|
||||||
|
#include <nel/misc/displayer.h>
|
||||||
|
|
||||||
|
// Project includes
|
||||||
|
|
||||||
|
namespace NLQT {
|
||||||
|
|
||||||
|
class CCommandLog : public QWidget, public NLMISC::IDisplayer
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
CCommandLog(QWidget *parent);
|
||||||
|
virtual ~CCommandLog();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void doDisplay(const NLMISC::CLog::TDisplayInfo& args, const char *message);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void tSigDisplay(const QColor &c, const QString &text);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void returnPressed();
|
||||||
|
void tSlotDisplay(const QColor &c, const QString &text);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QTextEdit *m_DisplayerOutput;
|
||||||
|
QLineEdit *m_CommandInput;
|
||||||
|
|
||||||
|
private:
|
||||||
|
CCommandLog(const CCommandLog &);
|
||||||
|
CCommandLog &operator=(const CCommandLog &);
|
||||||
|
|
||||||
|
}; /* class CCommandLog */
|
||||||
|
|
||||||
|
} /* namespace NLQT */
|
||||||
|
|
||||||
|
#endif /* #ifndef NLQT_COMMAND_LOG_H */
|
||||||
|
|
||||||
|
/* end of file */
|
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
ADD_SUBDIRECTORY(displayer)
|
@ -0,0 +1,18 @@
|
|||||||
|
FILE(GLOB SRCS *.cpp *.h)
|
||||||
|
FILE(GLOB HDRS ../../include/nelqt/displayer/*.h)
|
||||||
|
SOURCE_GROUP("" FILES ${SRCS} ${HDRS})
|
||||||
|
|
||||||
|
SET(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
|
NL_TARGET_LIB(nelqtdisplayer ${SRCS} ${HDRS})
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(nelqtdisplayer nelmisc Qt5::Widgets)
|
||||||
|
|
||||||
|
NL_DEFAULT_PROPS(nelqtdisplayer "NeLQt, Library: Displayer")
|
||||||
|
NL_ADD_RUNTIME_FLAGS(nelqtdisplayer)
|
||||||
|
|
||||||
|
NL_ADD_LIB_SUFFIX(nelqtdisplayer)
|
||||||
|
|
||||||
|
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
||||||
|
INSTALL(TARGETS nelqtdisplayer LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries)
|
||||||
|
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
Loading…
Reference in New Issue