initial commit
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
# Copyright (C) 2023 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
add_subdirectory(googlefonts)
|
||||
@@ -0,0 +1,40 @@
|
||||
# Copyright (C) 2023 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
qt_add_plugin(googlefonts
|
||||
CLASS_NAME GoogleFonts
|
||||
googlefonts.cpp googlefonts.h
|
||||
)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets
|
||||
OPTIONAL_COMPONENTS PrintSupport)
|
||||
|
||||
set_target_properties(googlefonts PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}"
|
||||
)
|
||||
|
||||
target_include_directories(googlefonts PRIVATE
|
||||
../../app
|
||||
)
|
||||
|
||||
target_link_libraries(googlefonts PRIVATE
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
)
|
||||
|
||||
if(TARGET Qt6::PrintSupport)
|
||||
target_link_libraries(googlefonts PRIVATE Qt6::PrintSupport)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(install_destination "${CMAKE_INSTALL_BINDIR}")
|
||||
elseif(APPLE)
|
||||
set(install_destination ".")
|
||||
else()
|
||||
set(install_destination "${CMAKE_INSTALL_BINDIR}")
|
||||
endif()
|
||||
install(TARGETS googlefonts
|
||||
RUNTIME DESTINATION "${install_destination}"
|
||||
LIBRARY DESTINATION "${install_destination}"
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
#include "googlefonts.h"
|
||||
#include <QString>
|
||||
|
||||
|
||||
GoogleFonts::GoogleFonts()
|
||||
{
|
||||
}
|
||||
|
||||
GoogleFonts::~GoogleFonts()
|
||||
{
|
||||
}
|
||||
|
||||
QString GoogleFonts::name()
|
||||
{
|
||||
return tr("Google Fonts");
|
||||
}
|
||||
|
||||
QString GoogleFonts::version()
|
||||
{
|
||||
return tr("0.1");
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
#ifndef GOOGLEFONTS_H
|
||||
#define GOOGLEFONTS_H
|
||||
|
||||
|
||||
#include "ifontprovider.h"
|
||||
|
||||
|
||||
class GoogleFonts : public QObject, public IFontProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "at.windesign.fontManager.IFontProvider/1.0" FILE "googlefonts.json")
|
||||
Q_INTERFACES(IFontProvider)
|
||||
public:
|
||||
GoogleFonts();
|
||||
~GoogleFonts() override;
|
||||
|
||||
QString name() override;
|
||||
QString version() override;
|
||||
};
|
||||
|
||||
#endif //GOOGLEFONTS_H
|
||||
@@ -0,0 +1 @@
|
||||
{ "Keys": [ "googlefonts" ] }
|
||||
Reference in New Issue
Block a user