┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2007-03-23 15:32:28 +0000
committerLaurent Montel <[email protected]>2007-03-23 15:32:28 +0000
commit84ea1693dace41d500c0a61501d67508b83711da (patch)
tree561d1a55da6952f0ff722d3e11015ede4ac91669 /src
parent343b54f8e46c3dc5e13fee75b1baddda029b1a83 (diff)
Create shared lib as discussed with David and Peter
It will used to create kparts which will use theses class svn path=/trunk/KDE/kdebase/apps/; revision=645768
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt42
-rw-r--r--src/dolphincontroller.h3
-rw-r--r--src/dolphindetailsview.h3
-rw-r--r--src/dolphiniconsview.h3
-rw-r--r--src/dolphinsettings.h4
-rw-r--r--src/dolphinsortfilterproxymodel.h3
-rw-r--r--src/libdolphin_export.h40
-rw-r--r--src/viewproperties.h4
8 files changed, 82 insertions, 20 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3c437e139..bf5679ef3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,6 +6,34 @@ include_directories( ${CMAKE_SOURCE_DIR}/libkonq ${KDE4_INCLUDE_DIR} ${QT_INCLUD
########### next target ###############
+set(dolphinprivate_LIB_SRCS
+ dolphincontroller.cpp
+ dolphindetailsview.cpp
+ dolphiniconsview.cpp
+ dolphinsettings.cpp
+ viewproperties.cpp
+ dolphinsortfilterproxymodel.cpp
+ )
+
+kde4_add_kcfg_files(dolphinprivate_LIB_SRCS
+ dolphin_directoryviewpropertysettings.kcfgc
+ dolphin_detailsmodesettings.kcfgc
+ dolphin_iconsmodesettings.kcfgc
+ dolphin_generalsettings.kcfgc)
+
+
+kde4_automoc(${dolphinprivate_LIB_SRCS})
+
+kde4_add_library(dolphinprivate SHARED ${dolphinprivate_LIB_SRCS})
+
+target_link_libraries(dolphinprivate ${KDE4_KDEUI_LIBS} konq)
+
+set_target_properties(dolphinprivate PROPERTIES VERSION 1.0.0 SOVERSION 1 )
+install(TARGETS dolphinprivate DESTINATION ${LIB_INSTALL_DIR} )
+
+
+##########################################
+
set(dolphin_SRCS
applyviewpropsjob.cpp
bookmarkselector.cpp
@@ -13,17 +41,12 @@ set(dolphin_SRCS
bookmarkssidebarpage.cpp
detailsviewsettingspage.cpp
dolphinapplication.cpp
- dolphincontroller.cpp
dolphinmainwindow.cpp
dolphinnewmenu.cpp
dolphinview.cpp
dolphinstatusbar.cpp
dolphindirlister.cpp
- dolphindetailsview.cpp
- dolphiniconsview.cpp
- dolphinsettings.cpp
dolphincontextmenu.cpp
- dolphinsortfilterproxymodel.cpp
dolphinsettingsdialog.cpp
editbookmarkdialog.cpp
filterbar.cpp
@@ -47,18 +70,11 @@ set(dolphin_SRCS
urlnavigator.cpp
urlnavigatorbutton.cpp
viewpropertiesdialog.cpp
- viewproperties.cpp
viewsettingspage.cpp
viewpropsprogressinfo.cpp )
kde4_automoc(${dolphin_SRCS})
-kde4_add_kcfg_files(dolphin_SRCS
- dolphin_directoryviewpropertysettings.kcfgc
- dolphin_generalsettings.kcfgc
- dolphin_iconsmodesettings.kcfgc
- dolphin_detailsmodesettings.kcfgc )
-
qt4_add_dbus_adaptor(dolphin_SRCS
org.kde.dolphin.Application.xml
dolphinapplication.h DolphinApplication)
@@ -77,7 +93,7 @@ else(KMETADATA_INCLUDE_DIR AND KMETADATA_LIBRARY)
set(KDE4_KMETADATA "")
endif(KMETADATA_INCLUDE_DIR AND KMETADATA_LIBRARY AND KMETADATA_TOOLS_LIBRARY)
configure_file(config-kmetadata.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kmetadata.h )
-target_link_libraries(dolphin ${KDE4_KDECORE_LIBS} ${KDE4_KDEPRINT_LIBS} ${KDE4_KMETADATA} konq)
+target_link_libraries(dolphin ${KDE4_KDECORE_LIBS} ${KDE4_KDEPRINT_LIBS} ${KDE4_KMETADATA} konq dolphinprivate)
install(TARGETS dolphin DESTINATION ${BIN_INSTALL_DIR})
diff --git a/src/dolphincontroller.h b/src/dolphincontroller.h
index 6edf6eba9..7bd7a4b08 100644
--- a/src/dolphincontroller.h
+++ b/src/dolphincontroller.h
@@ -23,6 +23,7 @@
#include <dolphinview.h>
#include <kurl.h>
#include <QObject>
+#include <libdolphin_export.h>
class KUrl;
class QModelIndex;
@@ -45,7 +46,7 @@ class QPoint;
* when an item should be triggered and a lot more. The controller emits the corresponding signals
* so that the receiver may react on those changes.
*/
-class DolphinController : public QObject
+class LIBDOLPHIN_EXPORT DolphinController : public QObject
{
Q_OBJECT
diff --git a/src/dolphindetailsview.h b/src/dolphindetailsview.h
index b504d6853..cbeb861d1 100644
--- a/src/dolphindetailsview.h
+++ b/src/dolphindetailsview.h
@@ -24,6 +24,7 @@
#include <dolphinview.h>
#include <QStyleOptionViewItem>
#include <QTreeView>
+#include <libdolphin_export.h>
class DolphinController;
@@ -35,7 +36,7 @@ class DolphinController;
* that full available width of the view is used by stretching the width
* of the name column.
*/
-class DolphinDetailsView : public QTreeView
+class LIBDOLPHIN_EXPORT DolphinDetailsView : public QTreeView
{
Q_OBJECT
diff --git a/src/dolphiniconsview.h b/src/dolphiniconsview.h
index db3d5d6cd..cc3715c61 100644
--- a/src/dolphiniconsview.h
+++ b/src/dolphiniconsview.h
@@ -22,6 +22,7 @@
#include <QListView>
#include <QStyleOptionViewItem>
+#include <libdolphin_export.h>
class DolphinController;
class DolphinView;
@@ -32,7 +33,7 @@ class DolphinView;
* It is also possible that instead of the icon a preview of the item
* content is shown.
*/
-class DolphinIconsView : public QListView
+class LIBDOLPHIN_EXPORT DolphinIconsView : public QListView
{
Q_OBJECT
diff --git a/src/dolphinsettings.h b/src/dolphinsettings.h
index b4aaa6371..296f943fc 100644
--- a/src/dolphinsettings.h
+++ b/src/dolphinsettings.h
@@ -21,6 +21,8 @@
#ifndef DOLPHINSETTINGS_H
#define DOLPHINSETTINGS_H
+#include <libdolphin_export.h>
+
class KBookmark;
class KBookmarkManager;
class GeneralSettings;
@@ -38,7 +40,7 @@ class DetailsModeSettings;
* - bookmarks
* - properties for icons and details view
*/
-class DolphinSettings {
+class LIBDOLPHIN_EXPORT DolphinSettings {
public:
static DolphinSettings& instance();
diff --git a/src/dolphinsortfilterproxymodel.h b/src/dolphinsortfilterproxymodel.h
index 87d074e07..a2e1324d8 100644
--- a/src/dolphinsortfilterproxymodel.h
+++ b/src/dolphinsortfilterproxymodel.h
@@ -22,6 +22,7 @@
#include <QSortFilterProxyModel>
#include <dolphinview.h>
+#include <libdolphin_export.h>
/**
* @brief Acts as proxy model for KDirModel to sort and filter
@@ -38,7 +39,7 @@
*
* It is assured that directories are always sorted before files.
*/
-class DolphinSortFilterProxyModel : public QSortFilterProxyModel
+class LIBDOLPHIN_EXPORT DolphinSortFilterProxyModel : public QSortFilterProxyModel
{
Q_OBJECT
diff --git a/src/libdolphin_export.h b/src/libdolphin_export.h
new file mode 100644
index 000000000..6603844f1
--- /dev/null
+++ b/src/libdolphin_export.h
@@ -0,0 +1,40 @@
+/*
+ This file is part of the KDE project
+ Copyright (C) 2007 Montel Laurent <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef LIBDOLPHIN_EXPORT_H
+#define LIBDOLPHIN_EXPORT_H
+
+/* needed for KDE_EXPORT macros */
+#include <kdemacros.h>
+
+/* needed, because e.g. Q_OS_UNIX is so frequently used */
+#include <QtCore/qglobal.h>
+
+#ifdef MAKE_DOLPHIN_LIB
+# define LIBDOLPHIN_EXPORT KDE_EXPORT
+#else
+# ifdef Q_OS_WIN
+# define LIBDOLPHIN_EXPORT KDE_IMPORT
+# else
+# define LIBDOLPHIN_EXPORT KDE_EXPORT
+# endif
+#endif
+
+#endif
+
diff --git a/src/viewproperties.h b/src/viewproperties.h
index 0eb575407..be64b989b 100644
--- a/src/viewproperties.h
+++ b/src/viewproperties.h
@@ -25,7 +25,7 @@
#include <kfileitemdelegate.h>
#include <kurl.h>
#include <qdatetime.h>
-
+#include <libdolphin_export.h>
#include "dolphin_directoryviewpropertysettings.h"
class QFile;
@@ -51,7 +51,7 @@ class QFile;
* (see GeneralSettings::globalViewMode()), the values from the global .directory file
* are used for initialization.
*/
-class ViewProperties
+class LIBDOLPHIN_EXPORT ViewProperties
{
public:
explicit ViewProperties(const KUrl& url);