diff --git a/src/pimcommon/autocorrection/autocorrection.h b/src/pimcommon/autocorrection/autocorrection.h index 0b9eb5a..e40da9f 100644 --- a/src/pimcommon/autocorrection/autocorrection.h +++ b/src/pimcommon/autocorrection/autocorrection.h @@ -1,153 +1,157 @@ /* Copyright (c) 2012-2019 Montel Laurent 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 */ #ifndef AutoCorrection_H #define AutoCorrection_H #include "pimcommon_export.h" #include #include #include namespace PimCommon { +/** + * @brief The AutoCorrection class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT AutoCorrection { public: struct TypographicQuotes { QChar begin; QChar end; }; explicit AutoCorrection(); ~AutoCorrection(); void setLanguage(const QString &lang, bool forceGlobal = false); void setEnabledAutoCorrection(bool b); void setUppercaseFirstCharOfSentence(bool b); void setFixTwoUppercaseChars(bool b); void setSingleSpaces(bool b); void setAutoFractions(bool b); void setCapitalizeWeekDays(bool b); void setReplaceDoubleQuotes(bool b); void setReplaceSingleQuotes(bool b); void setAdvancedAutocorrect(bool b); void setTypographicSingleQuotes(TypographicQuotes singleQuote); void setTypographicDoubleQuotes(TypographicQuotes doubleQuote); void setUpperCaseExceptions(const QSet &exceptions); void setTwoUpperLetterExceptions(const QSet &exceptions); void setAutocorrectEntries(const QHash &entries); void setAutoFormatUrl(bool b); void setAutoBoldUnderline(bool b); void setSuperScript(bool b); void setAddNonBreakingSpace(bool b); Q_REQUIRED_RESULT bool isEnabledAutoCorrection() const; Q_REQUIRED_RESULT bool isUppercaseFirstCharOfSentence() const; Q_REQUIRED_RESULT bool isFixTwoUppercaseChars() const; Q_REQUIRED_RESULT bool isSingleSpaces() const; Q_REQUIRED_RESULT bool isAutoFractions() const; Q_REQUIRED_RESULT bool isCapitalizeWeekDays() const; Q_REQUIRED_RESULT bool isReplaceDoubleQuotes() const; Q_REQUIRED_RESULT bool isReplaceSingleQuotes() const; Q_REQUIRED_RESULT bool isAdvancedAutocorrect() const; Q_REQUIRED_RESULT bool isAutoFormatUrl() const; Q_REQUIRED_RESULT bool isAutoBoldUnderline() const; Q_REQUIRED_RESULT bool isSuperScript() const; Q_REQUIRED_RESULT bool isAddNonBreakingSpace() const; Q_REQUIRED_RESULT QString language() const; Q_REQUIRED_RESULT TypographicQuotes typographicSingleQuotes() const; Q_REQUIRED_RESULT TypographicQuotes typographicDoubleQuotes() const; Q_REQUIRED_RESULT TypographicQuotes typographicDefaultSingleQuotes() const; Q_REQUIRED_RESULT TypographicQuotes typographicDefaultDoubleQuotes() const; Q_REQUIRED_RESULT QSet upperCaseExceptions() const; Q_REQUIRED_RESULT QSet twoUpperLetterExceptions() const; Q_REQUIRED_RESULT QHash autocorrectEntries() const; Q_REQUIRED_RESULT bool autocorrect(bool htmlMode, QTextDocument &document, int &position); void writeConfig(); Q_REQUIRED_RESULT bool addAutoCorrect(const QString ¤tWord, const QString &replaceWord); void writeAutoCorrectionXmlFile(const QString &filename = QString()); void setNonBreakingSpace(QChar nonBreakingSpace); void loadGlobalFileName(const QString &fname, bool forceGlobal); void loadLocalFileName(const QString &localFileName, const QString &fname); private: bool isFrenchLanguage() const; void readConfig(); void fixTwoUppercaseChars(); bool singleSpaces(); void capitalizeWeekDays(); bool autoFractions(); void uppercaseFirstCharOfSentence(); int advancedAutocorrect(); void replaceTypographicQuotes(); void superscriptAppendix(); void addNonBreakingSpace(); void selectPreviousWord(QTextCursor &cursor, int cursorPosition); void selectStringOnMaximumSearchString(QTextCursor &cursor, int cursorPosition); bool autoFormatURLs(); bool autoBoldUnderline(); QString autoDetectURL(const QString &_word) const; void readAutoCorrectionXmlFile(bool forceGlobal = false); bool excludeToUppercase(const QString &word) const; QColor linkColor(); bool mSingleSpaces; // suppress double spaces. bool mUppercaseFirstCharOfSentence; // convert first letter of a sentence automaticall to uppercase bool mFixTwoUppercaseChars; // convert two uppercase characters to one upper and one lowercase. bool mAutoFractions; // replace 1/2 with ½ bool mCapitalizeWeekDays; bool mAdvancedAutocorrect; // autocorrection from a list of entries bool mReplaceDoubleQuotes; // replace double quotes with typographical quotes bool mReplaceSingleQuotes; // replace single quotes with typographical quotes bool mAutoFormatUrl; bool mAutoBoldUnderline; bool mEnabled; bool mSuperScriptAppendix; bool mAddNonBreakingSpace; int mMaxFindStringLenght; int mMinFindStringLenght; QString mWord; QTextCursor mCursor; QChar mNonBreakingSpace; QString mAutoCorrectLang; QStringList mCacheNameOfDays; QSet mUpperCaseExceptions; QSet mTwoUpperLetterExceptions; QHash mAutocorrectEntries; QHash mSuperScriptEntries; TypographicQuotes mTypographicSingleQuotes; TypographicQuotes mTypographicDoubleQuotes; QColor mLinkColor; }; } #endif // AutoCorrection_H diff --git a/src/pimcommon/autocorrection/autocorrectionlanguage.h b/src/pimcommon/autocorrection/autocorrectionlanguage.h index a83c013..1564fee 100644 --- a/src/pimcommon/autocorrection/autocorrectionlanguage.h +++ b/src/pimcommon/autocorrection/autocorrectionlanguage.h @@ -1,45 +1,49 @@ /* Copyright (c) 2012-2019 Montel Laurent 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 */ #ifndef AutoCorrectionLanguage_H #define AutoCorrectionLanguage_H #include #include "pimcommon_export.h" namespace PimCommon { +/** + * @brief The AutoCorrectionLanguage class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT AutoCorrectionLanguage : public QComboBox { public: explicit AutoCorrectionLanguage(QWidget *parent); ~AutoCorrectionLanguage(); /** * @brief language * @return specified language */ Q_REQUIRED_RESULT QString language() const; /** * @brief setLanguage * @param language define specified language */ void setLanguage(const QString &language); }; } #endif // AutoCorrectionLanguage_H diff --git a/src/pimcommon/autocorrection/autocorrectionwidget.h b/src/pimcommon/autocorrection/autocorrectionwidget.h index 1865fc2..d46c183 100644 --- a/src/pimcommon/autocorrection/autocorrectionwidget.h +++ b/src/pimcommon/autocorrection/autocorrectionwidget.h @@ -1,101 +1,105 @@ /* Copyright (c) 2012-2019 Montel Laurent 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 */ #ifndef AutoCorrectionWidget_H #define AutoCorrectionWidget_H #include "pimcommon_export.h" #include "pimcommon/autocorrection.h" #include class QTreeWidgetItem; namespace Ui { class AutoCorrectionWidget; } namespace PimCommon { class AutoCorrectionWidgetPrivate; +/** + * @brief The AutoCorrectionWidget class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT AutoCorrectionWidget : public QWidget { Q_OBJECT public: enum ImportFileType { LibreOffice, KMail }; explicit AutoCorrectionWidget(QWidget *parent = nullptr); ~AutoCorrectionWidget(); void setAutoCorrection(AutoCorrection *autoCorrect); void loadConfig(); void writeConfig(); void resetToDefault(); private Q_SLOTS: /* tab 2 */ void enableSingleQuotes(bool state); void enableDoubleQuotes(bool state); void selectSingleQuoteCharOpen(); void selectSingleQuoteCharClose(); void setDefaultSingleQuotes(); void selectDoubleQuoteCharOpen(); void selectDoubleQuoteCharClose(); void setDefaultDoubleQuotes(); /* tab 3 */ void enableAdvAutocorrection(bool state); void addAutocorrectEntry(); void removeAutocorrectEntry(); void setFindReplaceText(QTreeWidgetItem *, int); void enableAddRemoveButton(); /* tab 4 */ void abbreviationChanged(const QString &text); void twoUpperLetterChanged(const QString &text); void addAbbreviationEntry(); void removeAbbreviationEntry(); void addTwoUpperLetterEntry(); void removeTwoUpperLetterEntry(); void slotEnableDisableAbreviationList(); void slotEnableDisableTwoUpperEntry(); void slotImportAutoCorrection(QAction *act); void changeLanguage(int); void updateAddRemoveButton(); void slotExportAutoCorrection(); Q_SIGNALS: void changed(); private: void emitChanged(); void addAutoCorrectEntries(); void loadAutoCorrectionAndException(); void loadGlobalAutoCorrectionAndException(); void setLanguage(const QString &lang); AutoCorrectionWidgetPrivate *const d; }; } #endif // AutoCorrectionWidget_H diff --git a/src/pimcommon/autocorrection/widgets/lineeditwithautocorrection.h b/src/pimcommon/autocorrection/widgets/lineeditwithautocorrection.h index c485854..64cc8c1 100644 --- a/src/pimcommon/autocorrection/widgets/lineeditwithautocorrection.h +++ b/src/pimcommon/autocorrection/widgets/lineeditwithautocorrection.h @@ -1,49 +1,53 @@ /* Copyright (c) 2013-2019 Montel Laurent 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 */ #ifndef SUBJECTLINEEDITWITHAUTOCORRECTION_H #define SUBJECTLINEEDITWITHAUTOCORRECTION_H #include "pimcommon_export.h" #include namespace PimCommon { class AutoCorrection; class LineEditWithAutoCorrectionPrivate; +/** + * @brief The LineEditWithAutoCorrection class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT LineEditWithAutoCorrection : public PimCommon::SpellCheckLineEdit { Q_OBJECT public: explicit LineEditWithAutoCorrection(QWidget *parent, const QString &configFile); ~LineEditWithAutoCorrection() override; Q_REQUIRED_RESULT PimCommon::AutoCorrection *autocorrection() const; void setAutocorrection(PimCommon::AutoCorrection *autocorrect); void setAutocorrectionLanguage(const QString &language); protected: void keyPressEvent(QKeyEvent *e) override; private: LineEditWithAutoCorrectionPrivate *const d; }; } #endif // SUBJECTLINEEDITWITHAUTOCORRECTION_H diff --git a/src/pimcommon/autocorrection/widgets/richtexteditwithautocorrection.h b/src/pimcommon/autocorrection/widgets/richtexteditwithautocorrection.h index 354e4ab..6fe4c30 100644 --- a/src/pimcommon/autocorrection/widgets/richtexteditwithautocorrection.h +++ b/src/pimcommon/autocorrection/widgets/richtexteditwithautocorrection.h @@ -1,49 +1,53 @@ /* Copyright (c) 2013-2019 Montel Laurent 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 */ #ifndef RICHTEXTEDITWITHAUTOCORRECTION_H #define RICHTEXTEDITWITHAUTOCORRECTION_H #include "pimcommon_export.h" #include "kpimtextedit/richtexteditor.h" namespace PimCommon { class AutoCorrection; class RichTextEditWithAutoCorrectionPrivate; +/** + * @brief The RichTextEditWithAutoCorrection class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT RichTextEditWithAutoCorrection : public KPIMTextEdit::RichTextEditor { Q_OBJECT public: explicit RichTextEditWithAutoCorrection(QWidget *parent = nullptr); ~RichTextEditWithAutoCorrection() override; Q_REQUIRED_RESULT PimCommon::AutoCorrection *autocorrection() const; void setAutocorrection(PimCommon::AutoCorrection *autocorrect); void setAutocorrectionLanguage(const QString &language); protected: void keyPressEvent(QKeyEvent *e) override; private: RichTextEditWithAutoCorrectionPrivate *const d; }; } #endif // RICHTEXTEDITWITHAUTOCORRECTION_H diff --git a/src/pimcommon/configureplugins/configureplugindialog.h b/src/pimcommon/configureplugins/configureplugindialog.h index f3f80c2..7c2a039 100644 --- a/src/pimcommon/configureplugins/configureplugindialog.h +++ b/src/pimcommon/configureplugins/configureplugindialog.h @@ -1,55 +1,59 @@ /* Copyright (c) 2016-2019 Montel Laurent 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 */ #ifndef CONFIGUREPLUGINDIALOG_H #define CONFIGUREPLUGINDIALOG_H #include #include "pimcommon_export.h" class QDialogButtonBox; namespace PimCommon { +/** + * @brief The ConfigurePluginDialog class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT ConfigurePluginDialog : public QDialog { Q_OBJECT public: explicit ConfigurePluginDialog(QWidget *parent = nullptr); ~ConfigurePluginDialog(); void initLayout(bool addSpacer = false); protected: void showHelp(const QString &name, const QString &anchor); virtual QWidget *createLayout() = 0; virtual void save() = 0; virtual void load() = 0; virtual void reset(); virtual void help(); Q_REQUIRED_RESULT QDialogButtonBox *buttonBox() const; private: void slotHelpClicked(); void slotAccepted(); void slotRestoreDefaultClicked(); void saveConfig(); void readConfig(); QDialogButtonBox *mButtonBox = nullptr; }; } #endif // CONFIGUREPLUGINDIALOG_H diff --git a/src/pimcommon/configureplugins/configurepluginslistwidget.h b/src/pimcommon/configureplugins/configurepluginslistwidget.h index c194dc5..4746f88 100644 --- a/src/pimcommon/configureplugins/configurepluginslistwidget.h +++ b/src/pimcommon/configureplugins/configurepluginslistwidget.h @@ -1,81 +1,85 @@ /* Copyright (c) 2016-2019 Montel Laurent 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 */ #ifndef CONFIGUREPLUGINSLISTWIDGET_H #define CONFIGUREPLUGINSLISTWIDGET_H #include #include "pimcommon_export.h" #include #include class QTreeWidget; class QAction; namespace PimCommon { +/** + * @brief The ConfigurePluginsListWidget class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT ConfigurePluginsListWidget : public QWidget { Q_OBJECT public: explicit ConfigurePluginsListWidget(QWidget *parent = nullptr); ~ConfigurePluginsListWidget(); virtual void save(); virtual void doLoadFromGlobalSettings(); virtual void doResetToDefaultsOther(); virtual void defaults(); virtual void initialize(); Q_SIGNALS: void descriptionChanged(const QString &description); void changed(); void configureClicked(const QString &configureGroupName, const QString &identifier); private: void slotItemSelectionChanged(); void slotItemChanged(QTreeWidgetItem *item, int column); protected: class PluginItem : public QTreeWidgetItem { public: PluginItem(QTreeWidgetItem *parent) : QTreeWidgetItem(parent) , mEnableByDefault(false) , mHasConfigureSupport(false) , mEnableFromUserSettings(false) { } QString mIdentifier; QString mDescription; bool mEnableByDefault; bool mHasConfigureSupport; bool mEnableFromUserSettings; }; void savePlugins(const QString &groupName, const QString &prefixSettingKey, const QVector &listItems); void fillTopItems(const QVector &lst, const QString &topLevelItemName, const QString &groupName, const QString &prefixKey, QVector &itemsList, const QString &configureGroupName = QString(), bool checkable = true); void resetToUserSettings(const QVector &items); void changeState(const QVector &items); QTreeWidget *mListWidget = nullptr; private: void slotConfigureClicked(QAction *act); }; } #endif // CONFIGUREPLUGINSLISTWIDGET_H diff --git a/src/pimcommon/configureplugins/configurepluginswidget.h b/src/pimcommon/configureplugins/configurepluginswidget.h index e407b59..ee574df 100644 --- a/src/pimcommon/configureplugins/configurepluginswidget.h +++ b/src/pimcommon/configureplugins/configurepluginswidget.h @@ -1,55 +1,59 @@ /* Copyright (c) 2016-2019 Montel Laurent 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 */ #ifndef CONFIGUREPLUGINSWIDGET_H #define CONFIGUREPLUGINSWIDGET_H #include #include "pimcommon_export.h" class QSplitter; class QTextEdit; namespace PimCommon { class ConfigurePluginsListWidget; +/** + * @brief The ConfigurePluginsWidget class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT ConfigurePluginsWidget : public QWidget { Q_OBJECT public: explicit ConfigurePluginsWidget(QWidget *parent = nullptr); explicit ConfigurePluginsWidget(ConfigurePluginsListWidget *configurePluginListWidget, QWidget *parent = nullptr); ~ConfigurePluginsWidget(); void save(); void defaults(); void doLoadFromGlobalSettings(); void doResetToDefaultsOther(); Q_SIGNALS: void changed(); private: void initialize(); void readConfig(); void writeConfig(); void initLayout(ConfigurePluginsListWidget *configurePluginListWidget = nullptr); QSplitter *mSplitter = nullptr; ConfigurePluginsListWidget *mConfigureListWidget = nullptr; QTextEdit *mDescription = nullptr; }; } #endif // CONFIGUREPLUGINSWIDGET_H diff --git a/src/pimcommon/customtools/customtoolsplugin.h b/src/pimcommon/customtools/customtoolsplugin.h index b813836..b98b24c 100644 --- a/src/pimcommon/customtools/customtoolsplugin.h +++ b/src/pimcommon/customtools/customtoolsplugin.h @@ -1,53 +1,57 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef CUSTOMTOOLSPLUGIN_H #define CUSTOMTOOLSPLUGIN_H #include "pimcommon_export.h" #include class KActionCollection; namespace PimCommon { class CustomToolsWidgetNg; class CustomToolsViewInterface; class CustomToolsPluginPrivate; +/** + * @brief The CustomToolsPlugin class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT CustomToolsPlugin : public QObject { Q_OBJECT public: explicit CustomToolsPlugin(QObject *parent = nullptr); ~CustomToolsPlugin(); virtual PimCommon::CustomToolsViewInterface *createView(KActionCollection *ac, CustomToolsWidgetNg *parent = nullptr) = 0; Q_REQUIRED_RESULT virtual QString customToolName() const = 0; Q_REQUIRED_RESULT virtual bool hasConfigureDialog() const; virtual void showConfigureDialog(QWidget *parent); void emitConfigChanged(); Q_REQUIRED_RESULT virtual QString description() const; void setIsEnabled(bool enabled); Q_REQUIRED_RESULT bool isEnabled() const; private: CustomToolsPluginPrivate *const d; }; } #endif // CUSTOMTOOLSPLUGIN_H diff --git a/src/pimcommon/customtools/customtoolspluginmanager.h b/src/pimcommon/customtools/customtoolspluginmanager.h index 51c1173..97f81d9 100644 --- a/src/pimcommon/customtools/customtoolspluginmanager.h +++ b/src/pimcommon/customtools/customtoolspluginmanager.h @@ -1,41 +1,45 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef CUSTOMTOOLSPLUGINMANAGER_H #define CUSTOMTOOLSPLUGINMANAGER_H #include #include "pimcommon_export.h" namespace PimCommon { class CustomToolsPlugin; class CustomToolsPluginManagerPrivate; +/** + * @brief The CustomToolsPluginManager class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT CustomToolsPluginManager : public QObject { Q_OBJECT public: static CustomToolsPluginManager *self(); explicit CustomToolsPluginManager(QObject *parent = nullptr); ~CustomToolsPluginManager(); Q_REQUIRED_RESULT QVector pluginsList() const; private: CustomToolsPluginManagerPrivate *const d; }; } #endif // CUSTOMTOOLSPLUGINMANAGER_H diff --git a/src/pimcommon/customtools/customtoolsviewinterface.h b/src/pimcommon/customtools/customtoolsviewinterface.h index ae5992e..16315d9 100644 --- a/src/pimcommon/customtools/customtoolsviewinterface.h +++ b/src/pimcommon/customtools/customtoolsviewinterface.h @@ -1,43 +1,47 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef CUSTOMTOOLSVIEWINTERFACE_H #define CUSTOMTOOLSVIEWINTERFACE_H #include "pimcommon_export.h" #include class KToggleAction; namespace PimCommon { +/** + * @brief The CustomToolsViewInterface class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT CustomToolsViewInterface : public QWidget { Q_OBJECT public: explicit CustomToolsViewInterface(QWidget *parent = nullptr); ~CustomToolsViewInterface() override; virtual void setText(const QString &text); virtual KToggleAction *action() const; Q_SIGNALS: void insertText(const QString &text); void toolsWasClosed(); void activateView(QWidget *); }; } #endif // CUSTOMTOOLSVIEWINTERFACE_H diff --git a/src/pimcommon/customtools/customtoolswidgetng.h b/src/pimcommon/customtools/customtoolswidgetng.h index 010511b..9b4348b 100644 --- a/src/pimcommon/customtools/customtoolswidgetng.h +++ b/src/pimcommon/customtools/customtoolswidgetng.h @@ -1,56 +1,60 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef CUSTOMTOOLSWIDGETNG_H #define CUSTOMTOOLSWIDGETNG_H #include #include "pimcommon_export.h" class KToggleAction; class KActionCollection; namespace PimCommon { class CustomToolsWidgetNgPrivate; class CustomToolsPlugin; class CustomToolsViewInterface; +/** + * @brief The CustomToolsWidgetNg class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT CustomToolsWidgetNg : public QWidget { Q_OBJECT public: explicit CustomToolsWidgetNg(QWidget *parent = nullptr); ~CustomToolsWidgetNg(); Q_REQUIRED_RESULT QList actionList() const; void initializeView(KActionCollection *ac, const QVector &localPluginsList); void setText(const QString &text); void addCustomToolViewInterface(PimCommon::CustomToolsViewInterface *plugin); public Q_SLOTS: void slotToolsWasClosed(); void slotActivateView(QWidget *w); Q_SIGNALS: void insertText(const QString &url); void toolActivated(); private: CustomToolsWidgetNgPrivate *const d; }; } #endif // CUSTOMTOOLSWIDGETNG_H diff --git a/src/pimcommon/genericplugins/abstractgenericplugin.h b/src/pimcommon/genericplugins/abstractgenericplugin.h index 568a54c..57128de 100644 --- a/src/pimcommon/genericplugins/abstractgenericplugin.h +++ b/src/pimcommon/genericplugins/abstractgenericplugin.h @@ -1,49 +1,53 @@ /* Copyright (c) 2016-2019 Montel Laurent 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 */ #ifndef AbstractGENERICPLUGIN_H #define AbstractGENERICPLUGIN_H #include #include "pimcommon_export.h" class KActionCollection; namespace PimCommon { class AbstractGenericPluginInterface; +/** + * @brief The AbstractGenericPlugin class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT AbstractGenericPlugin : public QObject { Q_OBJECT public: explicit AbstractGenericPlugin(QObject *parent = nullptr); ~AbstractGenericPlugin(); virtual PimCommon::AbstractGenericPluginInterface *createInterface(QObject *parent = nullptr) = 0; Q_REQUIRED_RESULT virtual bool hasPopupMenuSupport() const; Q_REQUIRED_RESULT virtual bool hasToolBarSupport() const; Q_REQUIRED_RESULT virtual bool hasConfigureDialog() const; Q_REQUIRED_RESULT virtual bool hasStatusBarSupport() const; virtual void showConfigureDialog(QWidget *parent = nullptr); void setIsEnabled(bool enabled); Q_REQUIRED_RESULT bool isEnabled() const; private: bool mIsEnabled; }; } #endif // AbstractGENERICPLUGIN_H diff --git a/src/pimcommon/genericplugins/abstractgenericplugininterface.h b/src/pimcommon/genericplugins/abstractgenericplugininterface.h index aaad0b8..91baf13 100644 --- a/src/pimcommon/genericplugins/abstractgenericplugininterface.h +++ b/src/pimcommon/genericplugins/abstractgenericplugininterface.h @@ -1,81 +1,85 @@ /* Copyright (c) 2016-2019 Montel Laurent 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 */ #ifndef AbstractGENERICPLUGININTERFACE_H #define AbstractGENERICPLUGININTERFACE_H #include #include "pimcommon_export.h" class QAction; class KActionCollection; namespace PimCommon { class AbstractGenericPlugin; class GenericPlugin; +/** + * @brief The ActionType class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT ActionType { public: enum Type { Tools = 0, Edit = 1, File = 2, Action = 3, PopupMenu = 4, ToolBar = 5, Message = 6, Folder = 7 }; ActionType() { } ActionType(QAction *action, Type type); Q_REQUIRED_RESULT QAction *action() const; Q_REQUIRED_RESULT Type type() const; private: QAction *mAction = nullptr; Type mType = Tools; }; class AbstractGenericPluginInterfacePrivate; class PIMCOMMON_EXPORT AbstractGenericPluginInterface : public QObject { Q_OBJECT public: explicit AbstractGenericPluginInterface(QObject *parent = nullptr); ~AbstractGenericPluginInterface(); void setParentWidget(QWidget *parent); Q_REQUIRED_RESULT QWidget *parentWidget() const; void setPlugin(AbstractGenericPlugin *plugin); Q_REQUIRED_RESULT AbstractGenericPlugin *plugin() const; virtual void createAction(KActionCollection *ac) = 0; virtual void exec() = 0; virtual void showConfigureDialog(QWidget *parentWidget = nullptr); Q_SIGNALS: void emitPluginActivated(PimCommon::AbstractGenericPluginInterface *interface); void message(const QString &str); private: AbstractGenericPluginInterfacePrivate *const d; }; } #endif // AbstractGENERICPLUGININTERFACE_H diff --git a/src/pimcommon/genericplugins/genericplugin.h b/src/pimcommon/genericplugins/genericplugin.h index 8c25aaf..3156816 100644 --- a/src/pimcommon/genericplugins/genericplugin.h +++ b/src/pimcommon/genericplugins/genericplugin.h @@ -1,33 +1,37 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef GENERICPLUGIN_H #define GENERICPLUGIN_H #include "abstractgenericplugin.h" #include "pimcommon_export.h" namespace PimCommon { +/** + * @brief The GenericPlugin class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT GenericPlugin : public AbstractGenericPlugin { Q_OBJECT public: explicit GenericPlugin(QObject *parent = nullptr); ~GenericPlugin(); }; } #endif // GENERICPLUGIN_H diff --git a/src/pimcommon/genericplugins/genericpluginmanager.h b/src/pimcommon/genericplugins/genericpluginmanager.h index eb4a414..bce73f8 100644 --- a/src/pimcommon/genericplugins/genericpluginmanager.h +++ b/src/pimcommon/genericplugins/genericpluginmanager.h @@ -1,72 +1,76 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef GENERICPLUGINMANAGER_H #define GENERICPLUGINMANAGER_H #include #include #include "pimcommon_export.h" #include namespace PimCommon { class GenericPluginManagerPrivate; class GenericPlugin; +/** + * @brief The GenericPluginManager class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT GenericPluginManager : public QObject { Q_OBJECT public: class GenericPluginData { public: GenericPluginData() : mEnableByDefault(false) { } QString mDescription; QString mName; QString mIdentifier; bool mEnableByDefault; }; explicit GenericPluginManager(QObject *parent = nullptr); ~GenericPluginManager(); Q_REQUIRED_RESULT bool initializePlugins(); void setServiceTypeName(const QString &serviceName); Q_REQUIRED_RESULT QString serviceTypeName() const; void setPluginName(const QString &pluginName); Q_REQUIRED_RESULT QString pluginName() const; Q_REQUIRED_RESULT QVector pluginsList() const; Q_REQUIRED_RESULT QVector pluginsDataList() const; Q_REQUIRED_RESULT QString configGroupName() const; Q_REQUIRED_RESULT QString configPrefixSettingKey() const; Q_REQUIRED_RESULT GenericPlugin *pluginFromIdentifier(const QString &id); private: GenericPluginManagerPrivate *const d; }; } #endif // GENERICPLUGINMANAGER_H diff --git a/src/pimcommon/genericplugins/pluginutil.h b/src/pimcommon/genericplugins/pluginutil.h index 02ec114..c5fa31f 100644 --- a/src/pimcommon/genericplugins/pluginutil.h +++ b/src/pimcommon/genericplugins/pluginutil.h @@ -1,55 +1,59 @@ /* Copyright (c) 2016-2019 Montel Laurent 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 */ #ifndef PLUGINUTIL_H #define PLUGINUTIL_H #include "pimcommon_export.h" #include #include #include #include namespace PimCommon { +/** + * @brief The PluginUtilData class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT PluginUtilData { public: PluginUtilData() : mEnableByDefault(false) , mHasConfigureDialog(false) { } QStringList mExtraInfo; QString mDescription; QString mIdentifier; QString mName; bool mEnableByDefault; bool mHasConfigureDialog; }; namespace PluginUtil { Q_REQUIRED_RESULT PIMCOMMON_EXPORT bool isPluginActivated(const QStringList &enabledPluginsList, const QStringList &disabledPluginsList, bool isEnabledByDefault, const QString &pluginId); Q_REQUIRED_RESULT PIMCOMMON_EXPORT QPair loadPluginSetting(const QString &groupName, const QString &prefixSettingKey); PIMCOMMON_EXPORT void savePluginSettings(const QString &groupName, const QString &prefixSettingKey, const QStringList &enabledPluginsList, const QStringList &disabledPluginsList); Q_REQUIRED_RESULT PIMCOMMON_EXPORT PimCommon::PluginUtilData createPluginMetaData(const KPluginMetaData &metaData); } } #endif // PLUGINUTIL_H diff --git a/src/pimcommon/logactivities/logactivitiesmanager.h b/src/pimcommon/logactivities/logactivitiesmanager.h index 26eeb2b..ccc1b96 100644 --- a/src/pimcommon/logactivities/logactivitiesmanager.h +++ b/src/pimcommon/logactivities/logactivitiesmanager.h @@ -1,54 +1,58 @@ /* Copyright (C) 2017-2019 Montel Laurent 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 */ #ifndef LOGACTIVITIESMANAGER_H #define LOGACTIVITIESMANAGER_H #include #include "pimcommon_export.h" namespace PimCommon { class LogActivitiesManagerPrivate; +/** + * @brief The LogActivitiesManager class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT LogActivitiesManager : public QObject { Q_OBJECT public: explicit LogActivitiesManager(QObject *parent = nullptr); ~LogActivitiesManager(); static LogActivitiesManager *self(); void appendLog(const QString &str); Q_REQUIRED_RESULT QString log() const; void clear(); void showLogActivitiesDialog(); void setEnableLogActivities(bool b); bool enableLogActivities() const; Q_SIGNALS: void logEntryAdded(const QString &entry); void logEntryCleared(); private: LogActivitiesManagerPrivate *const d; }; } #endif // LOGACTIVITIESMANAGER_H diff --git a/src/pimcommon/migration/migrateapplicationfiles.h b/src/pimcommon/migration/migrateapplicationfiles.h index 0663464..3fa0637 100644 --- a/src/pimcommon/migration/migrateapplicationfiles.h +++ b/src/pimcommon/migration/migrateapplicationfiles.h @@ -1,64 +1,68 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef MIGRATEAPPLICATIONFILE_H #define MIGRATEAPPLICATIONFILE_H #include #include #include "migratefileinfo.h" #include "pimcommon_export.h" namespace PimCommon { class MigrateApplicationFilesPrivate; +/** + * @brief The MigrateApplicationFiles class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT MigrateApplicationFiles : public QObject { Q_OBJECT public: explicit MigrateApplicationFiles(QObject *parent = nullptr); ~MigrateApplicationFiles(); Q_REQUIRED_RESULT bool start(); Q_REQUIRED_RESULT bool checkIfNecessary(); void insertMigrateInfo(const MigrateFileInfo &info); Q_REQUIRED_RESULT int version() const; void setVersion(int version); Q_REQUIRED_RESULT QString configFileName() const; void setConfigFileName(const QString &configFileName); Q_REQUIRED_RESULT int currentConfigVersion() const; void setCurrentConfigVersion(int currentConfigVersion); Q_REQUIRED_RESULT QString applicationName() const; void setApplicationName(const QString &applicationName); Q_SIGNALS: void migrateDone(); private: bool copyRecursively(const QString &srcFilePath, const QString &tgtFilePath); void finished(); void writeConfig(); void migrateFolder(const MigrateFileInfo &info); void migrateFile(const MigrateFileInfo &info); bool migrateConfig(); MigrateApplicationFilesPrivate *const d; }; } #endif // MIGRATEAPPLICATIONFILE_H diff --git a/src/pimcommon/migration/migratefileinfo.h b/src/pimcommon/migration/migratefileinfo.h index 9bbd9f1..b521d9d 100644 --- a/src/pimcommon/migration/migratefileinfo.h +++ b/src/pimcommon/migration/migratefileinfo.h @@ -1,58 +1,62 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef MIGRATEFILEINFO_H #define MIGRATEFILEINFO_H #include #include #include "pimcommon_export.h" namespace PimCommon { +/** + * @brief The MigrateFileInfo class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT MigrateFileInfo { public: MigrateFileInfo(); Q_REQUIRED_RESULT QString type() const; void setType(const QString &type); Q_REQUIRED_RESULT QString path() const; void setPath(const QString &path); Q_REQUIRED_RESULT bool folder() const; void setFolder(bool folder); Q_REQUIRED_RESULT bool isValid() const; Q_REQUIRED_RESULT int version() const; void setVersion(int version); Q_REQUIRED_RESULT QStringList filePatterns() const; void setFilePatterns(const QStringList &filePatterns); private: QStringList mFilePattern; QString mType; QString mPath; int mVersion; bool mFolder; }; } #endif // MIGRATEFILEINFO_H diff --git a/src/pimcommon/network/networkmanager.h b/src/pimcommon/network/networkmanager.h index f97a982..cc90b02 100644 --- a/src/pimcommon/network/networkmanager.h +++ b/src/pimcommon/network/networkmanager.h @@ -1,41 +1,45 @@ /* Copyright (c) 2016-2019 Montel Laurent 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 */ #ifndef NetworkManager_H #define NetworkManager_H #include #include "pimcommon_export.h" class QNetworkConfigurationManager; namespace PimCommon { +/** + * @brief The NetworkManager class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT NetworkManager : public QObject { Q_OBJECT public: explicit NetworkManager(QObject *parent = nullptr); ~NetworkManager(); static NetworkManager *self(); Q_REQUIRED_RESULT QNetworkConfigurationManager *networkConfigureManager() const; private: QNetworkConfigurationManager *mNetworkConfigureManager = nullptr; }; } #endif // NetworkManager_H diff --git a/src/pimcommon/shareserviceurl/shareserviceurlmanager.h b/src/pimcommon/shareserviceurl/shareserviceurlmanager.h index 2b28e24..3b98d6f 100644 --- a/src/pimcommon/shareserviceurl/shareserviceurlmanager.h +++ b/src/pimcommon/shareserviceurl/shareserviceurlmanager.h @@ -1,64 +1,68 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef SHARESERVICEURLMANAGER_H #define SHARESERVICEURLMANAGER_H #include #include "pimcommon_export.h" #include class KActionMenu; class QAction; namespace PimCommon { class ShareServiceUrlManagerPrivate; +/** + * @brief The ShareServiceUrlManager class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT ShareServiceUrlManager : public QObject { Q_OBJECT public: explicit ShareServiceUrlManager(QObject *parent = nullptr); ~ShareServiceUrlManager(); enum ServiceType { Fbook = 0, Twitter, MailTo, LinkedIn, Evernote, Pocket, LiveJournal, ServiceEndType }; Q_REQUIRED_RESULT KActionMenu *menu() const; Q_REQUIRED_RESULT QUrl generateServiceUrl(const QString &link, const QString &title, ServiceType type); void openUrl(const QUrl &url); public Q_SLOTS: void slotSelectServiceUrl(QAction *act); Q_SIGNALS: void serviceUrlSelected(PimCommon::ShareServiceUrlManager::ServiceType type); private: ShareServiceUrlManagerPrivate *const d; }; } Q_DECLARE_METATYPE(PimCommon::ShareServiceUrlManager::ServiceType) #endif // SHARESERVICEURLMANAGER_H diff --git a/src/pimcommon/templatewidgets/templatelistwidget.h b/src/pimcommon/templatewidgets/templatelistwidget.h index add9433..72e2f9f 100644 --- a/src/pimcommon/templatewidgets/templatelistwidget.h +++ b/src/pimcommon/templatewidgets/templatelistwidget.h @@ -1,71 +1,75 @@ /* Copyright (c) 2013-2019 Montel Laurent 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 */ #ifndef TEMPLATELISTWIDGET_H #define TEMPLATELISTWIDGET_H #include "pimcommon_export.h" #include namespace PimCommon { class TemplateListWidgetPrivate; struct defaultTemplate { QString name; QString text; }; +/** + * @brief The TemplateListWidget class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT TemplateListWidget : public QListWidget { Q_OBJECT public: explicit TemplateListWidget(const QString &configName, QWidget *parent = nullptr); ~TemplateListWidget() override; //Need to load template in specific class to allow to use correct defaultTemplates function void loadTemplates(); Q_REQUIRED_RESULT virtual QVector defaultTemplates(); Q_REQUIRED_RESULT virtual bool addNewTemplate(QString &templateName, QString &templateScript); Q_REQUIRED_RESULT virtual bool modifyTemplate(QString &templateName, QString &templateScript, bool defaultTemplate); void setKNewStuffConfigFile(const QString &configName); void addDefaultTemplate(const QString &templateName, const QString &templateScript); protected: QStringList mimeTypes() const override; QMimeData *mimeData(const QList items) const override; void dropEvent(QDropEvent *event) override; enum TemplateData { Text = Qt::UserRole + 1, DefaultTemplate = Qt::UserRole + 2 }; Q_SIGNALS: void insertTemplate(const QString &); void insertNewTemplate(const QString &); private: friend class TemplateListWidgetPrivate; TemplateListWidgetPrivate *const d; }; } Q_DECLARE_TYPEINFO(PimCommon::defaultTemplate, Q_MOVABLE_TYPE); #endif // TEMPLATELISTWIDGET_H diff --git a/src/pimcommon/templatewidgets/templatemanager.h b/src/pimcommon/templatewidgets/templatemanager.h index 243fbd7..304941d 100644 --- a/src/pimcommon/templatewidgets/templatemanager.h +++ b/src/pimcommon/templatewidgets/templatemanager.h @@ -1,55 +1,59 @@ /* Copyright (c) 2013-2019 Montel Laurent 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 */ #ifndef TEMPLATEMANAGER_H #define TEMPLATEMANAGER_H #include "pimcommon_export.h" #include namespace PimCommon { class TemplateListWidget; struct TemplateInfo { QString name; QString script; Q_REQUIRED_RESULT bool isValid() const { return !name.isEmpty() && !script.isEmpty(); } void debug() const; }; class TemplateManagerPrivate; +/** + * @brief The TemplateManager class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT TemplateManager : public QObject { Q_OBJECT public: explicit TemplateManager(const QString &relativeTemplateDir, PimCommon::TemplateListWidget *sieveTemplateWidget); ~TemplateManager(); private: void slotDirectoryChanged(); void loadTemplates(bool init = false); void initTemplatesDirectories(const QString &templatesRelativePath); TemplateInfo loadTemplate(const QString &themePath, const QString &defaultDesktopFileName); TemplateManagerPrivate *const d; }; } #endif // TEMPLATEMANAGER_H diff --git a/src/pimcommon/translator/translatorwidget.h b/src/pimcommon/translator/translatorwidget.h index 3af831b..b78ba03 100644 --- a/src/pimcommon/translator/translatorwidget.h +++ b/src/pimcommon/translator/translatorwidget.h @@ -1,97 +1,101 @@ /* Copyright (c) 2012-2019 Montel Laurent 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 */ #ifndef TRANSLATORWIDGET_H #define TRANSLATORWIDGET_H #include "pimcommon_export.h" #include "kpimtextedit/plaintexteditor.h" #include #include "kpimtextedit/plaintexteditorwidget.h" namespace PimCommon { class TranslatorResultTextEdit : public KPIMTextEdit::PlainTextEditor { Q_OBJECT public: explicit TranslatorResultTextEdit(QWidget *parent = nullptr); void setResultFailed(bool failed); protected: void paintEvent(QPaintEvent *event) override; private: bool mResultFailed; }; +/** + * @brief The TranslatorTextEdit class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT TranslatorTextEdit : public KPIMTextEdit::PlainTextEditor { Q_OBJECT public: explicit TranslatorTextEdit(QWidget *parent = nullptr); Q_SIGNALS: void translateText(); protected: void dropEvent(QDropEvent *) override; }; class PIMCOMMON_EXPORT TranslatorWidget : public QWidget { Q_OBJECT public: explicit TranslatorWidget(QWidget *parent = nullptr); explicit TranslatorWidget(const QString &text, QWidget *parent = nullptr); ~TranslatorWidget() override; void setTextToTranslate(const QString &); void writeConfig(); void readConfig(); void setStandalone(bool b); public Q_SLOTS: void slotTranslate(); void slotCloseWidget(); private Q_SLOTS: void slotFromLanguageChanged(int, bool initialize = false); void slotTextChanged(); void slotInvertLanguage(); void slotClear(); void slotTranslateDone(); void slotTranslateFailed(bool result, const QString &message); void slotDebug(); void slotConfigChanged(); protected: bool event(QEvent *e) override; Q_SIGNALS: void toolsWasClosed(); private: void init(); void initLanguage(); class TranslatorWidgetPrivate; TranslatorWidgetPrivate *const d; }; } #endif /* TRANSLATORWIDGET_H */ diff --git a/src/pimcommon/util/networkutil.h b/src/pimcommon/util/networkutil.h index 2cfc23a..318992a 100644 --- a/src/pimcommon/util/networkutil.h +++ b/src/pimcommon/util/networkutil.h @@ -1,38 +1,42 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef NETWORKUTIL_H #define NETWORKUTIL_H #include "pimcommon_export.h" namespace PimCommon { +/** + * @brief The NetworkUtil class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT NetworkUtil { public: static NetworkUtil *self(); NetworkUtil(); bool lowBandwidth() const; void setLowBandwidth(bool lowBandwidth); private: bool mLowBandwidth; }; } #endif // NETWORKUTIL_H diff --git a/src/pimcommon/widgets/customtreeview.h b/src/pimcommon/widgets/customtreeview.h index eb7459d..24289a0 100644 --- a/src/pimcommon/widgets/customtreeview.h +++ b/src/pimcommon/widgets/customtreeview.h @@ -1,56 +1,60 @@ /* Copyright (c) 2013-2019 Montel Laurent 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 */ #ifndef CUSTOMTREEVIEW_H #define CUSTOMTREEVIEW_H #include #include "pimcommon_export.h" class QPaintEvent; class QEvent; namespace PimCommon { +/** + * @brief The CustomTreeView class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT CustomTreeView : public QTreeWidget { Q_OBJECT public: explicit CustomTreeView(QWidget *parent = nullptr); ~CustomTreeView() override; void setDefaultText(const QString &text); Q_REQUIRED_RESULT bool showDefaultText() const; void setShowDefaultText(bool b); private: void generalPaletteChanged(); void generalFontChanged(); protected: void paintEvent(QPaintEvent *event) override; void changeEvent(QEvent *event) override; protected: bool mShowDefaultText; private: QColor mTextColor; QString mDefaultText; }; } #endif diff --git a/src/pimcommon/widgets/kactionmenuchangecase.h b/src/pimcommon/widgets/kactionmenuchangecase.h index 9b02f4f..07d6c9a 100644 --- a/src/pimcommon/widgets/kactionmenuchangecase.h +++ b/src/pimcommon/widgets/kactionmenuchangecase.h @@ -1,56 +1,60 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef KACTIONMENUCHANGECASE_H #define KACTIONMENUCHANGECASE_H #include #include "pimcommon_export.h" class QAction; class KActionCollection; namespace PimCommon { class KActionMenuChangeCasePrivate; +/** + * @brief The KActionMenuChangeCase class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT KActionMenuChangeCase : public KActionMenu { Q_OBJECT public: explicit KActionMenuChangeCase(QObject *parent = nullptr); ~KActionMenuChangeCase(); Q_REQUIRED_RESULT QAction *upperCaseAction() const; Q_REQUIRED_RESULT QAction *sentenceCaseAction() const; Q_REQUIRED_RESULT QAction *lowerCaseAction() const; Q_REQUIRED_RESULT QAction *reverseCaseAction() const; void appendInActionCollection(KActionCollection *ac); Q_SIGNALS: void upperCase(); void sentenceCase(); void lowerCase(); void reverseCase(); private: KActionMenuChangeCasePrivate *const d; }; } #endif // KACTIONMENUCHANGECASE_H diff --git a/src/pimcommon/widgets/kpimprintpreviewdialog.h b/src/pimcommon/widgets/kpimprintpreviewdialog.h index a3a1202..aef3672 100644 --- a/src/pimcommon/widgets/kpimprintpreviewdialog.h +++ b/src/pimcommon/widgets/kpimprintpreviewdialog.h @@ -1,38 +1,42 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef KPIMPRINTPREVIEWDIALOG_H #define KPIMPRINTPREVIEWDIALOG_H #include #include "pimcommon_export.h" namespace PimCommon { +/** + * @brief The KPimPrintPreviewDialog class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT KPimPrintPreviewDialog : public QPrintPreviewDialog { public: explicit KPimPrintPreviewDialog(QWidget *parent = nullptr); explicit KPimPrintPreviewDialog(QPrinter *printer, QWidget *parent = nullptr); ~KPimPrintPreviewDialog(); private: void readConfig(); void writeConfig(); }; } #endif // KPIMPRINTPREVIEWDIALOG_H diff --git a/src/pimcommon/widgets/lineeditwithcompleterng.h b/src/pimcommon/widgets/lineeditwithcompleterng.h index cf7d052..76b80e4 100644 --- a/src/pimcommon/widgets/lineeditwithcompleterng.h +++ b/src/pimcommon/widgets/lineeditwithcompleterng.h @@ -1,46 +1,50 @@ /* Copyright (C) 2017-2019 Montel Laurent 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 */ #ifndef LINEEDITWITHCOMPLETERNG_H #define LINEEDITWITHCOMPLETERNG_H #include #include "pimcommon_export.h" class QStringListModel; namespace PimCommon { +/** + * @brief The LineEditWithCompleterNg class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT LineEditWithCompleterNg : public QLineEdit { Q_OBJECT public: explicit LineEditWithCompleterNg(QWidget *parent = nullptr); ~LineEditWithCompleterNg() override; void addCompletionItem(const QString &str); protected: void contextMenuEvent(QContextMenuEvent *e) override; public Q_SLOTS: void slotClearHistory(); private: QStringListModel *mCompleterListModel = nullptr; QStringList mListCompetion; }; } #endif // LINEEDITWITHCOMPLETER_H diff --git a/src/pimcommon/widgets/purposemenuwidget.h b/src/pimcommon/widgets/purposemenuwidget.h index 8431e72..2946f48 100644 --- a/src/pimcommon/widgets/purposemenuwidget.h +++ b/src/pimcommon/widgets/purposemenuwidget.h @@ -1,48 +1,52 @@ /* Copyright (c) 2018-2019 Montel Laurent 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 */ #ifndef PURPOSEMENUWIDGET_H #define PURPOSEMENUWIDGET_H #include #include "pimcommon_export.h" namespace Purpose { class Menu; } class QMenu; class QTemporaryFile; namespace PimCommon { +/** + * @brief The PurposeMenuWidget class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT PurposeMenuWidget : public QObject { Q_OBJECT public: explicit PurposeMenuWidget(QWidget *parentWidget, QObject *parent = nullptr); ~PurposeMenuWidget() override; virtual QByteArray text() = 0; QMenu *menu() const; private: void slotInitializeShareMenu(); void slotShareActionFinished(const QJsonObject &output, int error, const QString &message); Purpose::Menu *mShareMenu = nullptr; QTemporaryFile *mTemporaryShareFile = nullptr; QWidget *mParentWidget = nullptr; }; } #endif // PURPOSEMENUWIDGET_H diff --git a/src/pimcommon/widgets/renamefiledialog.h b/src/pimcommon/widgets/renamefiledialog.h index 3295f6c..870a1e8 100644 --- a/src/pimcommon/widgets/renamefiledialog.h +++ b/src/pimcommon/widgets/renamefiledialog.h @@ -1,69 +1,73 @@ /* * Copyright (c) 2011-2019 Montel Laurent * * 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. * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of * the Qt library by Trolltech AS, Norway (or with modified versions * of Qt that use the same license as Qt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than * Qt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. */ #ifndef RENAMEFILEDIALOG_H #define RENAMEFILEDIALOG_H #include #include #include "pimcommon_export.h" namespace PimCommon { class RenameFileDialogPrivate; +/** + * @brief The RenameFileDialog class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT RenameFileDialog : public QDialog { Q_OBJECT public: explicit RenameFileDialog(const QUrl &url, bool multiFiles, QWidget *parent); ~RenameFileDialog(); enum RenameFileDialogResult { RENAMEFILE_IGNORE = 0, RENAMEFILE_IGNOREALL = 1, RENAMEFILE_RENAME = 2, RENAMEFILE_OVERWRITE = 3, RENAMEFILE_OVERWRITEALL = 4 }; Q_REQUIRED_RESULT QUrl newName() const; private: void slotOverwritePressed(); void slotIgnorePressed(); void slotRenamePressed(); void slotApplyAllPressed(); void slotSuggestNewNamePressed(); //@cond PRIVATE class RenameFileDialogPrivate; RenameFileDialogPrivate *const d; }; } #endif /* RENAMEFILEDIALOG_H */ diff --git a/src/pimcommon/widgets/simplestringlisteditor.h b/src/pimcommon/widgets/simplestringlisteditor.h index 51fcd84..5f67f3a 100644 --- a/src/pimcommon/widgets/simplestringlisteditor.h +++ b/src/pimcommon/widgets/simplestringlisteditor.h @@ -1,119 +1,123 @@ /* -*- c++ -*- simplestringlisteditor.h This file is part of KMail, the KDE mail client. Copyright (c) 2001 Marc Mutz Copyright (C) 2013-2019 Laurent Montel KMail 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. KMail 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 In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of the Qt library by Trolltech AS, Norway (or with modified versions of Qt that use the same license as Qt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than Qt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ #ifndef SIMPLESTRINGLISTEDITOR_H #define SIMPLESTRINGLISTEDITOR_H #include #include #include "pimcommon_export.h" class QListWidget; class QListWidgetItem; // // // SimpleStringListEditor (a listbox with "add..." and "remove" buttons) // // namespace PimCommon { class SimpleStringListEditorPrivate; +/** + * @brief The SimpleStringListEditor class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT SimpleStringListEditor : public QWidget { Q_OBJECT public: enum ButtonCode { None = 0x00, Add = 0x01, Remove = 0x02, Modify = 0x04, Up = 0x08, Down = 0x10, All = Add | Remove | Modify | Up | Down, Unsorted = Add | Remove | Modify }; /** Constructor. Populates the list with @p strings. */ explicit SimpleStringListEditor(QWidget *parent = nullptr, ButtonCode buttons = Unsorted, const QString &addLabel = QString(), const QString &removeLabel = QString(), const QString &modifyLabel = QString(), const QString &addDialogLabel = QString()); ~SimpleStringListEditor() override; /** Sets the list of strings displayed to @p strings */ void setStringList(const QStringList &strings); /** Adds @p strings to the list of displayed strings */ void appendStringList(const QStringList &strings); /** Retrieves the current list of strings */ Q_REQUIRED_RESULT QStringList stringList() const; /** Sets the text of button @p button to @p text */ void setButtonText(ButtonCode button, const QString &text); void setUpDownAutoRepeat(bool b); Q_REQUIRED_RESULT QSize sizeHint() const override; virtual void addNewEntry(); Q_REQUIRED_RESULT virtual QString modifyEntry(const QString &text); void setAddDialogLabel(const QString &addDialogLabel); Q_SIGNALS: /** Connected slots can alter the argument to be added or set the argument to QString() to suppress adding. */ void aboutToAdd(QString &); void changed(); protected: void insertNewEntry(const QString &newEntry); protected Q_SLOTS: void slotAdd(); void slotRemove(); void slotModify(); void slotUp(); void slotDown(); void slotSelectionChanged(); private: void slotContextMenu(const QPoint &); bool containsString(const QString &str); QList selectedItems() const; SimpleStringListEditorPrivate *const d; }; } #endif // SIMPLESTRINGLISTEDITOR_H diff --git a/src/pimcommon/widgets/spellchecklineedit.h b/src/pimcommon/widgets/spellchecklineedit.h index d3af871..7b431c3 100644 --- a/src/pimcommon/widgets/spellchecklineedit.h +++ b/src/pimcommon/widgets/spellchecklineedit.h @@ -1,69 +1,73 @@ /* * Copyright (c) 2011-2019 Montel Laurent * * 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. * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of * the Qt library by Trolltech AS, Norway (or with modified versions * of Qt that use the same license as Qt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than * Qt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. */ #ifndef SpellCheckLineEdit_H #define SpellCheckLineEdit_H #include "pimcommon_export.h" #include "kpimtextedit/richtexteditor.h" class QMimeData; namespace PimCommon { +/** + * @brief The SpellCheckLineEdit class + * @author Laurent Montel + */ class PIMCOMMON_EXPORT SpellCheckLineEdit : public KPIMTextEdit::RichTextEditor { Q_OBJECT public: /** * Constructs a SpellCheckLineEdit object. * @param parent of widget * @param configFile config file name for spell checking */ explicit SpellCheckLineEdit(QWidget *parent, const QString &configFile); /** * Destructor */ ~SpellCheckLineEdit() override; protected: QSize sizeHint() const override; QSize minimumSizeHint() const override; void keyPressEvent(QKeyEvent *) override; void insertFromMimeData(const QMimeData *source) override; Q_SIGNALS: /** * Emitted when the user uses the up arrow in the first line. The application * should then put the focus on the widget above the text edit. */ void focusUp(); void focusDown(); }; } #endif /* SpellCheckLineEdit_H */ diff --git a/src/pimcommonakonadi/acl/imapaclattribute.h b/src/pimcommonakonadi/acl/imapaclattribute.h index a9ba8fc..e38f3b8 100644 --- a/src/pimcommonakonadi/acl/imapaclattribute.h +++ b/src/pimcommonakonadi/acl/imapaclattribute.h @@ -1,64 +1,67 @@ /* Copyright (C) 2009 Kevin Ottens This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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. */ // THIS file should not exist and is only a copy of // kdepim-runtime/resources/shared/singlefileresource // Any improvements should be done at kdepim-runtime and // than afterwards copy the new version #ifndef PIMCOMMON_IMAPACLATTRIBUTE_H #define PIMCOMMON_IMAPACLATTRIBUTE_H #include "pimcommonakonadi_export.h" #include #include #include namespace PimCommon { class ImapAclAttributePrivate; +/** + * @brief The ImapAclAttribute class + */ class PIMCOMMONAKONADI_EXPORT ImapAclAttribute : public Akonadi::Attribute { public: ImapAclAttribute(); ImapAclAttribute(const QMap &rights, const QMap &oldRights); ~ImapAclAttribute() override; void setRights(const QMap &rights); QMap rights() const; QMap oldRights() const; void setMyRights(KIMAP::Acl::Rights rights); KIMAP::Acl::Rights myRights() const; QByteArray type() const override; ImapAclAttribute *clone() const override; QByteArray serialized() const override; void deserialize(const QByteArray &data) override; bool operator==(const ImapAclAttribute &other) const; private: ImapAclAttributePrivate *const d; QMap mRights; QMap mOldRights; KIMAP::Acl::Rights mMyRights; }; } #endif diff --git a/src/pimcommonakonadi/collectionpage/collectiontypeutil.h b/src/pimcommonakonadi/collectionpage/collectiontypeutil.h index 5c5b111..0fcbeb5 100644 --- a/src/pimcommonakonadi/collectionpage/collectiontypeutil.h +++ b/src/pimcommonakonadi/collectionpage/collectiontypeutil.h @@ -1,67 +1,71 @@ /* Copyright (c) 2014-2019 Montel Laurent This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 COLLECTIONTYPEUTIL_H #define COLLECTIONTYPEUTIL_H #include "pimcommonakonadi_export.h" #include #include namespace PimCommon { +/** + * @brief The CollectionTypeUtil class + * @author Laurent Montel + */ class PIMCOMMONAKONADI_EXPORT CollectionTypeUtil { public: CollectionTypeUtil(); ~CollectionTypeUtil(); static QByteArray kolabFolderType(); static QByteArray kolabIncidencesFor(); static QByteArray kolabSharedSeen(); enum FolderContentsType { ContentsTypeMail = 0, ContentsTypeCalendar, ContentsTypeContact, ContentsTypeNote, ContentsTypeTask, ContentsTypeJournal, ContentsTypeConfiguration, ContentsTypeFreebusy, ContentsTypeFile, ContentsTypeLast = ContentsTypeFile }; enum IncidencesFor { IncForNobody, IncForAdmins, IncForReaders }; Q_REQUIRED_RESULT CollectionTypeUtil::IncidencesFor incidencesForFromString(const QString &string); Q_REQUIRED_RESULT CollectionTypeUtil::FolderContentsType typeFromKolabName(const QByteArray &name); Q_REQUIRED_RESULT QString folderContentDescription(CollectionTypeUtil::FolderContentsType type); Q_REQUIRED_RESULT QByteArray kolabNameFromType(CollectionTypeUtil::FolderContentsType type); Q_REQUIRED_RESULT QString incidencesForToString(CollectionTypeUtil::IncidencesFor type); Q_REQUIRED_RESULT CollectionTypeUtil::FolderContentsType contentsTypeFromString(const QString &type); Q_REQUIRED_RESULT QString typeNameFromKolabType(const QByteArray &type); Q_REQUIRED_RESULT QString iconNameFromContentsType(CollectionTypeUtil::FolderContentsType type); }; } #endif // COLLECTIONTYPEUTIL_H diff --git a/src/pimcommonakonadi/collectionpage/contenttypewidget.h b/src/pimcommonakonadi/collectionpage/contenttypewidget.h index dee62c2..7fcfd24 100644 --- a/src/pimcommonakonadi/collectionpage/contenttypewidget.h +++ b/src/pimcommonakonadi/collectionpage/contenttypewidget.h @@ -1,48 +1,52 @@ /* Copyright (c) 2014-2019 Montel Laurent This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 CONTENTTYPEWIDGET_H #define CONTENTTYPEWIDGET_H #include #include "pimcommonakonadi_export.h" namespace PimCommon { class ContentTypeWidgetPrivate; +/** + * @brief The ContentTypeWidget class + * @author Laurent Montel + */ class PIMCOMMONAKONADI_EXPORT ContentTypeWidget : public QWidget { Q_OBJECT public: explicit ContentTypeWidget(QWidget *parent = nullptr); ~ContentTypeWidget(); Q_REQUIRED_RESULT int currentIndex() const; void setCurrentIndex(int index); void setCurrentItem(const QString &name); Q_REQUIRED_RESULT QString currentText() const; Q_SIGNALS: void activated(int index); private: ContentTypeWidgetPrivate *const d; }; } #endif // CONTENTTYPEWIDGET_H diff --git a/src/pimcommonakonadi/collectionpage/incidencesforwidget.h b/src/pimcommonakonadi/collectionpage/incidencesforwidget.h index c909e56..055d847 100644 --- a/src/pimcommonakonadi/collectionpage/incidencesforwidget.h +++ b/src/pimcommonakonadi/collectionpage/incidencesforwidget.h @@ -1,47 +1,51 @@ /* Copyright (c) 2014-2019 Montel Laurent This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 INCIDENCESFORWIDGET_H #define INCIDENCESFORWIDGET_H #include "pimcommonakonadi_export.h" #include namespace PimCommon { class IncidencesForWidgetPrivate; +/** + * @brief The IncidencesForWidget class + * @author Laurent Montel + */ class PIMCOMMONAKONADI_EXPORT IncidencesForWidget : public QWidget { Q_OBJECT public: explicit IncidencesForWidget(QWidget *parent = nullptr); ~IncidencesForWidget(); Q_REQUIRED_RESULT int currentIndex() const; void setCurrentIndex(int index); Q_SIGNALS: void currentIndexChanged(int value); private: IncidencesForWidgetPrivate *const d; }; } #endif // INCIDENCESFORWIDGET_H diff --git a/src/pimcommonakonadi/folderdialog/checkedcollectionwidget.h b/src/pimcommonakonadi/folderdialog/checkedcollectionwidget.h index 869a66f..b94a3b0 100644 --- a/src/pimcommonakonadi/folderdialog/checkedcollectionwidget.h +++ b/src/pimcommonakonadi/folderdialog/checkedcollectionwidget.h @@ -1,61 +1,65 @@ /* Copyright (c) 2013-2019 Montel Laurent 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 */ #ifndef CHECKEDCOLLECTIONWIDGET_H #define CHECKEDCOLLECTIONWIDGET_H #include #include "pimcommonakonadi_export.h" class QItemSelectionModel; class QTreeView; class KCheckableProxyModel; namespace Akonadi { class EntityTreeModel; class Collection; } namespace PimCommon { class CheckedCollectionWidgetPrivate; +/** + * @brief The CheckedCollectionWidget class + * @author Laurent Montel + */ class PIMCOMMONAKONADI_EXPORT CheckedCollectionWidget : public QWidget { Q_OBJECT public: explicit CheckedCollectionWidget(const QString &mimetype, QWidget *parent = nullptr); ~CheckedCollectionWidget(); Q_REQUIRED_RESULT Akonadi::EntityTreeModel *entityTreeModel() const; Q_REQUIRED_RESULT QTreeView *folderTreeView() const; Q_REQUIRED_RESULT QItemSelectionModel *selectionModel() const; Q_REQUIRED_RESULT KCheckableProxyModel *checkableProxy() const; Q_SIGNALS: void collectionAdded(const Akonadi::Collection &, const Akonadi::Collection &); void collectionRemoved(const Akonadi::Collection &); private: void slotSetCollectionFilter(const QString &filter); CheckedCollectionWidgetPrivate *const d; }; } #endif // CHECKEDCOLLECTIONWIDGET_H diff --git a/src/pimcommonakonadi/folderdialog/selectmulticollectiondialog.h b/src/pimcommonakonadi/folderdialog/selectmulticollectiondialog.h index 6a72c1d..2e15c21 100644 --- a/src/pimcommonakonadi/folderdialog/selectmulticollectiondialog.h +++ b/src/pimcommonakonadi/folderdialog/selectmulticollectiondialog.h @@ -1,45 +1,49 @@ /* Copyright (c) 2013-2019 Montel Laurent 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 */ #ifndef SELECTMULTICOLLECTIONDIALOG_H #define SELECTMULTICOLLECTIONDIALOG_H #include "pimcommonakonadi_export.h" #include #include namespace PimCommon { class SelectMultiCollectionDialogPrivate; +/** + * @brief The SelectMultiCollectionDialog class + * @author Laurent Montel + */ class PIMCOMMONAKONADI_EXPORT SelectMultiCollectionDialog : public QDialog { Q_OBJECT public: explicit SelectMultiCollectionDialog(const QString &mimetype, const QList &selectedCollection, QWidget *parent = nullptr); explicit SelectMultiCollectionDialog(const QString &mimetype, QWidget *parent = nullptr); ~SelectMultiCollectionDialog(); Q_REQUIRED_RESULT QVector selectedCollection() const; private: void initialize(const QString &mimetype, const QList &selectedCollection = QList()); void writeConfig(); void readConfig(); SelectMultiCollectionDialogPrivate *const d; }; } #endif // SELECTMULTICOLLECTIONDIALOG_H diff --git a/src/pimcommonakonadi/genericplugins/genericplugininterface.h b/src/pimcommonakonadi/genericplugins/genericplugininterface.h index f124153..e7ef590 100644 --- a/src/pimcommonakonadi/genericplugins/genericplugininterface.h +++ b/src/pimcommonakonadi/genericplugins/genericplugininterface.h @@ -1,63 +1,67 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef GENERICPLUGININTERFACE_H #define GENERICPLUGININTERFACE_H #include #include #include "pimcommonakonadi_export.h" #include namespace PimCommon { class GenericPluginInterfacePrivate; +/** + * @brief The GenericPluginInterface class + * @author Laurent Montel + */ class PIMCOMMONAKONADI_EXPORT GenericPluginInterface : public AbstractGenericPluginInterface { Q_OBJECT public: explicit GenericPluginInterface(QObject *parent = nullptr); ~GenericPluginInterface(); enum RequireType { None = 0, CurrentItems = 1, Items = 2, CurrentCollection = 3, Collections = 4 }; Q_ENUMS(RequireType) Q_DECLARE_FLAGS(RequireTypes, RequireType) void setActionTypes(const QVector &type); void addActionType(ActionType type); Q_REQUIRED_RESULT QVector actionTypes() const; virtual void setCurrentItems(const Akonadi::Item::List &items); virtual void setItems(const Akonadi::Item::List &items); virtual void setCurrentCollection(const Akonadi::Collection &col); virtual void setCollections(const Akonadi::Collection::List &cols); virtual GenericPluginInterface::RequireTypes requires() const; virtual void updateActions(int numberOfSelectedItems, int numberOfSelectedCollections); private: GenericPluginInterfacePrivate *const d; }; } Q_DECLARE_TYPEINFO(PimCommon::ActionType, Q_MOVABLE_TYPE); #endif // GENERICPLUGININTERFACE_H diff --git a/src/pimcommonakonadi/genericplugins/plugininterface.h b/src/pimcommonakonadi/genericplugins/plugininterface.h index 6cca495..9793c86 100644 --- a/src/pimcommonakonadi/genericplugins/plugininterface.h +++ b/src/pimcommonakonadi/genericplugins/plugininterface.h @@ -1,66 +1,70 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef PLUGININTERFACE_H #define PLUGININTERFACE_H #include #include #include #include "pimcommonakonadi_export.h" class KActionCollection; class QAction; class KXMLGUIClient; namespace PimCommon { class PluginInterfacePrivate; +/** + * @brief The PluginInterface class + * @author Laurent Montel + */ class PIMCOMMONAKONADI_EXPORT PluginInterface : public QObject { Q_OBJECT public: explicit PluginInterface(QObject *parent = nullptr); ~PluginInterface(); void setParentWidget(QWidget *widget); QHash > actionsType(); void createPluginInterface(); void setPluginName(const QString &name); void setServiceTypeName(const QString &name); void initializePlugins(); virtual void initializeInterfaceRequires(AbstractGenericPluginInterface *interface); static QString actionXmlExtension(PimCommon::ActionType::Type type); void initializePluginActions(const QString &prefix, KXMLGUIClient *guiClient); void updateActions(int numberOfSelectedItems, int numberOfSelectedCollections); void setActionCollection(KActionCollection *ac); Q_REQUIRED_RESULT QVector pluginsDataList() const; Q_REQUIRED_RESULT QString configGroupName() const; Q_REQUIRED_RESULT QString configPrefixSettingKey() const; PimCommon::GenericPlugin *pluginFromIdentifier(const QString &id); private Q_SLOTS: void slotPluginActivated(AbstractGenericPluginInterface *interface); private: PluginInterfacePrivate *const d; }; } #endif // PLUGININTERFACE_H diff --git a/src/pimcommonakonadi/job/fetchrecursivecollectionsjob.h b/src/pimcommonakonadi/job/fetchrecursivecollectionsjob.h index c78a4ec..684c70d 100644 --- a/src/pimcommonakonadi/job/fetchrecursivecollectionsjob.h +++ b/src/pimcommonakonadi/job/fetchrecursivecollectionsjob.h @@ -1,50 +1,54 @@ /* Copyright (c) 2015-2019 Montel Laurent This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 FETCHRECURSIVECOLLECTIONSJOB_H #define FETCHRECURSIVECOLLECTIONSJOB_H #include #include #include "pimcommonakonadi_export.h" class KJob; namespace PimCommon { class FetchRecursiveCollectionsJobPrivate; +/** + * @brief The FetchRecursiveCollectionsJob class + * @author Laurent Montel + */ class PIMCOMMONAKONADI_EXPORT FetchRecursiveCollectionsJob : public QObject { Q_OBJECT public: explicit FetchRecursiveCollectionsJob(QObject *parent = nullptr); ~FetchRecursiveCollectionsJob(); void setTopCollection(const Akonadi::Collection &col); void start(); Q_SIGNALS: void fetchCollectionFinished(const Akonadi::Collection::List &list); void fetchCollectionFailed(); private: void slotInitialCollectionFetchingDone(KJob *job); FetchRecursiveCollectionsJobPrivate *const d; }; } #endif // FETCHRECURSIVECOLLECTIONSJOB_H diff --git a/src/pimcommonakonadi/manageserversidesubscription/manageserversidesubscriptionjob.h b/src/pimcommonakonadi/manageserversidesubscription/manageserversidesubscriptionjob.h index a96dc28..0621c19 100644 --- a/src/pimcommonakonadi/manageserversidesubscription/manageserversidesubscriptionjob.h +++ b/src/pimcommonakonadi/manageserversidesubscription/manageserversidesubscriptionjob.h @@ -1,48 +1,52 @@ /* Copyright (c) 2014-2019 Montel Laurent 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 */ #ifndef MANAGESERVERSIDESUBSCRIPTIONJOB_H #define MANAGESERVERSIDESUBSCRIPTIONJOB_H #include #include "pimcommonakonadi_export.h" #include #include class QDBusPendingCallWatcher; namespace PimCommon { class ManageServerSideSubscriptionJobPrivate; +/** + * @brief The ManageServerSideSubscriptionJob class + * @author Laurent Montel + */ class PIMCOMMONAKONADI_EXPORT ManageServerSideSubscriptionJob : public QObject { Q_OBJECT public: explicit ManageServerSideSubscriptionJob(QObject *parent = nullptr); ~ManageServerSideSubscriptionJob(); void start(); void setCurrentCollection(const Akonadi::Collection &col); void setParentWidget(QWidget *parentWidget); private: void slotConfigureSubscriptionFinished(QDBusPendingCallWatcher *watcher); ManageServerSideSubscriptionJobPrivate *const d; }; } #endif // MANAGESERVERSIDESUBSCRIPTIONJOB_H diff --git a/src/pimcommonakonadi/util/createresource.h b/src/pimcommonakonadi/util/createresource.h index 4a5d98e..488b95d 100644 --- a/src/pimcommonakonadi/util/createresource.h +++ b/src/pimcommonakonadi/util/createresource.h @@ -1,43 +1,47 @@ /* Copyright (c) 2012-2019 Montel Laurent 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 */ #ifndef PIMCOMMONCREATERESOURCE_H #define PIMCOMMONCREATERESOURCE_H #include "pimcommonakonadi_export.h" #include #include #include namespace PimCommon { +/** + * @brief The CreateResource class + * @author Laurent Montel + */ class PIMCOMMONAKONADI_EXPORT CreateResource : public QObject { Q_OBJECT public: explicit CreateResource(QObject *parent = nullptr); ~CreateResource(); Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap &settings, bool synchronizeTree = false); Q_SIGNALS: void createResourceInfo(const QString &); void createResourceError(const QString &); }; } #endif // CREATERESOURCE_H diff --git a/src/pimcommonakonadi/util/imapresourcecapabilitiesmanager.h b/src/pimcommonakonadi/util/imapresourcecapabilitiesmanager.h index f7f5181..8536386 100644 --- a/src/pimcommonakonadi/util/imapresourcecapabilitiesmanager.h +++ b/src/pimcommonakonadi/util/imapresourcecapabilitiesmanager.h @@ -1,51 +1,55 @@ /* Copyright (c) 2015-2019 Montel Laurent 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 */ #ifndef IMAPRESOURCECAPABILITIESMANAGER_H #define IMAPRESOURCECAPABILITIESMANAGER_H #include #include #include "pimcommonakonadi_export.h" class QDBusPendingCallWatcher; namespace Akonadi { class AgentInstance; } namespace PimCommon { +/** + * @brief The ImapResourceCapabilitiesManager class + * @author Laurent Montel + */ class PIMCOMMONAKONADI_EXPORT ImapResourceCapabilitiesManager : public QObject { Q_OBJECT public: explicit ImapResourceCapabilitiesManager(QObject *parent = nullptr); ~ImapResourceCapabilitiesManager(); Q_REQUIRED_RESULT bool hasAnnotationSupport(const QString &identifier) const; private: void slotInstanceAdded(const Akonadi::AgentInstance &instance); void slotInstanceRemoved(const Akonadi::AgentInstance &instance); void slotCapabilities(QDBusPendingCallWatcher *watcher); void init(); void searchCapabilities(const QString &identifier); QHash mImapResource; }; } #endif // IMAPRESOURCECAPABILITIESMANAGER_H