This repository has been archived by the owner on Sep 4, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #11 from nemomobile/staging
declarative components, use cor macros, actor is moved to qtaround
- Loading branch information
Showing
20 changed files
with
719 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#ifndef _STATEFS_QT_CLIENT_HPP_ | ||
#define _STATEFS_QT_CLIENT_HPP_ | ||
/** | ||
* @file client.hpp | ||
* @brief Statefs Qt client interface | ||
* @copyright (C) 2013-2014 Jolla Ltd. | ||
* @par License: LGPL 2.1 http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html | ||
*/ | ||
|
||
#include <QObject> | ||
#include <QVariant> | ||
|
||
namespace statefs { namespace qt { | ||
|
||
class DiscretePropertyImpl; | ||
|
||
class DiscreteProperty : public QObject | ||
{ | ||
Q_OBJECT; | ||
public: | ||
DiscreteProperty(QString const &, QObject *parent = nullptr); | ||
~DiscreteProperty(); | ||
|
||
void refresh() const; | ||
|
||
signals: | ||
void changed(QVariant); | ||
|
||
private: | ||
DiscretePropertyImpl *impl_; | ||
}; | ||
|
||
class PropertyWriterImpl; | ||
|
||
class PropertyWriter : public QObject | ||
{ | ||
Q_OBJECT; | ||
public: | ||
PropertyWriter(QString const &, QObject *parent = nullptr); | ||
~PropertyWriter(); | ||
|
||
void set(QVariant); | ||
signals: | ||
void updated(bool); | ||
private: | ||
PropertyWriterImpl *impl_; | ||
}; | ||
|
||
}} | ||
|
||
#endif // _STATEFS_QT_CLIENT_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,25 @@ | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_AUTOMOC TRUE) | ||
find_package(Qt5Core REQUIRED) | ||
|
||
if(ENABLE_QT4) | ||
|
||
configure_file(contextkit-statefs-qt4.pc.in contextkit-statefs-qt4.pc @ONLY) | ||
configure_file(contextsubscriber-1.0.pc.in contextsubscriber-1.0.pc @ONLY) | ||
|
||
# dirty hack: absolute path, moc is $$$ | ||
qt4_wrap_cpp(LIB_MOC_SRC | ||
/usr/include/contextsubscriber/contextproperty.h property.hpp actor.hpp | ||
) | ||
|
||
add_library(contextkit-statefs-qt4 | ||
SHARED property.cpp | ||
${LIB_MOC_SRC} | ||
) | ||
target_link_libraries(contextkit-statefs-qt4 | ||
${QT_QTCORE_LIBRARY} | ||
statefs-qt4 | ||
${COR_LIBRARIES} | ||
) | ||
|
||
install(TARGETS contextkit-statefs-qt4 DESTINATION ${DST_LIB}) | ||
install(FILES contextkit-statefs-qt4.pc DESTINATION ${DST_LIB}/pkgconfig) | ||
install(FILES contextsubscriber-1.0.pc DESTINATION ${DST_LIB}/pkgconfig) | ||
|
||
else(ENABLE_QT4) | ||
|
||
configure_file(contextkit-statefs.pc.in contextkit-statefs.pc @ONLY) | ||
configure_file(contextsubscriber-1.0.pc.in contextsubscriber-1.0.pc @ONLY) | ||
configure_install_pkgconfig(contextkit-statefs) | ||
configure_install_pkgconfig(contextsubscriber-1.0) | ||
|
||
qt5_wrap_cpp(LIB_MOC_SRC | ||
${CMAKE_SOURCE_DIR}/include/contextsubscriber/contextproperty.h actor.hpp | ||
${STATEFS_QT_MOC_HEADERS} | ||
actor.hpp | ||
) | ||
|
||
add_library(contextkit-statefs-qt5 | ||
SHARED property.cpp | ||
SHARED | ||
property.cpp | ||
${LIB_MOC_SRC} | ||
) | ||
target_link_libraries(contextkit-statefs-qt5 | ||
${Qt5Core_LIBRARIES} | ||
statefs-qt5 | ||
${COR_LIBRARIES} | ||
${QTAROUND_LIBRARIES} | ||
) | ||
|
||
install(TARGETS contextkit-statefs-qt5 DESTINATION ${DST_LIB}) | ||
install(FILES contextkit-statefs.pc DESTINATION ${DST_LIB}/pkgconfig) | ||
install(FILES contextsubscriber-1.0.pc DESTINATION ${DST_LIB}/pkgconfig) | ||
|
||
endif(ENABLE_QT4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.