File indexing completed on 2025-01-05 04:26:48

0001 /*
0002  * Replacement fot QT Bindings that were removed from QT5
0003  * Copyright (C) 2020  Pedro de Carvalho Gomes <pedrogomes81@gmail.com>
0004  *
0005  * This program is free software: you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation, either version 3 of the License, or
0008  * (at your option) any later version.
0009  *
0010  * This program is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  * GNU General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0017  */
0018 
0019 #include "CoreIODevice.h"
0020 
0021 using namespace QtBindings::Core;
0022 
0023 IODevice::IODevice()
0024 {
0025 }
0026 
0027 IODevice::IODevice(const IODevice &other) : QObject()
0028 {
0029     Q_UNUSED(other)
0030 }
0031 
0032 IODevice::~IODevice()
0033 {
0034 }
0035 
0036 IODevice &IODevice::operator=(const IODevice &other)
0037 {
0038     Q_UNUSED(other)
0039     return *this;
0040 }
0041 
0042 void IODevice::installJSType( QJSEngine *engine )
0043 {
0044 
0045     Base<IODevice>::installJSType( engine );
0046     engine->globalObject().property("QIODevice").setProperty(
0047             "OpenMode", engine->newQMetaObject<OpenMode>() );
0048     qRegisterMetaType<OpenMode>("QIODevice::OpenMode");
0049     qRegisterMetaType<QtBindings::Core::IODevice::OpenModeFlag>();
0050 }
0051 
0052 OpenMode::OpenMode() : QIODevice::OpenMode()
0053 {
0054 }
0055 
0056 OpenMode::OpenMode(const OpenMode& other) : QObject(), QIODevice::OpenMode( other )
0057 {
0058 }
0059 
0060 OpenMode::OpenMode(QIODevice::OpenMode flags) : QIODevice::OpenMode( flags )
0061 {
0062 }
0063 
0064 OpenMode::~OpenMode()
0065 {
0066 }
0067 
0068 OpenMode::operator Int() {
0069     return QIODevice::OpenMode::operator Int();
0070 }