diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d4c5823..3685656 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,27 +15,65 @@ # Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -FILE(GLOB partitionmanager_SRCS +############################################ + +FILE(GLOB partitionmanagerprivate_SRCS core/*.cpp - gui/*.cpp util/*.cpp ops/*.cpp jobs/*.cpp fs/*.cpp - main.cpp + gui/*.cpp ) -FILE(GLOB partitionmanager_UIFILES gui/*.ui) +FILE(GLOB partitionmanagerprivate_UIFILES gui/*.ui) -KDE4_ADD_UI_FILES(partitionmanager_SRCS ${partitionmanager_UIFILES}) +KDE4_ADD_UI_FILES(partitionmanagerprivate_SRCS ${partitionmanagerprivate_UIFILES}) -KDE4_ADD_KCFG_FILES(partitionmanager_SRCS config.kcfgc) +KDE4_ADD_KCFG_FILES(partitionmanagerprivate_SRCS config.kcfgc) + +KDE4_ADD_LIBRARY(partitionmanagerprivate SHARED ${partitionmanagerprivate_SRCS}) + +TARGET_LINK_LIBRARIES(partitionmanagerprivate ${KDE4_KDECORE_LIBS} ${KDE4_KFILE_LIBS} ${LIBPARTED_LIBS} ${UUID_LIBRARIES} ${BLKID_LIBRARIES}) + +INSTALL(TARGETS partitionmanagerprivate DESTINATION ${LIB_INSTALL_DIR}) + +############################################ + +FILE(GLOB partitionmanager_SRCS main.cpp) KDE4_ADD_EXECUTABLE(partitionmanager ${partitionmanager_SRCS}) -TARGET_LINK_LIBRARIES(partitionmanager ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} ${LIBPARTED_LIBS} ${UUID_LIBRARIES} ${BLKID_LIBRARIES}) +TARGET_LINK_LIBRARIES(partitionmanager partitionmanagerprivate) -INSTALL(TARGETS partitionmanager ${INSTALL_TARGETS_DEFAULT_ARGS}) +INSTALL(TARGETS partitionmanager DESTINATION ${BIN_INSTALL_DIR}) INSTALL(FILES gui/partitionmanagerui.rc DESTINATION ${DATA_INSTALL_DIR}/partitionmanager) INSTALL(FILES partitionmanager.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) +############################################ + +OPTION(PARTMAN_KPART "Build a kpart for KDE Partition Manager" OFF) + +IF(PARTMAN_KPART) + FILE(GLOB partitionmanagerpart_SRCS kpart/partitionmanagerpart.cpp) + + KDE4_ADD_PLUGIN(partitionmanagerpart ${partitionmanagerpart_SRCS}) + + TARGET_LINK_LIBRARIES(partitionmanagerpart + ${KDE4_KPARTS_LIBS} + ${KDE4_KDECORE_LIBS} + partitionmanagerprivate + ) + + INSTALL(TARGETS partitionmanagerpart DESTINATION ${PLUGIN_INSTALL_DIR}) + INSTALL(FILES kpart/partitionmanagerpart.desktop DESTINATION ${SERVICES_INSTALL_DIR}) + INSTALL(FILES kpart/partitionmanagerpart.rc DESTINATION ${DATA_INSTALL_DIR}/partitionmanagerpart) + + OPTION(PARTMAN_KPART_TEST "Build a kpart test application for KDE Partition Manager" OFF) + + IF(PARTMAN_KPART_TEST) + ADD_SUBDIRECTORY(kpart/test) + ENDIF(PARTMAN_KPART_TEST) + +ENDIF(PARTMAN_KPART) + diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 6d54c55..634af3a 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -89,8 +89,9 @@ class PartitionTreeWidgetItem : public QTreeWidgetItem /** Creates a new MainWindow instance. @param parent the parent widget + @param coll an action collection if used as a KPart */ -MainWindow::MainWindow(QWidget* parent) : +MainWindow::MainWindow(QWidget* parent, KActionCollection* coll) : KXmlGuiWindow(parent), Ui::MainWindowBase(), m_LibParted(), @@ -99,7 +100,8 @@ MainWindow::MainWindow(QWidget* parent) : m_StatusText(new QLabel(this)), m_InfoPane(new InfoPane(this)), m_ClipboardPartition(NULL), - m_ProgressDialog(new ProgressDialog(this, operationRunner())) + m_ProgressDialog(new ProgressDialog(this, operationRunner())), + m_ActionCollection(coll) { setupUi(this); @@ -110,7 +112,12 @@ MainWindow::MainWindow(QWidget* parent) : setupStatusBar(); setupConnections(); - setupGUI(); + // If we were called with an action collection we're supposed to be a KPart, so don't + // create the GUI in that case. + if (coll != NULL) + setupGUI(ToolBar | Keys | StatusBar | Save); + else + setupGUI(ToolBar | Keys | StatusBar | Save | Create); loadConfig(); @@ -158,6 +165,11 @@ void MainWindow::changeEvent(QEvent* event) KXmlGuiWindow::changeEvent(event); } +KActionCollection* MainWindow::actionCollection() const +{ + return m_ActionCollection != NULL ? m_ActionCollection : KXmlGuiWindow::actionCollection(); +} + void MainWindow::setupActions() { // File actions diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index cb5d36f..2ca93bf 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -21,6 +21,8 @@ #define MAINWINDOW__H +#include "util/libpartitionmanagerexport.h" + #include "ui_mainwindowbase.h" #include "core/libparted.h" @@ -39,17 +41,18 @@ class QCloseEvent; class QEvent; class Device; class ProgressDialog; +class KActionCollection; /** @brief The application's main window. @author vl@fidra.de */ -class MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase +class LIBPARTITIONMANAGERPRIVATE_EXPORT MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase { Q_OBJECT public: - MainWindow(QWidget* parent = NULL); + MainWindow(QWidget* parent = NULL, KActionCollection* coll = NULL); signals: void devicesChanged(); @@ -74,6 +77,8 @@ class MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase Device* selectedDevice(); Partition* selectedPartition(); + KActionCollection* actionCollection() const; + InfoPane& infoPane() { Q_ASSERT(m_InfoPane); return *m_InfoPane; } PartTableWidget& partTableWidget() { Q_ASSERT(m_PartTableWidget); return *m_PartTableWidget; } @@ -163,6 +168,7 @@ class MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase InfoPane* m_InfoPane; Partition* m_ClipboardPartition; ProgressDialog* m_ProgressDialog; + KActionCollection* m_ActionCollection; }; #endif diff --git a/src/kpart/partitionmanagerpart.cpp b/src/kpart/partitionmanagerpart.cpp new file mode 100644 index 0000000..8d456f6 --- /dev/null +++ b/src/kpart/partitionmanagerpart.cpp @@ -0,0 +1,52 @@ +/*************************************************************************** + * Copyright (C) 2008 by Volker Lanz * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include "kpart/partitionmanagerpart.h" + +#include "gui/mainwindow.h" + +#include "util/helpers.h" + +#include + +K_PLUGIN_FACTORY(PartitionManagerPartFactory, registerPlugin("PartitionManagerPart");) +K_EXPORT_PLUGIN(PartitionManagerPartFactory("partitionmanagerpart", "partitionmanager")) + +PartitionManagerPart::PartitionManagerPart(QWidget*, QObject* parent, const QVariantList&) : + KParts::ReadOnlyPart(parent), + m_MainWindow(NULL) +{ + setComponentData(PartitionManagerPartFactory::componentData(), false); + + // workaround for https://bugs.launchpad.net/kdesudo/+bug/272427 + unblockSigChild(); + + registerMetaTypes(); + + setMainWindow(new MainWindow(NULL, actionCollection())); + setWidget(&mainWindow()); + + setXMLFile("partitionmanagerpart.rc"); +} + +KAboutData* PartitionManagerPart::createAboutData() +{ + return createPartitionManagerAboutData(); +} + diff --git a/src/kpart/partitionmanagerpart.desktop b/src/kpart/partitionmanagerpart.desktop new file mode 100644 index 0000000..2c4898b --- /dev/null +++ b/src/kpart/partitionmanagerpart.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Service +Name=KDE Partition Manager +Icon= + +X-KDE-ServiceTypes=KParts/ReadOnlyPart +X-KDE-Library=partitionmanagerpart diff --git a/src/kpart/partitionmanagerpart.h b/src/kpart/partitionmanagerpart.h new file mode 100644 index 0000000..37b0983 --- /dev/null +++ b/src/kpart/partitionmanagerpart.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * Copyright (C) 2008 by Volker Lanz * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#if !defined(PARTITIONMANAGERPART__H) + +#define PARTITIONMANAGERPART__H + +#include +#include + +class KAboutData; +class MainWindow; + +class PartitionManagerPart : public KParts::ReadOnlyPart +{ + Q_OBJECT + + public: + PartitionManagerPart(QWidget* parentWidget, QObject* parent, const QVariantList& args); + + public: + static KAboutData* createAboutData(); + MainWindow& mainWindow() { Q_ASSERT(m_MainWindow != NULL); return *m_MainWindow; } + + protected: + virtual bool openFile() { return false; } + void setMainWindow(MainWindow* m) { m_MainWindow = m; } + + private: + MainWindow* m_MainWindow; +}; + +#endif diff --git a/src/kpart/partitionmanagerpart.rc b/src/kpart/partitionmanagerpart.rc new file mode 100644 index 0000000..86223fb --- /dev/null +++ b/src/kpart/partitionmanagerpart.rc @@ -0,0 +1,71 @@ + + + + + Edit Toolbar + + + + + + + Partition Toolbar + + + + + + + + + + + Device Toolbar + + + + + + Edit + + + + + + View + + + + + + + + + + Device + + + + Partition + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/kpart/test/CMakeLists.txt b/src/kpart/test/CMakeLists.txt new file mode 100644 index 0000000..196548e --- /dev/null +++ b/src/kpart/test/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (C) 2008 by Volker Lanz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +FIND_PACKAGE(KDE4 REQUIRED) + +INCLUDE_DIRECTORIES(${KDE4_INCLUDES} .) + +SET(kparttest_SRCS + main.cpp + kparttest.cpp +) + +KDE4_ADD_EXECUTABLE(kparttest ${kparttest_SRCS}) + +TARGET_LINK_LIBRARIES(kparttest ${KDE4_KDEUI_LIBS} ${KDE4_KPARTS_LIBS}) + +INSTALL(TARGETS kparttest DESTINATION ${BIN_INSTALL_DIR}) +INSTALL(FILES kparttestui.rc DESTINATION ${DATA_INSTALL_DIR}/kparttest) diff --git a/src/kpart/test/kparttest.cpp b/src/kpart/test/kparttest.cpp new file mode 100644 index 0000000..951ef7d --- /dev/null +++ b/src/kpart/test/kparttest.cpp @@ -0,0 +1,57 @@ +/*************************************************************************** + * Copyright (C) 2008 by Volker Lanz * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#include "kparttest.h" + +#include +#include +#include +#include +#include +#include +#include + +#include + +KPartTest::KPartTest() : + KParts::MainWindow(), + m_Part(NULL) +{ + setupActions(); + + KPluginFactory* factory = KPluginLoader("partitionmanagerpart").factory(); + m_Part = factory ? factory->create("PartitionManagerPart", this) : NULL; + + if (m_Part == NULL) + { + KMessageBox::error(this, "Could not load Partition Manager's KPart"); + qApp->quit(); + return; + } + + setCentralWidget(m_Part->widget()); + + setupGUI(ToolBar | Keys | StatusBar | Save); + createGUI(m_Part); +} + +void KPartTest::setupActions() +{ + KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection()); +} diff --git a/src/kpart/test/kparttest.h b/src/kpart/test/kparttest.h new file mode 100644 index 0000000..920d26e --- /dev/null +++ b/src/kpart/test/kparttest.h @@ -0,0 +1,40 @@ +/*************************************************************************** + * Copyright (C) 2008 by Volker Lanz * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#if !defined(KPARTTEST__H) + +#define KPARTTEST__H + +#include + +class KPartTest : public KParts::MainWindow +{ + Q_OBJECT + + public: + KPartTest(); + + private: + void setupActions(); + + private: + KParts::ReadOnlyPart* m_Part; +}; + +#endif diff --git a/src/kpart/test/kparttestui.rc b/src/kpart/test/kparttestui.rc new file mode 100644 index 0000000..4961653 --- /dev/null +++ b/src/kpart/test/kparttestui.rc @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/kpart/test/main.cpp b/src/kpart/test/main.cpp new file mode 100644 index 0000000..7f479f6 --- /dev/null +++ b/src/kpart/test/main.cpp @@ -0,0 +1,45 @@ +/*************************************************************************** + * Copyright (C) 2008 by Volker Lanz * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#include "kparttest.h" + +#include +#include +#include + +int main(int argc, char* argv[]) +{ + KAboutData aboutData( + "kparttest", + NULL, + ki18n("KDE Partition Manager KPart"), "0.1", + ki18n("A test application for KDE Partition Manager's KPart."), + KAboutData::License_GPL, + ki18n("Copyright (c) 2008 Volker Lanz") + ); + + KCmdLineArgs::init(argc, argv, &aboutData); + + KApplication app; + + KPartTest* widget = new KPartTest(); + widget->show(); + + return app.exec(); +} diff --git a/src/main.cpp b/src/main.cpp index d460e43..a353813 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,64 +19,14 @@ #include "gui/mainwindow.h" +#include "util/helpers.h" + #include #include -#include -#include -#include - -#include "ops/operation.h" -#include "util/globallog.h" - -#include -#include - -static void registerMetaTypes() -{ - qRegisterMetaType("Operation*"); - qRegisterMetaType("log::Level"); -} - -static bool checkPermissions() -{ - if (geteuid() != 0) - return KMessageBox::warningContinueCancel(NULL, i18nc("@info", - "You do not have administrative privileges." - "It is possible to run %1 without these privileges. " - "You will, however, not be allowed to apply operations." - "Do you want to continue running %1?", - KGlobal::mainComponent().aboutData()->programName()), - i18nc("@title:window", "No Administrative Privileges"), - KGuiItem(i18nc("@action:button", "Run Without Administrative Privileges")), - KStandardGuiItem::cancel(), - "runWithoutRootPrivileges") == KMessageBox::Continue; - - return true; -} - -void unblockSigChild() -{ - sigset_t sset; - sigemptyset(&sset); - sigaddset(&sset, SIGCHLD); - sigprocmask(SIG_UNBLOCK, &sset, NULL); -} int main(int argc, char* argv[]) { - KAboutData about( - "partitionmanager", - 0, - ki18nc("@title", "KDE Partition Manager"), - VERSION, - ki18nc("@title", "Manage your disks, partitions and file systems"), - KAboutData::License_GPL, - ki18nc("@info:credit", "(c) 2008 Volker Lanz") - ); - about.addAuthor(ki18nc("@info:credit", "Volker Lanz"), KLocalizedString(), "vl@fidra.de"); - about.setHomepage("http://www.partitionmanager.org"); - - KCmdLineArgs::init(argc, argv, &about); + KCmdLineArgs::init(argc, argv, createPartitionManagerAboutData()); // workaround for https://bugs.launchpad.net/kdesudo/+bug/272427 unblockSigChild(); diff --git a/src/util/helpers.cpp b/src/util/helpers.cpp new file mode 100644 index 0000000..f74c256 --- /dev/null +++ b/src/util/helpers.cpp @@ -0,0 +1,82 @@ +/*************************************************************************** + * Copyright (C) 2008 by Volker Lanz * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include "util/helpers.h" +#include "util/globallog.h" + +#include "ops/operation.h" + +#include +#include +#include +#include +#include + +#include +#include + +void registerMetaTypes() +{ + qRegisterMetaType("Operation*"); + qRegisterMetaType("log::Level"); +} + +void unblockSigChild() +{ + sigset_t sset; + sigemptyset(&sset); + sigaddset(&sset, SIGCHLD); + sigprocmask(SIG_UNBLOCK, &sset, NULL); +} + +bool checkPermissions() +{ + if (geteuid() != 0) + return KMessageBox::warningContinueCancel(NULL, i18nc("@info", + "You do not have administrative privileges." + "It is possible to run %1 without these privileges. " + "You will, however, not be allowed to apply operations." + "Do you want to continue running %1?", + KGlobal::mainComponent().aboutData()->programName()), + i18nc("@title:window", "No administrative privileges"), + KGuiItem(i18nc("@action:button", "Run without administrative privileges")), + KStandardGuiItem::cancel(), + "runWithoutRootPrivileges") == KMessageBox::Continue; + + return true; +} + +KAboutData* createPartitionManagerAboutData() +{ + KAboutData* about = new KAboutData( + "partitionmanager", + NULL, + ki18nc("@title", "KDE Partition Manager"), + VERSION, + ki18nc("@title", "Manage your disks, partitions and file systems"), + KAboutData::License_GPL, + ki18nc("@info:credit", "(c) 2008 Volker Lanz") + ); + + about->addAuthor(ki18nc("@info:credit", "Volker Lanz"), KLocalizedString(), "vl@fidra.de"); + about->setHomepage("http://www.partitionmanager.org"); + + return about; +} + diff --git a/src/util/helpers.h b/src/util/helpers.h new file mode 100644 index 0000000..e9e36a1 --- /dev/null +++ b/src/util/helpers.h @@ -0,0 +1,34 @@ +/*************************************************************************** + * Copyright (C) 2008 by Volker Lanz * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#if !defined(HELPERS__H) + +#define HELPERS__H + +#include "util/libpartitionmanagerexport.h" + +class KAboutData; + +LIBPARTITIONMANAGERPRIVATE_EXPORT void registerMetaTypes(); +LIBPARTITIONMANAGERPRIVATE_EXPORT void unblockSigChild(); +LIBPARTITIONMANAGERPRIVATE_EXPORT bool checkPermissions(); + +LIBPARTITIONMANAGERPRIVATE_EXPORT KAboutData* createPartitionManagerAboutData(); + +#endif diff --git a/src/util/libpartitionmanagerexport.h b/src/util/libpartitionmanagerexport.h new file mode 100644 index 0000000..eb2616c --- /dev/null +++ b/src/util/libpartitionmanagerexport.h @@ -0,0 +1,58 @@ +/*************************************************************************** + * Copyright (C) 2008 by Volker Lanz * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#if !defined(LIBPARTITIONMANAGEREXPORT__H) +#define LIBPARTITIONMANAGEREXPORT__H + +#include + +#if !defined(LIBPARTITIONMANAGERPRIVATE_EXPORT) +# define LIBPARTITIONMANAGERPRIVATE_EXPORT KDE_EXPORT +#endif + +#endif +/*************************************************************************** + * Copyright (C) 2008 by Volker Lanz * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#if !defined(LIBPARTITIONMANAGEREXPORT__H) +#define LIBPARTITIONMANAGEREXPORT__H + +#include + +#if !defined(LIBPARTITIONMANAGERPRIVATE_EXPORT) +# define LIBPARTITIONMANAGERPRIVATE_EXPORT KDE_EXPORT +#endif + +#endif