Development/Tutorials/Programming Tutorial KDE 4/Using KConfig: Difference between revisions

From KDE TechBase
(Abstract. I'm gonna write the code and then I'll be back :))
(→‎CMakeLists.txt: Add file contents)
Line 31: Line 31:
===CMakeLists.txt===
===CMakeLists.txt===
<code ini n>
<code ini n>
TODO
PROJECT(tutorial4)
 
FIND_PACKAGE(KDE4 REQUIRED)
INCLUDE_DIRECTORIES( ${KDE4_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
 
SET(tutorial4_SRCS
  main.cpp
  mainwindow.cpp
)
 
KDE4_ADD_KCFG_FILES(tutorial4_SRCS settings.kcfgc)
 
KDE4_ADD_EXECUTABLE(tutorial4 ${tutorial4_SRCS})
 
TARGET_LINK_LIBRARIES( tutorial4 ${KDE4_KDEUI_LIBS})
 
install( TARGETS tutorial4 DESTINATION ${BIN_INSTALL_DIR})
install( FILES tutorial4ui.rc DESTINATION  ${DATA_INSTALL_DIR}/tutorial4)
install( FILES tutorial4.kcfg  DESTINATION  ${KCFG_INSTALL_DIR} )
</code>
</code>
==Moving On==
==Moving On==
TODO
TODO
[[Category:Tutorial]]
[[Category:Tutorial]]

Revision as of 01:30, 4 January 2007

Abstract

Author: Matt Williams

In this tutorial, we're going to be showing you how to utilise KConfig XT in an application. It is recommended that you read Development/Tutorials/Using KConfig XT before continuing in order to familiarise yourself with the framework.

Prerequisites

KConfig XT

TODO

The Code

mainwindow.h

TODO

mainwindow.cpp

TODO

main.cpp

TODO

tutorial3ui.rc

TODO

CMake

TODO

CMakeLists.txt

PROJECT(tutorial4)

FIND_PACKAGE(KDE4 REQUIRED) INCLUDE_DIRECTORIES( ${KDE4_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})

SET(tutorial4_SRCS

 main.cpp
 mainwindow.cpp

)

KDE4_ADD_KCFG_FILES(tutorial4_SRCS settings.kcfgc)

KDE4_ADD_EXECUTABLE(tutorial4 ${tutorial4_SRCS})

TARGET_LINK_LIBRARIES( tutorial4 ${KDE4_KDEUI_LIBS})

install( TARGETS tutorial4 DESTINATION ${BIN_INSTALL_DIR}) install( FILES tutorial4ui.rc DESTINATION ${DATA_INSTALL_DIR}/tutorial4) install( FILES tutorial4.kcfg DESTINATION ${KCFG_INSTALL_DIR} )

Moving On

TODO