Raw FSD message component and dialog

Maniphest Tasks: T222
This commit is contained in:
Roland Winklmeier
2018-01-22 14:19:41 +01:00
parent 704068d299
commit 7c903001d5
12 changed files with 503 additions and 15 deletions

View File

@@ -0,0 +1,58 @@
/* Copyright (C) 2018
* swift project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKGUI_RAWFSDMESSAGESCOMPONENT_H
#define BLACKGUI_RAWFSDMESSAGESCOMPONENT_H
#include "blackgui/blackguiexport.h"
#include "blackcore/vatsim/vatsimsettings.h"
#include "blackmisc/network/rawfsdmessage.h"
#include "blackmisc/connectionguard.h"
#include <QFrame>
class QAction;
class QPoint;
class QWidget;
namespace Ui { class CRawFsdMessagesComponent; }
namespace BlackGui
{
namespace Components
{
//! GUI displaying raw FSD messages
class BLACKGUI_EXPORT CRawFsdMessagesComponent : public QFrame
{
Q_OBJECT
public:
//! Constructor
explicit CRawFsdMessagesComponent(QWidget *parent = nullptr);
//! Destructor
virtual ~CRawFsdMessagesComponent();
private:
void changeWritingToFile(bool enable);
void selectFileDir();
void changeFileWritingMode();
void setFileWritingModeFromSettings(BlackCore::Vatsim::CRawFsdMessageSettings::FileWriteMode mode);
void addFsdMessage(const BlackMisc::Network::CRawFsdMessage &rawFsdMessage);
void readSettings();
BlackMisc::CSetting<BlackCore::Vatsim::TRawFsdMessageSetting> m_setting { this };
QScopedPointer<Ui::CRawFsdMessagesComponent> ui;
BlackMisc::CConnectionGuard m_signalConnections; //!< connected signal/slots
};
} // ns
} // ns
#endif // guard