mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
68 lines
1.7 KiB
C++
68 lines
1.7 KiB
C++
/* Copyright (C) 2015
|
|
* 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.
|
|
*/
|
|
|
|
#include "blackgui/editors/form.h"
|
|
#include <QApplication>
|
|
#include <QClipboard>
|
|
#include <QShortcut>
|
|
|
|
using namespace BlackMisc;
|
|
using namespace BlackMisc::Network;
|
|
|
|
namespace BlackGui
|
|
{
|
|
namespace Editors
|
|
{
|
|
CForm::CForm(QWidget *parent) : COverlayMessagesFrame(parent)
|
|
{ }
|
|
|
|
CForm::~CForm() { }
|
|
|
|
void CForm::setSelectOnly()
|
|
{
|
|
this->setReadOnly(true);
|
|
}
|
|
|
|
CStatusMessageList CForm::validate(bool withNestedObjects) const
|
|
{
|
|
Q_UNUSED(withNestedObjects);
|
|
return CStatusMessageList();
|
|
}
|
|
|
|
void CForm::jsonPasted(const QString &json)
|
|
{
|
|
Q_UNUSED(json);
|
|
}
|
|
|
|
void CForm::pasted()
|
|
{
|
|
if (!QApplication::clipboard()) { return; }
|
|
const QString data = QApplication::clipboard()->text();
|
|
if (!Json::looksLikeSwiftJson(data)) { return; }
|
|
this->jsonPasted(data);
|
|
}
|
|
|
|
CFormDbUser::CFormDbUser(QWidget *parent) : CForm(parent)
|
|
{ }
|
|
|
|
CFormDbUser::~CFormDbUser()
|
|
{ }
|
|
|
|
CAuthenticatedUser CFormDbUser::getSwiftDbUser() const
|
|
{
|
|
return m_swiftDbUser.get();
|
|
}
|
|
|
|
void CFormDbUser::userChanged()
|
|
{
|
|
// void
|
|
}
|
|
} // ns
|
|
} // ns
|