Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
project(Material)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(CMAKE_AUTOMOC on)
set(CMAKE_AUTORCC on)

find_package(Qt5Quick REQUIRED)

add_definitions(-DQPM_INIT)

set(
Headers
${CMAKE_CURRENT_SOURCE_DIR}/src/plugin.h
${CMAKE_CURRENT_SOURCE_DIR}/src/core/device.h
${CMAKE_CURRENT_SOURCE_DIR}/src/core/units.h
)
set(
Src
${CMAKE_CURRENT_SOURCE_DIR}/src/plugin.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/core/device.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/core/units.cpp
)

set(MaterialRCC
${CMAKE_CURRENT_SOURCE_DIR}/src/material.qrc
${CMAKE_CURRENT_SOURCE_DIR}/src/components/components.qrc
${CMAKE_CURRENT_SOURCE_DIR}/src/controls/controls.qrc
${CMAKE_CURRENT_SOURCE_DIR}/src/core/core.qrc
${CMAKE_CURRENT_SOURCE_DIR}/src/extras/extras.qrc
${CMAKE_CURRENT_SOURCE_DIR}/src/listitems/listitems.qrc
${CMAKE_CURRENT_SOURCE_DIR}/src/popups/popups.qrc
${CMAKE_CURRENT_SOURCE_DIR}/src/styles/styles.qrc
${CMAKE_CURRENT_SOURCE_DIR}/src/window/window.qrc
${CMAKE_CURRENT_SOURCE_DIR}/icons/core_icons.qrc
)

add_library(${PROJECT_NAME} SHARED ${Src} ${Headers} ${MaterialRCC})

qt5_use_modules(${PROJECT_NAME} Quick )
24 changes: 24 additions & 0 deletions demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
project(Demo)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(CMAKE_AUTOMOC on)
set(CMAKE_AUTORCC on)

add_subdirectory(../ ${CMAKE_CURRENT_BINARY_DIR}/Material)

find_package(Qt5Quick REQUIRED)
set(
DemoSrc
main.cpp
)

set(
DemoRcc
demo.qrc
)

add_executable(${PROJECT_NAME} ${DemoRcc} ${DemoSrc})
target_link_libraries(${PROJECT_NAME} Material)

qt5_use_modules(${PROJECT_NAME} Quick )
13 changes: 13 additions & 0 deletions demo/icons/core_icons.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE RCC>
<RCC version="1.0">

<qresource prefix="/icons/navigation">
<file alias="arrow_back.svg">navigation_arrow_back.svg</file>
<file alias="chevron_left.svg">navigation_chevron_left.svg</file>
<file alias="chevron_right.svg">navigation_chevron_right.svg</file>
<file alias="close.svg">navigation_close.svg</file>
<file alias="menu.svg">navigation_menu.svg</file>
<file alias="more_vert.svg">navigation_more_vert.svg</file>
</qresource>

</RCC>
1 change: 1 addition & 0 deletions demo/icons/navigation_arrow_back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions demo/icons/navigation_chevron_left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions demo/icons/navigation_chevron_right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions demo/icons/navigation_close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions demo/icons/navigation_menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions demo/icons/navigation_more_vert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions demo/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);

QQmlApplicationEngine engine(QUrl(QStringLiteral("qrc:/main.qml")));

QQmlApplicationEngine engine;
engine.addImportPath("qrc://");
engine.load(QUrl("qrc:/main.qml"));
return app.exec();
}
11 changes: 11 additions & 0 deletions icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,14 @@ icons:
- navigation/close
- navigation/menu
- navigation/more_vert
- editor/mode_edit
- navigation/arrow_drop_down
- action/settings
- action/info
- content/add
- alert/warning
- image/color_lens
- action/language
- action/account_circle
- alert/warning
- image/color_lens
1 change: 1 addition & 0 deletions icons/action_account_circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/action_info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/action_language.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/action_settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/alert_warning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/content_add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions icons/core_icons.qrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,39 @@
<!DOCTYPE RCC>
<RCC version="1.0">

<qresource prefix="/icons/image">
<file alias="color_lens.svg">image_color_lens.svg</file>
<file alias="color_lens.svg">image_color_lens.svg</file>
</qresource>

<qresource prefix="/icons/alert">
<file alias="warning.svg">alert_warning.svg</file>
<file alias="warning.svg">alert_warning.svg</file>
</qresource>

<qresource prefix="/icons/content">
<file alias="add.svg">content_add.svg</file>
</qresource>

<qresource prefix="/icons/editor">
<file alias="mode_edit.svg">editor_mode_edit.svg</file>
</qresource>

<qresource prefix="/icons/action">
<file alias="settings.svg">action_settings.svg</file>
<file alias="info.svg">action_info.svg</file>
<file alias="language.svg">action_language.svg</file>
<file alias="account_circle.svg">action_account_circle.svg</file>
</qresource>

<qresource prefix="/icons/navigation">
<file alias="arrow_back.svg">navigation_arrow_back.svg</file>
<file alias="chevron_left.svg">navigation_chevron_left.svg</file>
<file alias="chevron_right.svg">navigation_chevron_right.svg</file>
<file alias="close.svg">navigation_close.svg</file>
<file alias="menu.svg">navigation_menu.svg</file>
<file alias="more_vert.svg">navigation_more_vert.svg</file>
<file alias="arrow_drop_down.svg">navigation_arrow_drop_down.svg</file>
</qresource>

</RCC>
1 change: 1 addition & 0 deletions icons/editor_mode_edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/image_color_lens.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/navigation_arrow_drop_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.