summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-07-01 19:18:31 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-07-04 01:18:49 +0200
commit2a158538402d410cbaed3daa817b975c1b3b824f (patch)
treefc51da05768867cce3d9b5ab3081e90537009c2c /client
parent117261aff8bf874ecda4e0c8b95270a9ff814da6 (diff)
downloadtwin-style-crystal-2a158538402d410cbaed3daa817b975c1b3b824f.tar.gz
twin-style-crystal-2a158538402d410cbaed3daa817b975c1b3b824f.zip
Conversion to the cmake building system.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit f5dd4b1e8d22437603cc7c4f481bdd2a02500750)
Diffstat (limited to 'client')
-rw-r--r--client/CMakeLists.txt48
-rw-r--r--client/config/CMakeLists.txt29
-rw-r--r--client/config/crystalconfig.cpp4
-rw-r--r--client/crystalclient.cpp7
-rw-r--r--client/imageholder.cpp2
5 files changed, 86 insertions, 4 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
new file mode 100644
index 0000000..1cbaac3
--- /dev/null
+++ b/client/CMakeLists.txt
@@ -0,0 +1,48 @@
+tde_import( twin )
+
+add_subdirectory( config )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_BINARY_DIR}/pics
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIBRARY_DIRS}
+)
+
+
+##### twin3_crystal (kpart)
+
+tde_add_kpart( twin3_crystal AUTOMOC
+
+ SOURCES
+ buttonimage.cpp
+ crystalbutton.cpp
+ crystalclient.cpp
+ imageholder.cpp
+ myrootpixmap.cpp
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdecorations-shared
+
+ DEPENDENCIES
+ embed-tiles
+ embed-overlays
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### other data
+
+tde_create_translated_desktop(
+ SOURCE crystal.desktop
+ DESTINATION ${DATA_INSTALL_DIR}/twin
+)
diff --git a/client/config/CMakeLists.txt b/client/config/CMakeLists.txt
new file mode 100644
index 0000000..236d683
--- /dev/null
+++ b/client/config/CMakeLists.txt
@@ -0,0 +1,29 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIBRARY_DIRS}
+)
+
+
+##### twin_crystal_config (kpart)
+
+tde_add_kpart( twin_crystal_config AUTOMOC
+
+ SOURCES
+ crystalconfig.cpp
+ configdialog.ui
+ infodialog.ui
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdeio-shared
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/client/config/crystalconfig.cpp b/client/config/crystalconfig.cpp
index 117aafc..85f0d9d 100644
--- a/client/config/crystalconfig.cpp
+++ b/client/config/crystalconfig.cpp
@@ -155,7 +155,7 @@ void CrystalConfig::load(TDEConfig*)
config_->setGroup("General");
TQString value = config_->readEntry("TitleAlignment", "AlignHCenter");
- TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child(value);
+ TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->child(value.utf8());
if (button) button->setChecked(true);
dialog_->drawCaption->setChecked(config_->readBoolEntry("DrawCaption",true));
@@ -376,7 +376,7 @@ void CrystalConfig::defaults()
extern "C"
{
- TQObject* allocate_config(TDEConfig* config, TQWidget* parent) {
+ KDE_EXPORT TQObject* allocate_config(TDEConfig* config, TQWidget* parent) {
return (new CrystalConfig(config, parent));
}
}
diff --git a/client/crystalclient.cpp b/client/crystalclient.cpp
index 90b3429..08483fd 100644
--- a/client/crystalclient.cpp
+++ b/client/crystalclient.cpp
@@ -54,9 +54,12 @@ bool CrystalFactory::initialized_ = false;
TQt::AlignmentFlags CrystalFactory::titlealign_ = TQt::AlignHCenter;
-extern "C" KDecorationFactory* create_factory()
+extern "C"
{
- return new CrystalFactory();
+ KDE_EXPORT KDecorationFactory* create_factory()
+ {
+ return new CrystalFactory();
+ }
}
diff --git a/client/imageholder.cpp b/client/imageholder.cpp
index 8d8934f..b3c2a50 100644
--- a/client/imageholder.cpp
+++ b/client/imageholder.cpp
@@ -169,3 +169,5 @@ void QImageHolder::BackgroundUpdated(const TQImage *src)
emit repaintNeeded();
}
+
+#include "imageholder.moc"