]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Create shared lib as discussed with David and Peter
authorLaurent Montel <montel@kde.org>
Fri, 23 Mar 2007 15:32:28 +0000 (15:32 +0000)
committerLaurent Montel <montel@kde.org>
Fri, 23 Mar 2007 15:32:28 +0000 (15:32 +0000)
It will used to create kparts which will use theses class

svn path=/trunk/KDE/kdebase/apps/; revision=645768

src/CMakeLists.txt
src/dolphincontroller.h
src/dolphindetailsview.h
src/dolphiniconsview.h
src/dolphinsettings.h
src/dolphinsortfilterproxymodel.h
src/libdolphin_export.h [new file with mode: 0644]
src/viewproperties.h

index 3c437e139486c50546af52c9a33f69227b3b615c..bf5679ef3cedf8da657634be155bb007800fb01e 100644 (file)
@@ -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})
 
index 6edf6eba94195d0d6ebb78631d9ec687e03a7732..7bd7a4b08d8584c8b2f2bb520ceb9e5be7056f42 100644 (file)
@@ -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
 
index b504d68534f092b498ff42f20fb8acc0ca9d3cfa..cbeb861d1642a5184577425829acf88d962af82b 100644 (file)
@@ -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
 
index db3d5d6cdad1fcf25d4f161366c2c47334086081..cc3715c61bea81af88288aae38c4d32d85992167 100644 (file)
@@ -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
 
index b4aaa6371bbad422c000a1d135c6f96a255e13fa..296f943fc7a4b45f289324f1f5c7b5ca947379c9 100644 (file)
@@ -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();
 
index 87d074e07b0ffeaeba60e71471caa92bd88314bc..a2e1324d8bb1317d787a9eec42e7db32a3b5ef7c 100644 (file)
@@ -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 (file)
index 0000000..6603844
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+   This file is part of the KDE project
+   Copyright (C) 2007 Montel Laurent <montel@kde.org>
+
+   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
+
index 0eb575407eda090153e4bb2c8263ed1f18740dd2..be64b989bfecc3b1ab54151e82bd29c42200dd32 100644 (file)
@@ -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);