diff --git a/src/blackgui/components/texteditdialog.cpp b/src/blackgui/components/texteditdialog.cpp new file mode 100644 index 000000000..aab46093e --- /dev/null +++ b/src/blackgui/components/texteditdialog.cpp @@ -0,0 +1,33 @@ +/* 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. + */ + +#include "texteditdialog.h" +#include "ui_texteditdialog.h" + +namespace BlackGui +{ + namespace Components + { + CTextEditDialog::CTextEditDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::CTextEditDialog) + { + ui->setupUi(this); + this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); + } + + CTextEditDialog::~CTextEditDialog() + { } + + QTextEdit *CTextEditDialog::textEdit() const + { + return ui->te_TextEdit; + } + } // ns +} // ns diff --git a/src/blackgui/components/texteditdialog.h b/src/blackgui/components/texteditdialog.h new file mode 100644 index 000000000..27d796557 --- /dev/null +++ b/src/blackgui/components/texteditdialog.h @@ -0,0 +1,45 @@ +/* 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_COMPONENTS_TEXTEDITDIALOG_H +#define BLACKGUI_COMPONENTS_TEXTEDITDIALOG_H + +#include +#include + +class QTextEdit; + +namespace Ui { class CTextEditDialog; } +namespace BlackGui +{ + namespace Components + { + //! Text edit as dialog + class CTextEditDialog : public QDialog + { + Q_OBJECT + + public: + //! Constructor + explicit CTextEditDialog(QWidget *parent = nullptr); + + //! Dtor + virtual ~CTextEditDialog(); + + //! Access to text edit + QTextEdit *textEdit() const; + + private: + QScopedPointer ui; + }; + } // ns +} // ns +#endif // guard diff --git a/src/blackgui/components/texteditdialog.ui b/src/blackgui/components/texteditdialog.ui new file mode 100644 index 000000000..0cac3d4c8 --- /dev/null +++ b/src/blackgui/components/texteditdialog.ui @@ -0,0 +1,67 @@ + + + CTextEditDialog + + + + 0 + 0 + 640 + 480 + + + + Text edit dialog + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + bb_TextEditDialog + accepted() + CTextEditDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + bb_TextEditDialog + rejected() + CTextEditDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + +