citra-qt : Create the toolbar

This commit is contained in:
Styleoshin 2017-09-21 14:16:36 +01:00
parent 00de7b3a91
commit aaff548ef2
2 changed files with 100 additions and 3 deletions

View File

@ -79,6 +79,7 @@ set(UIS
main.ui main.ui
) )
file(GLOB_RECURSE TOOLBAR_ICONS ${CMAKE_SOURCE_DIR}/dist/toolbar_icons/*)
file(GLOB_RECURSE ICONS ${CMAKE_SOURCE_DIR}/dist/icons/*) file(GLOB_RECURSE ICONS ${CMAKE_SOURCE_DIR}/dist/icons/*)
file(GLOB_RECURSE THEMES ${CMAKE_SOURCE_DIR}/dist/qt_themes/*) file(GLOB_RECURSE THEMES ${CMAKE_SOURCE_DIR}/dist/qt_themes/*)
@ -93,10 +94,10 @@ endif()
if (APPLE) if (APPLE)
set(MACOSX_ICON "../../dist/citra.icns") set(MACOSX_ICON "../../dist/citra.icns")
set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
add_executable(citra-qt MACOSX_BUNDLE ${SRCS} ${HEADERS} ${UI_HDRS} ${ICONS} ${THEMES} ${MACOSX_ICON}) add_executable(citra-qt MACOSX_BUNDLE ${SRCS} ${HEADERS} ${UI_HDRS} ${TOOLBAR_ICONS} ${ICONS} ${THEMES} ${MACOSX_ICON})
set_target_properties(citra-qt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) set_target_properties(citra-qt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
else() else()
add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS} ${ICONS} ${THEMES}) add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS} ${TOOLBAR_ICONS} ${ICONS} ${THEMES})
endif() endif()
target_link_libraries(citra-qt PRIVATE audio_core common core input_common network video_core) target_link_libraries(citra-qt PRIVATE audio_core common core input_common network video_core)
target_link_libraries(citra-qt PRIVATE Boost::boost glad nihstro-headers Qt5::OpenGL Qt5::Widgets) target_link_libraries(citra-qt PRIVATE Boost::boost glad nihstro-headers Qt5::OpenGL Qt5::Widgets)

View File

@ -102,6 +102,33 @@
<addaction name="menu_View"/> <addaction name="menu_View"/>
<addaction name="menu_Help"/> <addaction name="menu_Help"/>
</widget> </widget>
<widget class="QToolBar" name="toolbar">
<property name="windowTitle">
<string>Toolbar</string>
</property>
<property name="iconSize">
<size>
<width>30</width>
<height>28</height>
</size>
</property>
<property name="floatable">
<bool>false</bool>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="action_Toolbar_Load_File"/>
<addaction name="action_Toolbar_Toggle_Fullscreen"/>
<addaction name="separator"/>
<addaction name="action_Toolbar_Start_Pause"/>
<addaction name="action_Toolbar_Stop"/>
<addaction name="separator"/>
<addaction name="action_Toolbar_Configure"/>
</widget>
<action name="action_Load_File"> <action name="action_Load_File">
<property name="text"> <property name="text">
<string>Load File...</string> <string>Load File...</string>
@ -196,6 +223,75 @@
<string>Create Pica Surface Viewer</string> <string>Create Pica Surface Viewer</string>
</property> </property>
</action> </action>
<action name="action_Toolbar_Load_File">
<property name="icon">
<iconset resource="../../dist/toolbar_icons/toolbar_icons.qrc">
<normaloff>:/toolbar_icons/rc/load_file.png</normaloff>:/toolbar_icons/rc/load_file.png</iconset>
</property>
<property name="text">
<string>Load File...</string>
</property>
<property name="toolTip">
<string>Load File </string>
</property>
</action>
<action name="action_Toolbar_Toggle_Fullscreen">
<property name="icon">
<iconset resource="../../dist/toolbar_icons/toolbar_icons.qrc">
<normaloff>:/toolbar_icons/rc/fullscreen.png</normaloff>:/toolbar_icons/rc/fullscreen.png</iconset>
</property>
<property name="text">
<string>Toggle fullscreen</string>
</property>
<property name="toolTip">
<string>Toggle fullscreen</string>
</property>
</action>
<action name="action_Toolbar_Start_Pause">
<property name="icon">
<iconset resource="../../dist/toolbar_icons/toolbar_icons.qrc">
<normaloff>:/toolbar_icons/rc/start.png</normaloff>:/toolbar_icons/rc/start.png</iconset>
</property>
<property name="text">
<string>Start</string>
</property>
<property name="toolTip">
<string>Start emulation</string>
</property>
</action>
<action name="action_Toolbar_Stop">
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon">
<iconset resource="../../dist/toolbar_icons/toolbar_icons.qrc">
<normaloff>:/toolbar_icons/rc/stop.png</normaloff>:/toolbar_icons/rc/stop.png</iconset>
</property>
<property name="text">
<string>Stop</string>
</property>
<property name="toolTip">
<string>Stop emulation</string>
</property>
</action>
<action name="action_Toolbar_Configure">
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon">
<iconset resource="../../dist/toolbar_icons/toolbar_icons.qrc">
<normaloff>:/toolbar_icons/rc/configure.png</normaloff>:/toolbar_icons/rc/configure.png</iconset>
</property>
<property name="text">
<string>Configure</string>
</property>
<property name="toolTip">
<string>Configure</string>
</property>
</action>
</widget> </widget>
<resources/> <resources>
<include location="../../dist/toolbar_icons/toolbar_icons.qrc"/>
</resources>
<connections/>
</ui> </ui>