diff --git a/aboutdialog/aboutdialog.cpp b/aboutdialog/aboutdialog.cpp index 795637a..b34ad64 100644 --- a/aboutdialog/aboutdialog.cpp +++ b/aboutdialog/aboutdialog.cpp @@ -12,15 +12,12 @@ #include /*! - \namespace Dialogs - \brief Provides common dialogs such as AboutDialog, EnterPasswordDialog and - SettingsDialog. -*/ - -namespace Dialogs { + * \brief The QtUtilities namespace contains all utilities provided by the qtutilities library. + */ +namespace QtUtilities { /*! - * \class Dialogs::AboutDialog + * \class AboutDialog * \brief The AboutDialog class provides a simple about dialog. */ @@ -65,7 +62,7 @@ AboutDialog::AboutDialog(QWidget *parent, const QString &applicationName, const m_ui->creatorLabel->setText(tr("developed by %1").arg(creator.isEmpty() ? QApplication::organizationName() : creator)); } m_ui->versionLabel->setText(version.isEmpty() ? QApplication::applicationVersion() : version); - const auto &deps(dependencyVersions.size() ? dependencyVersions : ApplicationUtilities::applicationInfo.dependencyVersions); + const auto &deps(dependencyVersions.size() ? dependencyVersions : CppUtilities::applicationInfo.dependencyVersions); if (!deps.empty()) { QStringList linkedAgainst; linkedAgainst.reserve(static_cast(deps.size())); @@ -79,8 +76,8 @@ AboutDialog::AboutDialog(QWidget *parent, const QString &applicationName, const "style=\"text-decoration: underline; color: palette(link);\">project " "website.") .arg(website.isEmpty() ? QApplication::organizationDomain() : website)); - m_ui->descLabel->setText(description.isEmpty() && ApplicationUtilities::applicationInfo.description - ? QString::fromUtf8(ApplicationUtilities::applicationInfo.description) + m_ui->descLabel->setText(description.isEmpty() && CppUtilities::applicationInfo.description + ? QString::fromUtf8(CppUtilities::applicationInfo.description) : description); m_iconScene = new QGraphicsScene(this); auto *item = image.isNull() @@ -115,4 +112,4 @@ AboutDialog::AboutDialog(QWidget *parent, const QString &description, const QIma AboutDialog::~AboutDialog() { } -} // namespace Dialogs +} // namespace QtUtilities diff --git a/aboutdialog/aboutdialog.h b/aboutdialog/aboutdialog.h index 8db784d..9f7e014 100644 --- a/aboutdialog/aboutdialog.h +++ b/aboutdialog/aboutdialog.h @@ -9,7 +9,7 @@ QT_FORWARD_DECLARE_CLASS(QGraphicsScene) -namespace Dialogs { +namespace QtUtilities { namespace Ui { class AboutDialog; @@ -31,6 +31,6 @@ private: std::unique_ptr m_ui; QGraphicsScene *m_iconScene; }; -} // namespace Dialogs +} // namespace QtUtilities #endif // DIALOGS_ABOUTDIALOG_H diff --git a/aboutdialog/aboutdialog.ui b/aboutdialog/aboutdialog.ui index bac4613..c389715 100644 --- a/aboutdialog/aboutdialog.ui +++ b/aboutdialog/aboutdialog.ui @@ -1,7 +1,7 @@  - Dialogs::AboutDialog - + QtUtilities::AboutDialog + 43 diff --git a/enterpassworddialog/enterpassworddialog.cpp b/enterpassworddialog/enterpassworddialog.cpp index fcba3e5..8a78d2c 100644 --- a/enterpassworddialog/enterpassworddialog.cpp +++ b/enterpassworddialog/enterpassworddialog.cpp @@ -24,10 +24,10 @@ #endif #endif -namespace Dialogs { +namespace QtUtilities { /*! - * \class Dialogs::EnterPasswordDialog + * \class EnterPasswordDialog * \brief The EnterPasswordDialog class provides a simple dialog to ask the user * for a password. */ @@ -344,4 +344,4 @@ bool EnterPasswordDialog::isCapslockPressed() return false; #endif } -} // namespace Dialogs +} // namespace QtUtilities diff --git a/enterpassworddialog/enterpassworddialog.h b/enterpassworddialog/enterpassworddialog.h index 89c71a7..61824a4 100644 --- a/enterpassworddialog/enterpassworddialog.h +++ b/enterpassworddialog/enterpassworddialog.h @@ -7,7 +7,7 @@ #include -namespace Dialogs { +namespace QtUtilities { namespace Ui { class EnterPasswordDialog; @@ -99,6 +99,6 @@ inline void EnterPasswordDialog::abort() m_password.clear(); done(QDialog::Rejected); } -} // namespace Dialogs +} // namespace QtUtilities #endif // DIALOGS_ENTERPASSWORDDIALOG_H diff --git a/enterpassworddialog/enterpassworddialog.ui b/enterpassworddialog/enterpassworddialog.ui index 63b2e1a..7f0893b 100644 --- a/enterpassworddialog/enterpassworddialog.ui +++ b/enterpassworddialog/enterpassworddialog.ui @@ -1,7 +1,7 @@ - Dialogs::EnterPasswordDialog - + QtUtilities::EnterPasswordDialog + 0 @@ -59,14 +59,14 @@ - + user name - + 0 @@ -88,7 +88,7 @@ - + true @@ -267,7 +267,7 @@ - Widgets::ClearLineEdit + QtUtilities::ClearLineEdit QLineEdit
widgets/clearlineedit.h
diff --git a/misc/adoptlocker.h b/misc/adoptlocker.h index 30752b1..f0827f7 100644 --- a/misc/adoptlocker.h +++ b/misc/adoptlocker.h @@ -5,7 +5,7 @@ QT_FORWARD_DECLARE_CLASS(QMutex) -namespace ThreadingUtils { +namespace QtUtilities { /*! * \brief Like QMutexLocker, but assumes that the mutex has already been locked. @@ -31,6 +31,6 @@ public: private: Mutex &m_mutex; }; -} // namespace ThreadingUtils +} // namespace QtUtilities #endif // THEADING_UTILS_ADOPTLOCKER_H diff --git a/misc/conversion.h b/misc/conversion.h index 4712c98..fee98bd 100644 --- a/misc/conversion.h +++ b/misc/conversion.h @@ -7,7 +7,7 @@ #include -namespace ConversionUtilities { +namespace QtUtilities { inline QByteArray toNativeFileName(const QString &fileName) { @@ -36,6 +36,6 @@ inline QString fromNativeFileName(const std::string &nativeFileName) #endif } -} // namespace ConversionUtilities +} // namespace QtUtilities #endif // CONVERSION_H diff --git a/misc/dbusnotification.cpp b/misc/dbusnotification.cpp index 787cec1..f634c59 100644 --- a/misc/dbusnotification.cpp +++ b/misc/dbusnotification.cpp @@ -10,7 +10,7 @@ using namespace std; -namespace MiscUtils { +namespace QtUtilities { /*! * \class DBusNotification @@ -140,11 +140,11 @@ inline NotificationImage NotificationImage::fromDBusArgument(const QVariant &var return variant.canConvert() ? variant.value() : NotificationImage(); } -} // namespace MiscUtils +} // namespace QtUtilities -Q_DECLARE_METATYPE(MiscUtils::NotificationImage); +Q_DECLARE_METATYPE(QtUtilities::NotificationImage); -namespace MiscUtils { +namespace QtUtilities { /*! * \brief Creates a new notification (which is *not* shown instantly). @@ -461,4 +461,4 @@ void DBusNotification::handleActionInvoked(uint id, const QString &action) * \fn DBusNotification::isVisible() * \brief Returns whether the notification is (still) visible. */ -} // namespace MiscUtils +} // namespace QtUtilities diff --git a/misc/dbusnotification.h b/misc/dbusnotification.h index c49aac5..1f237ce 100644 --- a/misc/dbusnotification.h +++ b/misc/dbusnotification.h @@ -13,7 +13,7 @@ QT_FORWARD_DECLARE_CLASS(QDBusPendingCallWatcher) class OrgFreedesktopNotificationsInterface; -namespace MiscUtils { +namespace QtUtilities { enum class NotificationIcon { NoIcon, Information, Warning, Critical }; @@ -303,6 +303,6 @@ inline bool DBusNotification::isVisible() const { return m_id != 0; } -} // namespace MiscUtils +} // namespace QtUtilities #endif // MISC_UTILS_NOTIFICATION_H diff --git a/misc/desktoputils.cpp b/misc/desktoputils.cpp index 886e01d..9251b02 100644 --- a/misc/desktoputils.cpp +++ b/misc/desktoputils.cpp @@ -3,7 +3,7 @@ #include #include -namespace DesktopUtils { +namespace QtUtilities { /*! * \brief Shows the specified file or directory using the default file browser. @@ -26,4 +26,4 @@ bool openLocalFileOrDir(const QString &path) return QDesktopServices::openUrl(url); #endif } -} // namespace DesktopUtils +} // namespace QtUtilities diff --git a/misc/desktoputils.h b/misc/desktoputils.h index 4d0663b..802f444 100644 --- a/misc/desktoputils.h +++ b/misc/desktoputils.h @@ -7,7 +7,7 @@ QT_FORWARD_DECLARE_CLASS(QString) -namespace DesktopUtils { +namespace QtUtilities { bool QT_UTILITIES_EXPORT openLocalFileOrDir(const QString &path); } diff --git a/misc/dialogutils.cpp b/misc/dialogutils.cpp index d8e0e13..2b4edc3 100644 --- a/misc/dialogutils.cpp +++ b/misc/dialogutils.cpp @@ -18,7 +18,7 @@ #include #endif -namespace Dialogs { +namespace QtUtilities { /*! * \brief Generates the window title string for the specified \a documentStatus @@ -167,4 +167,4 @@ void updateStyle(QWidget *widget) #endif -} // namespace Dialogs +} // namespace QtUtilities diff --git a/misc/dialogutils.h b/misc/dialogutils.h index f2ae893..c80df57 100644 --- a/misc/dialogutils.h +++ b/misc/dialogutils.h @@ -11,7 +11,7 @@ QT_FORWARD_DECLARE_CLASS(QColor) QT_FORWARD_DECLARE_CLASS(QPoint) QT_FORWARD_DECLARE_CLASS(QRect) -namespace Dialogs { +namespace QtUtilities { /*! * \brief The DocumentStatus enum specifies the status of the document in a @@ -43,6 +43,6 @@ void QT_UTILITIES_EXPORT updateStyle(QWidget *widget); #endif #endif -} // namespace Dialogs +} // namespace QtUtilities #endif // DIALOGS_DIALOGUTILS_H diff --git a/misc/recentmenumanager.cpp b/misc/recentmenumanager.cpp index 346afc5..93480d8 100644 --- a/misc/recentmenumanager.cpp +++ b/misc/recentmenumanager.cpp @@ -8,7 +8,7 @@ #include #include -namespace MiscUtils { +namespace QtUtilities { /*! * \class RecentMenuManager @@ -170,4 +170,4 @@ void RecentMenuManager::handleActionTriggered() * \remarks Only emitted when the selected file still existed; otherwise the * user is ask whether to keep or delete the entry. */ -} // namespace MiscUtils +} // namespace QtUtilities diff --git a/misc/recentmenumanager.h b/misc/recentmenumanager.h index 221c724..5d466ac 100644 --- a/misc/recentmenumanager.h +++ b/misc/recentmenumanager.h @@ -8,7 +8,7 @@ QT_FORWARD_DECLARE_CLASS(QMenu) QT_FORWARD_DECLARE_CLASS(QAction) -namespace MiscUtils { +namespace QtUtilities { class QT_UTILITIES_EXPORT RecentMenuManager : public QObject { Q_OBJECT @@ -33,6 +33,6 @@ private: QAction *m_sep; QAction *m_clearAction; }; -} // namespace MiscUtils +} // namespace QtUtilities #endif // MISC_UTILS_RECENTMENUMANAGER_H diff --git a/misc/trylocker.h b/misc/trylocker.h index 7aa595b..0ce240f 100644 --- a/misc/trylocker.h +++ b/misc/trylocker.h @@ -5,7 +5,7 @@ QT_FORWARD_DECLARE_CLASS(QMutex) -namespace ThreadingUtils { +namespace QtUtilities { /*! * \brief Like QMutexLocker, but it just tries to lock the mutex. @@ -50,6 +50,6 @@ public: private: Mutex *m_mutex; }; -} // namespace ThreadingUtils +} // namespace QtUtilities #endif // THREADING_UTILS_TRYLOCKER_H diff --git a/models/checklistmodel.cpp b/models/checklistmodel.cpp index dca857d..008f812 100644 --- a/models/checklistmodel.cpp +++ b/models/checklistmodel.cpp @@ -7,7 +7,7 @@ \brief Provides common models. */ -namespace Models { +namespace QtUtilities { /*! * \class Models::ChecklistItem @@ -273,4 +273,4 @@ void ChecklistModel::applyVariantList(const QVariantList &checkedIds) emit dataChanged(index(0), index(m_items.size()), { Qt::CheckStateRole }); } -} // namespace Models +} // namespace QtUtilities diff --git a/models/checklistmodel.h b/models/checklistmodel.h index 737059d..405a1ad 100644 --- a/models/checklistmodel.h +++ b/models/checklistmodel.h @@ -8,7 +8,7 @@ QT_FORWARD_DECLARE_CLASS(QSettings) -namespace Models { +namespace QtUtilities { class ChecklistModel; @@ -121,6 +121,6 @@ constexpr int ChecklistModel::idRole() { return Qt::UserRole + 1; } -} // namespace Models +} // namespace QtUtilities #endif // MODELS_CHECKLISTMODEL_H diff --git a/paletteeditor/colorbutton.cpp b/paletteeditor/colorbutton.cpp index a1bba27..a9ec418 100644 --- a/paletteeditor/colorbutton.cpp +++ b/paletteeditor/colorbutton.cpp @@ -7,7 +7,7 @@ #include #include -namespace Widgets { +namespace QtUtilities { /*! * \cond @@ -212,6 +212,6 @@ void ColorButton::dropEvent(QDropEvent *event) setColor(d_ptr->m_dragColor); } #endif -} // namespace Widgets +} // namespace QtUtilities #include "moc_colorbutton.cpp" diff --git a/paletteeditor/colorbutton.h b/paletteeditor/colorbutton.h index a9a2b1e..5d31b6d 100644 --- a/paletteeditor/colorbutton.h +++ b/paletteeditor/colorbutton.h @@ -5,7 +5,7 @@ #include -namespace Widgets { +namespace QtUtilities { /*! * \brief The ColorButton class is used by PaletteEditor. @@ -46,6 +46,6 @@ private: Q_DISABLE_COPY(ColorButton) Q_PRIVATE_SLOT(d_func(), void slotEditColor()) }; -} // namespace Widgets +} // namespace QtUtilities #endif // WIDGETS_COLORBUTTON_H diff --git a/paletteeditor/paletteeditor.cpp b/paletteeditor/paletteeditor.cpp index d167625..52bc050 100644 --- a/paletteeditor/paletteeditor.cpp +++ b/paletteeditor/paletteeditor.cpp @@ -10,9 +10,7 @@ #include #include -using namespace Widgets; - -namespace Dialogs { +namespace QtUtilities { enum { BrushRole = 33 }; @@ -543,4 +541,4 @@ QSize ColorDelegate::sizeHint(const QStyleOptionViewItem &opt, const QModelIndex return QItemDelegate::sizeHint(opt, index) + QSize(4, 4); } -} // namespace Dialogs +} // namespace QtUtilities diff --git a/paletteeditor/paletteeditor.h b/paletteeditor/paletteeditor.h index 81439b8..abc7319 100644 --- a/paletteeditor/paletteeditor.h +++ b/paletteeditor/paletteeditor.h @@ -11,11 +11,9 @@ QT_FORWARD_DECLARE_CLASS(QListView) QT_FORWARD_DECLARE_CLASS(QLabel) -namespace Widgets { -class ColorButton; -} +namespace QtUtilities { -namespace Dialogs { +class ColorButton; namespace Ui { class PaletteEditor; @@ -132,7 +130,7 @@ private Q_SLOTS: void brushChanged(); private: - Widgets::ColorButton *m_button; + ColorButton *m_button; bool m_changed; }; @@ -178,6 +176,6 @@ public: void paint(QPainter *painter, const QStyleOptionViewItem &opt, const QModelIndex &index) const override; QSize sizeHint(const QStyleOptionViewItem &opt, const QModelIndex &index) const override; }; -} // namespace Dialogs +} // namespace QtUtilities #endif // WIDGETS_PALETTEEDITOR_H diff --git a/paletteeditor/paletteeditor.ui b/paletteeditor/paletteeditor.ui index 3f5adb2..c5886f9 100644 --- a/paletteeditor/paletteeditor.ui +++ b/paletteeditor/paletteeditor.ui @@ -1,7 +1,7 @@ - Dialogs::PaletteEditor - + QtUtilities::PaletteEditor + 0 @@ -103,7 +103,7 @@
- + 0 @@ -132,7 +132,7 @@ - Widgets::ColorButton + QtUtilities::ColorButton QToolButton
paletteeditor/colorbutton.h
@@ -142,7 +142,7 @@ buttonBox accepted() - Dialogs::PaletteEditor + QtUtilities::PaletteEditor accept() @@ -158,7 +158,7 @@ buttonBox rejected() - Dialogs::PaletteEditor + QtUtilities::PaletteEditor reject() diff --git a/resources/qtconfigarguments.cpp b/resources/qtconfigarguments.cpp index f10d1d7..d87f466 100644 --- a/resources/qtconfigarguments.cpp +++ b/resources/qtconfigarguments.cpp @@ -19,10 +19,12 @@ #include using namespace std; -using namespace ConversionUtilities; -using namespace EscapeCodes; +using namespace CppUtilities::EscapeCodes; -namespace ApplicationUtilities { +/*! + * \brief The CppUtilities namespace contains addons to the c++utilities library provided by the qtutilities library. + */ +namespace CppUtilities { /*! * \brief Constructs new Qt config arguments. @@ -181,4 +183,4 @@ void QtConfigArguments::applySettings(bool preventApplyingDefaultFont) const qputenv(m_sceneGraphRenderLoopArg.environmentVariable(), QByteArray(m_sceneGraphRenderLoopArg.firstValue())); } } -} // namespace ApplicationUtilities +} // namespace CppUtilities diff --git a/resources/qtconfigarguments.h b/resources/qtconfigarguments.h index 931c6d3..c2231c7 100644 --- a/resources/qtconfigarguments.h +++ b/resources/qtconfigarguments.h @@ -16,7 +16,7 @@ #endif #endif -namespace ApplicationUtilities { +namespace CppUtilities { class QT_UTILITIES_EXPORT QtConfigArguments { public: @@ -95,11 +95,11 @@ inline void QtConfigArguments::applySettingsForQuickGui() const } #endif // QT_UTILITIES_GUI_QTQUICK -} // namespace ApplicationUtilities +} // namespace CppUtilities #endif // APPLICATION_UTILITIES_QTCONFIGARGUMENTS_H #ifdef QT_CONFIG_ARGUMENTS #undef QT_CONFIG_ARGUMENTS #endif -#define QT_CONFIG_ARGUMENTS ApplicationUtilities::QtConfigArguments +#define QT_CONFIG_ARGUMENTS CppUtilities::QtConfigArguments diff --git a/resources/resources.cpp b/resources/resources.cpp index fee3b8b..b44a058 100644 --- a/resources/resources.cpp +++ b/resources/resources.cpp @@ -36,6 +36,8 @@ inline void cleanupResources() } ///! \endcond +namespace QtUtilities { + /*! * \brief Functions for using the resources provided by this library. * \deprecated Replaced by ENABLE_QT_RESOURCES_OF_STATIC_DEPENDENCIES macro. @@ -327,3 +329,4 @@ QString locateConfigFile(const QString &applicationName, const QString &fileName } } } // namespace ConfigFile +} // namespace QtUtilities diff --git a/resources/resources.h b/resources/resources.h index 97cb8b3..1485a9a 100644 --- a/resources/resources.h +++ b/resources/resources.h @@ -25,8 +25,10 @@ QT_FORWARD_DECLARE_CLASS(QSettings) * \brief Loads translations for Qt, other dependencies and the application. */ #define LOAD_QT_TRANSLATIONS \ - TranslationFiles::loadQtTranslationFile(QT_TRANSLATION_FILES); \ - TranslationFiles::loadApplicationTranslationFile(APP_SPECIFIC_QT_TRANSLATION_FILES) + QtUtilities::TranslationFiles::loadQtTranslationFile(QT_TRANSLATION_FILES); \ + QtUtilities::TranslationFiles::loadApplicationTranslationFile(APP_SPECIFIC_QT_TRANSLATION_FILES) + +namespace QtUtilities { namespace QtUtilitiesResources { @@ -61,4 +63,6 @@ namespace ConfigFile { QT_UTILITIES_EXPORT QString locateConfigFile(const QString &applicationName, const QString &fileName, const QSettings *settings = nullptr); } +} // namespace QtUtilities + #endif // APPLICATION_UTILITIES_RESOURCES_H diff --git a/settingsdialog/optioncategory.cpp b/settingsdialog/optioncategory.cpp index 9db0ab2..ee89a1e 100644 --- a/settingsdialog/optioncategory.cpp +++ b/settingsdialog/optioncategory.cpp @@ -1,10 +1,10 @@ #include "./optioncategory.h" #include "./optionpage.h" -namespace Dialogs { +namespace QtUtilities { /*! - * \class Dialogs::OptionCategory + * \class OptionCategory * \brief The OptionCategory class wraps associated option pages. */ @@ -100,4 +100,4 @@ void OptionCategory::assignPages(const QList pages) * \fn OptionCategory::pagesChanged() * \brief Emitted when the pages changed. */ -} // namespace Dialogs +} // namespace QtUtilities diff --git a/settingsdialog/optioncategory.h b/settingsdialog/optioncategory.h index 7601b34..fef8fbc 100644 --- a/settingsdialog/optioncategory.h +++ b/settingsdialog/optioncategory.h @@ -7,7 +7,7 @@ #include #include -namespace Dialogs { +namespace QtUtilities { class OptionPage; @@ -105,6 +105,6 @@ inline void OptionCategory::setCurrentIndex(int currentIndex) { m_currentIndex = currentIndex; } -} // namespace Dialogs +} // namespace QtUtilities #endif // DIALOGS_OPTIONSCATEGORY_H diff --git a/settingsdialog/optioncategoryfiltermodel.cpp b/settingsdialog/optioncategoryfiltermodel.cpp index 219463d..7102104 100644 --- a/settingsdialog/optioncategoryfiltermodel.cpp +++ b/settingsdialog/optioncategoryfiltermodel.cpp @@ -2,10 +2,10 @@ #include "./optioncategory.h" #include "./optioncategorymodel.h" -namespace Dialogs { +namespace QtUtilities { /*! - * \class Dialogs::OptionCategoryFilterModel + * \class OptionCategoryFilterModel * \brief The OptionCategoryFilterModel class is used by SettingsDialog to * filter option categories. */ @@ -29,4 +29,4 @@ bool OptionCategoryFilterModel::filterAcceptsRow(int sourceRow, const QModelInde } return false; } -} // namespace Dialogs +} // namespace QtUtilities diff --git a/settingsdialog/optioncategoryfiltermodel.h b/settingsdialog/optioncategoryfiltermodel.h index e510863..6ea95fb 100644 --- a/settingsdialog/optioncategoryfiltermodel.h +++ b/settingsdialog/optioncategoryfiltermodel.h @@ -3,7 +3,7 @@ #include -namespace Dialogs { +namespace QtUtilities { class OptionCategoryFilterModel : public QSortFilterProxyModel { Q_OBJECT @@ -11,8 +11,8 @@ public: explicit OptionCategoryFilterModel(QObject *parent = nullptr); protected: - virtual bool filterAcceptsRow(int source_row, const QModelIndex &sourceParent) const override; + bool filterAcceptsRow(int source_row, const QModelIndex &sourceParent) const override; }; -} // namespace Dialogs +} // namespace QtUtilities #endif // DIALOGS_OPTIONCATEGORYFILTERMODEL_H diff --git a/settingsdialog/optioncategorymodel.cpp b/settingsdialog/optioncategorymodel.cpp index feb07ab..b21a577 100644 --- a/settingsdialog/optioncategorymodel.cpp +++ b/settingsdialog/optioncategorymodel.cpp @@ -6,10 +6,10 @@ #include #endif -namespace Dialogs { +namespace QtUtilities { /*! - * \class Dialogs::OptionCategoryModel + * \class OptionCategoryModel * \brief The OptionCategoryModel class is used by SettingsDialog to store and * display option categories. */ @@ -117,4 +117,4 @@ void OptionCategoryModel::categoryChangedIcon() } } } -} // namespace Dialogs +} // namespace QtUtilities diff --git a/settingsdialog/optioncategorymodel.h b/settingsdialog/optioncategorymodel.h index c9fd821..356179d 100644 --- a/settingsdialog/optioncategorymodel.h +++ b/settingsdialog/optioncategorymodel.h @@ -6,7 +6,7 @@ #include #include -namespace Dialogs { +namespace QtUtilities { class OptionPage; class OptionCategory; @@ -16,7 +16,7 @@ class QT_UTILITIES_EXPORT OptionCategoryModel : public QAbstractListModel { public: explicit OptionCategoryModel(QObject *parent = nullptr); explicit OptionCategoryModel(const QList &categories, QObject *parent = nullptr); - virtual ~OptionCategoryModel() override; + ~OptionCategoryModel() override; const QList &categories() const; OptionCategory *category(const QModelIndex &index) const; @@ -62,6 +62,6 @@ inline OptionCategory *OptionCategoryModel::category(int row) const { return row < m_categories.size() ? m_categories.at(row) : nullptr; } -} // namespace Dialogs +} // namespace QtUtilities #endif // DIALOGS_OPTIONCATEGORYMODEL_H diff --git a/settingsdialog/optionpage.cpp b/settingsdialog/optionpage.cpp index 03c477f..383247b 100644 --- a/settingsdialog/optionpage.cpp +++ b/settingsdialog/optionpage.cpp @@ -6,10 +6,10 @@ #include #include -namespace Dialogs { +namespace QtUtilities { /*! - * \class Dialogs::OptionPage + * \class OptionPage * \brief The OptionPage class is the base class for SettingsDialog pages. * * The specified \a parentWindow might be used by some implementations as parent @@ -112,4 +112,4 @@ bool OptionPage::matches(const QString &searchKeyWord) * \brief Creates the widget for the page. Called on the first invocation of * widget(). */ -} // namespace Dialogs +} // namespace QtUtilities diff --git a/settingsdialog/optionpage.h b/settingsdialog/optionpage.h index 7d5d50e..f67a861 100644 --- a/settingsdialog/optionpage.h +++ b/settingsdialog/optionpage.h @@ -8,7 +8,7 @@ #include -namespace Dialogs { +namespace QtUtilities { class SettingsDialog; @@ -140,7 +140,7 @@ template inline UiClass *UiFileBasedOptionPage::ui() { return m_ui.get(); } -} // namespace Dialogs +} // namespace QtUtilities /*! * \brief Declares a class inheriting from Dialogs::OptionPage in a convenient @@ -148,8 +148,8 @@ template inline UiClass *UiFileBasedOptionPage::ui() * \remarks Must be closed with END_DECLARE_OPTION_PAGE. */ #define BEGIN_DECLARE_OPTION_PAGE(SomeClass) \ - typedef ::Dialogs::OptionPage SomeClass##Base; \ - class QT_UTILITIES_EXPORT SomeClass : public ::Dialogs::OptionPage { \ + typedef ::QtUtilities::OptionPage SomeClass##Base; \ + class QT_UTILITIES_EXPORT SomeClass : public ::QtUtilities::OptionPage { \ public: \ explicit SomeClass(QWidget *parentWidget = nullptr); \ ~SomeClass() override; \ @@ -164,8 +164,8 @@ template inline UiClass *UiFileBasedOptionPage::ui() * \remarks Must be closed with END_DECLARE_OPTION_PAGE. */ #define BEGIN_DECLARE_OPTION_PAGE_CUSTOM_CTOR(SomeClass) \ - typedef ::Dialogs::OptionPage SomeClass##Base; \ - class QT_UTILITIES_EXPORT SomeClass : public ::Dialogs::OptionPage { \ + typedef ::QtUtilities::OptionPage SomeClass##Base; \ + class QT_UTILITIES_EXPORT SomeClass : public ::QtUtilities::OptionPage { \ public: \ ~SomeClass() override; \ bool apply() override; \ @@ -182,8 +182,8 @@ template inline UiClass *UiFileBasedOptionPage::ui() namespace Ui { \ class SomeClass; \ } \ - typedef ::Dialogs::UiFileBasedOptionPage SomeClass##Base; \ - class QT_UTILITIES_EXPORT SomeClass : public ::Dialogs::UiFileBasedOptionPage { \ + typedef ::QtUtilities::UiFileBasedOptionPage SomeClass##Base; \ + class QT_UTILITIES_EXPORT SomeClass : public ::QtUtilities::UiFileBasedOptionPage { \ public: \ ~SomeClass() override; \ bool apply() override; \ @@ -217,7 +217,7 @@ private: * \remarks Might be required when the class is used by another application. */ #define INSTANTIATE_UI_FILE_BASED_OPTION_PAGE(SomeClass) \ - namespace Dialogs { \ + namespace QtUtilities { \ template class UiFileBasedOptionPage; \ } @@ -228,7 +228,7 @@ private: * \remarks Might be required when the class is used by another application. */ #define INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS(SomeNamespace, SomeClass) \ - namespace Dialogs { \ + namespace QtUtilities { \ template class UiFileBasedOptionPage<::SomeNamespace::Ui::SomeClass>; \ } @@ -238,7 +238,7 @@ private: * \remarks Might be required when the class comes from an external library. */ #define DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE(SomeClass) \ - namespace Dialogs { \ + namespace QtUtilities { \ namespace Ui { \ class SomeClass; \ } \ @@ -257,7 +257,7 @@ private: class SomeClass; \ } \ } \ - namespace Dialogs { \ + namespace QtUtilities { \ extern template class UiFileBasedOptionPage<::SomeNamespace::Ui::SomeClass>; \ } diff --git a/settingsdialog/qtappearanceoptionpage.ui b/settingsdialog/qtappearanceoptionpage.ui index 324f3de..7af19e7 100644 --- a/settingsdialog/qtappearanceoptionpage.ui +++ b/settingsdialog/qtappearanceoptionpage.ui @@ -1,7 +1,7 @@ - Dialogs::QtAppearanceOptionPage - + QtUtilities::QtAppearanceOptionPage + Appearance @@ -137,7 +137,7 @@
- + false @@ -261,7 +261,7 @@ These settings might be overwritten by your Qt 5 platfrom integration plugin and - Widgets::PathSelection + QtUtilities::PathSelection QWidget
widgets/pathselection.h
1 diff --git a/settingsdialog/qtenvoptionpage.ui b/settingsdialog/qtenvoptionpage.ui index 3be13c5..394bd25 100644 --- a/settingsdialog/qtenvoptionpage.ui +++ b/settingsdialog/qtenvoptionpage.ui @@ -1,7 +1,7 @@ - Dialogs::QtEnvOptionPage - + QtUtilities::QtEnvOptionPage + 0 @@ -30,7 +30,7 @@
- + @@ -40,7 +40,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -87,7 +87,7 @@
- Widgets::PathSelection + QtUtilities::PathSelection QWidget
widgets/pathselection.h
1 diff --git a/settingsdialog/qtlanguageoptionpage.ui b/settingsdialog/qtlanguageoptionpage.ui index 9d616d8..5a32dda 100644 --- a/settingsdialog/qtlanguageoptionpage.ui +++ b/settingsdialog/qtlanguageoptionpage.ui @@ -1,7 +1,7 @@ - Dialogs::QtLanguageOptionPage - + QtUtilities::QtLanguageOptionPage + Localization diff --git a/settingsdialog/qtsettings.cpp b/settingsdialog/qtsettings.cpp index 67ae4be..300e04f 100644 --- a/settingsdialog/qtsettings.cpp +++ b/settingsdialog/qtsettings.cpp @@ -28,7 +28,7 @@ using namespace std; -namespace Dialogs { +namespace QtUtilities { struct QtSettingsData { QtSettingsData(); @@ -395,7 +395,7 @@ void QtEnvOptionPage::reset() ui()->iconThemeSearchPathSelection->lineEdit()->setText(m_settings.additionalIconThemeSearchPath); ui()->translationPathSelection->lineEdit()->setText(TranslationFiles::additionalTranslationFilePath()); } -} // namespace Dialogs +} // namespace QtUtilities INSTANTIATE_UI_FILE_BASED_OPTION_PAGE(QtAppearanceOptionPage) INSTANTIATE_UI_FILE_BASED_OPTION_PAGE(QtLanguageOptionPage) diff --git a/settingsdialog/qtsettings.h b/settingsdialog/qtsettings.h index 3a32758..2c6dbf6 100644 --- a/settingsdialog/qtsettings.h +++ b/settingsdialog/qtsettings.h @@ -8,7 +8,7 @@ QT_FORWARD_DECLARE_CLASS(QFontDialog) QT_FORWARD_DECLARE_CLASS(QSettings) -namespace Dialogs { +namespace QtUtilities { class OptionCategory; struct QtSettingsData; @@ -55,7 +55,7 @@ public: private: std::unique_ptr m_d; }; -} // namespace Dialogs +} // namespace QtUtilities DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE(QtAppearanceOptionPage) DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE(QtLanguageOptionPage) diff --git a/settingsdialog/settingsdialog.cpp b/settingsdialog/settingsdialog.cpp index ead5f60..a650b8d 100644 --- a/settingsdialog/settingsdialog.cpp +++ b/settingsdialog/settingsdialog.cpp @@ -15,10 +15,10 @@ #include #include -namespace Dialogs { +namespace QtUtilities { /*! - * \class Dialogs::SettingsDialog + * \class SettingsDialog * \brief The SettingsDialog class provides a framework for creating settings * dialogs with different categories and subcategories. */ @@ -280,4 +280,4 @@ void SettingsDialog::reset() } emit resetted(); } -} // namespace Dialogs +} // namespace QtUtilities diff --git a/settingsdialog/settingsdialog.h b/settingsdialog/settingsdialog.h index e8d3be1..a72b0b0 100644 --- a/settingsdialog/settingsdialog.h +++ b/settingsdialog/settingsdialog.h @@ -7,7 +7,7 @@ #include -namespace Dialogs { +namespace QtUtilities { class OptionCategoryModel; class OptionCategoryFilterModel; @@ -75,6 +75,6 @@ inline OptionCategoryModel *SettingsDialog::categoryModel() { return m_categoryModel; } -} // namespace Dialogs +} // namespace QtUtilities #endif // DIALOGS_SETTINGSDIALOG_H diff --git a/settingsdialog/settingsdialog.ui b/settingsdialog/settingsdialog.ui index d3db522..4e604a2 100644 --- a/settingsdialog/settingsdialog.ui +++ b/settingsdialog/settingsdialog.ui @@ -1,7 +1,7 @@ - Dialogs::SettingsDialog - + QtUtilities::SettingsDialog + 0 @@ -58,7 +58,7 @@ - + 140 @@ -173,7 +173,7 @@ - Widgets::ClearLineEdit + QtUtilities::ClearLineEdit QLineEdit
widgets/clearlineedit.h
diff --git a/translations/qtutilities_de_DE.ts b/translations/qtutilities_de_DE.ts index 86f3ca8..7e5be42 100644 --- a/translations/qtutilities_de_DE.ts +++ b/translations/qtutilities_de_DE.ts @@ -1,374 +1,10 @@ - - Dialogs::AboutDialog - - - About - Über - - - - application name - just a placeholder - - - - - version - just a placeholder - - - - - description - just a placeholder - - - - - website link - just a placeholder - - - - - creators - just a placeholder - - - - - developed by %1 - entwickelt von %1 - - - - Linked against: - Gegen folgende Bibliotheken gelinkt: - - - - For updates and bug reports visit the <a href="%1" style="text-decoration: underline; color: palette(link);">project website</a>. - Für Aktualisierung und Melden von Fehlern besuche die <a href="%1" style="text-decoration: underline; color: palette(link);">Webseite des Projekts</a>. - - - - Dialogs::EnterPasswordDialog - - - - - - Enter the password - Passwort eingeben - - - - user name - Benutzername - - - - password - Passwort - - - - repeat password - Password wiederholen - - - - show password - Passwort zeigen - - - - don't use a password - Kein Passwort verwenden - - - - Capslock is active - Feststelltaste ist aktiviert - - - - Abort - Abbrechen - - - - Confirm - Bestätigen - - - - - Enter the new password - Neues Passwort festlegen - - - - You didn't enter a user name. - Es wurde kein Benutzername eingegeben. - - - - You didn't enter a password. - Es wurde kein Passwort eingegeben. - - - - You have to enter the new password twice to ensure you enterd it correct. - Um sicher zu stellen, dass das neue Passwort richtig eingegeben wurde, muss es zweimal eingegeben werden. - - - - You mistyped the password. - Erstes und zweites Passwort stimmen nicht überein. - - - - Dialogs::PaletteEditor - - - Edit Palette - Palette ändern - - - - Tune Palette - Palette - - - - Show Detai&ls - Details einblenden - - - - &Compute Details - Details berechnen - - - - Quick - Einfach - - - - Dialogs::PaletteModel - - - Color Role - Farbrolle - - - - Active - Aktiv - - - - Inactive - Inaktiv - - - - Disabled - Deaktiviert - - - - Dialogs::QtAppearanceOptionPage - - - Appearance - Erscheinungsbild - - - - Use system default - Verwende Systemvorgabe - - - - Font - Schriftart - - - - More options ... - Weitere Optionen ... - - - - Widget style - Widget-Stil - - - - Style sheet - Stylesheet - - - - Palette - - - - - select ... - Bearbeiten ... - - - - Icon theme - Symbole - - - - These settings take effect after restarting the application. -These settings might be overwritten by your Qt 5 platfrom integration plugin and hence have no effect. - Diese Einstellungen wirken sich erst nach einem Neustart der Anwendung aus. -Außerdem werden sie vielleicht vom QPA plugin überschrieben und funktionieren daher nicht. - - - - Dialogs::QtEnvOptionPage - - - Environment/paths - Umgebung/Pfade - - - - Additional plugin directory - Zusätzliches Plugin-Verzeichnis - - - - Additional icon theme search path - Zusätzliches Verzeichnis für Symbole - - - - Additional translation search path - Zusätzliches Verzeichnis für Übersetzungen - - - - These settings take effect after restarting the application. - Diese Einstellungen wirken sich erst nach einem Neustart der Anwendung aus. - - - - Dialogs::QtLanguageOptionPage - - - Localization - Lokalisierung - - - - Locale - Gebietsschema - - - - Use system default - Verwende Systemvorgabe - - - - These settings take effect after restarting the application. - Diese Einstellungen wirken sich erst nach einem Neustart der Anwendung aus. - - - - Dialogs::SettingsDialog - - - Settings - Einstellungen - - - - - No category selected - Keine Kategorie gewählt - - - - Filter - - - - - Abort - Abbrechen - - - - Apply - Anwenden - - - - OK - - - - - <p><b>Errors occurred when applying changes:</b></p><ul> - <p><b>Beim Anwenden der Einstellungen sind Fehler aufgetreten:</b></p><ul> - - - - unknonw error - unbekannter Fehler - - - - MiscUtils::RecentMenuManager - - - &Recent - &Zuletzt verwendet - - - - &Clear list - &Liste löschen - - - - Recently opened files - - Kürzlich geöffnete Dateien - - - - - The selected file can't be found anymore. Do you want to delete the obsolete entry from the list? - Die ausgewählte Datei kann nicht mehr gefunden werden. Soll die Datei aus der Liste gelöscht werden? - - - - keep entry - Eintrag behalten - - - - delete entry - Eintrag löschen - - QObject - + Clear Text löschen @@ -390,51 +26,410 @@ Außerdem werden sie vielleicht vom QPA plugin überschrieben und funktionieren - Utilities::windowTitle + QtUtilities::AboutDialog - - Unsaved - %1 - Nicht gespeichert - %1 + + About + Über - - %1 - %2 - %3 - + + application name + - - *Unsaved - %1 - *Nicht gespeichert - %1 + + version + - - *%1 - %2 - %3 - + + description + + + + + website link + + + + + creators + + + + + developed by %1 + entwickelt von %1 + + + + Linked against: + Gegen folgende Bibliotheken gelinkt: + + + + For updates and bug reports visit the <a href="%1" style="text-decoration: underline; color: palette(link);">project website</a>. + Für Aktualisierung und Melden von Fehlern besuche die <a href="%1" style="text-decoration: underline; color: palette(link);">Webseite des Projekts</a>. - Widgets::PathSelection + QtUtilities::EnterPasswordDialog + + + + + + Enter the password + Passwort eingeben + + + + user name + Benutzername + + + + password + Passwort + + + + repeat password + Password wiederholen + + + + show password + Passwort zeigen + + + + don't use a password + Kein Passwort verwenden + + + + Capslock is active + Feststelltaste ist aktiviert + + + + Abort + Abbrechen + + + + Confirm + Bestätigen + + + + + Enter the new password + Neues Passwort festlegen + + + + You didn't enter a user name. + Es wurde kein Benutzername eingegeben. + + + + You didn't enter a password. + Es wurde kein Passwort eingegeben. + + + + You have to enter the new password twice to ensure you enterd it correct. + Um sicher zu stellen, dass das neue Passwort richtig eingegeben wurde, muss es zweimal eingegeben werden. + + + + You mistyped the password. + Erstes und zweites Passwort stimmen nicht überein. + + + + QtUtilities::PaletteEditor + + + Edit Palette + Palette ändern + + + + Tune Palette + Palette + + + + Show Detai&ls + Details einblenden + + + + &Compute Details + Details berechnen + + + + Quick + Einfach + + + + QtUtilities::PaletteModel + + + Color Role + Farbrolle + + + + Active + Aktiv + + + + Inactive + Inaktiv + + + + Disabled + Deaktiviert + + + + QtUtilities::PathSelection Select ... - Wählen ... + Wählen ... Open - Öffnen + Öffnen Explore - Im Dateibrowser öffnen + Im Dateibrowser öffnen Select path - Pfad auswählen + Pfad auswählen + + + + QtUtilities::QtAppearanceOptionPage + + + Appearance + Erscheinungsbild + + + + Use system default + Verwende Systemvorgabe + + + + Font + Schriftart + + + + More options ... + Weitere Optionen ... + + + + Widget style + Widget-Stil + + + + Style sheet + Stylesheet + + + + Palette + + + + + select ... + Bearbeiten ... + + + + Icon theme + Symbole + + + + These settings take effect after restarting the application. +These settings might be overwritten by your Qt 5 platfrom integration plugin and hence have no effect. + Diese Einstellungen wirken sich erst nach einem Neustart der Anwendung aus. +Außerdem werden sie vielleicht vom QPA plugin überschrieben und funktionieren daher nicht. + + + + QtUtilities::QtEnvOptionPage + + + Environment/paths + Umgebung/Pfade + + + + Additional plugin directory + Zusätzliches Plugin-Verzeichnis + + + + Additional icon theme search path + Zusätzliches Verzeichnis für Symbole + + + + Additional translation search path + Zusätzliches Verzeichnis für Übersetzungen + + + + These settings take effect after restarting the application. + Diese Einstellungen wirken sich erst nach einem Neustart der Anwendung aus. + + + + QtUtilities::QtLanguageOptionPage + + + Localization + Lokalisierung + + + + Locale + Gebietsschema + + + + Use system default + Verwende Systemvorgabe + + + + These settings take effect after restarting the application. + Diese Einstellungen wirken sich erst nach einem Neustart der Anwendung aus. + + + + QtUtilities::RecentMenuManager + + + &Recent + &Zuletzt verwendet + + + + &Clear list + &Liste löschen + + + + Recently opened files - + Kürzlich geöffnete Dateien - + + + + The selected file can't be found anymore. Do you want to delete the obsolete entry from the list? + Die ausgewählte Datei kann nicht mehr gefunden werden. Soll die Datei aus der Liste gelöscht werden? + + + + keep entry + Eintrag behalten + + + + delete entry + Eintrag löschen + + + + QtUtilities::SettingsDialog + + + Settings + Einstellungen + + + + + No category selected + Keine Kategorie gewählt + + + + Filter + + + + + Abort + Abbrechen + + + + Apply + Anwenden + + + + OK + + + + + <p><b>Errors occurred when applying changes:</b></p><ul> + <p><b>Beim Anwenden der Einstellungen sind Fehler aufgetreten:</b></p><ul> + + + + unknonw error + unbekannter Fehler + + + + Utilities::windowTitle + + + Unsaved - %1 + Nicht gespeichert - %1 + + + + %1 - %2 - %3 + + + + + *Unsaved - %1 + *Nicht gespeichert - %1 + + + + *%1 - %2 - %3 + diff --git a/translations/qtutilities_en_US.ts b/translations/qtutilities_en_US.ts index c987267..0b169a7 100644 --- a/translations/qtutilities_en_US.ts +++ b/translations/qtutilities_en_US.ts @@ -2,55 +2,79 @@ - Dialogs::AboutDialog + QObject - + + Clear + + + + + QtGui::QtLanguageOptionPage + + + recognized by Qt as + + + + + QtGui::QtOptionCategory + + + Qt + + + + + QtUtilities::AboutDialog + + About - + application name - + version - + description - + website link - + creators - + developed by %1 - + Linked against: - + For updates and bug reports visit the <a href="%1" style="text-decoration: underline; color: palette(link);">project website</a>. - Dialogs::EnterPasswordDialog + QtUtilities::EnterPasswordDialog @@ -127,7 +151,7 @@ - Dialogs::PaletteEditor + QtUtilities::PaletteEditor Edit Palette @@ -155,30 +179,55 @@ - Dialogs::PaletteModel + QtUtilities::PaletteModel - + Color Role - + Active - + Inactive - + Disabled - Dialogs::QtAppearanceOptionPage + QtUtilities::PathSelection + + + + Select ... + + + + + Open + + + + + Explore + + + + + + Select path + + + + + QtUtilities::QtAppearanceOptionPage Appearance @@ -232,7 +281,7 @@ These settings might be overwritten by your Qt 5 platfrom integration plugin and - Dialogs::QtEnvOptionPage + QtUtilities::QtEnvOptionPage Environment/paths @@ -260,7 +309,7 @@ These settings might be overwritten by your Qt 5 platfrom integration plugin and - Dialogs::QtLanguageOptionPage + QtUtilities::QtLanguageOptionPage Localization @@ -283,7 +332,40 @@ These settings might be overwritten by your Qt 5 platfrom integration plugin and - Dialogs::SettingsDialog + QtUtilities::RecentMenuManager + + + &Recent + + + + + &Clear list + + + + + Recently opened files - + + + + + The selected file can't be found anymore. Do you want to delete the obsolete entry from the list? + + + + + keep entry + + + + + delete entry + + + + + QtUtilities::SettingsDialog Settings @@ -326,109 +408,27 @@ These settings might be overwritten by your Qt 5 platfrom integration plugin and - - MiscUtils::RecentMenuManager - - - &Recent - - - - - &Clear list - - - - - Recently opened files - - - - - - The selected file can't be found anymore. Do you want to delete the obsolete entry from the list? - - - - - keep entry - - - - - delete entry - - - - - QObject - - - Clear - - - - - QtGui::QtLanguageOptionPage - - - recognized by Qt as - - - - - QtGui::QtOptionCategory - - - Qt - - - Utilities::windowTitle - + Unsaved - %1 - + %1 - %2 - %3 - + *Unsaved - %1 - + *%1 - %2 - %3 - - Widgets::PathSelection - - - - Select ... - - - - - Open - - - - - Explore - - - - - - Select path - - - diff --git a/widgets/buttonoverlay.cpp b/widgets/buttonoverlay.cpp index 3125fc8..cfa8cb1 100644 --- a/widgets/buttonoverlay.cpp +++ b/widgets/buttonoverlay.cpp @@ -10,16 +10,10 @@ #include -/*! - * \namespace Widgets - * \brief Provides a set of extended widgets such as ClearLineEdit and - * ClearComboBox. - */ - -namespace Widgets { +namespace QtUtilities { /*! - * \class Widgets::ButtonOverlay + * \class ButtonOverlay * \brief The ButtonOverlay class is used to display buttons on top of other * widgets. * @@ -196,4 +190,4 @@ void ButtonOverlay::showInfo() QToolTip::showText(QCursor::pos(), m_infoButton->toolTip(), m_infoButton); } } -} // namespace Widgets +} // namespace QtUtilities diff --git a/widgets/buttonoverlay.h b/widgets/buttonoverlay.h index bb88717..9209f08 100644 --- a/widgets/buttonoverlay.h +++ b/widgets/buttonoverlay.h @@ -10,7 +10,7 @@ QT_FORWARD_DECLARE_CLASS(QHBoxLayout) QT_FORWARD_DECLARE_CLASS(QString) QT_FORWARD_DECLARE_CLASS(QPixmap) -namespace Widgets { +namespace QtUtilities { class IconButton; @@ -67,6 +67,6 @@ inline bool ButtonOverlay::isInfoButtonEnabled() const { return m_infoButton != nullptr; } -} // namespace Widgets +} // namespace QtUtilities #endif // WIDGETS_BUTTONOVERLAY_H diff --git a/widgets/clearcombobox.cpp b/widgets/clearcombobox.cpp index a038394..c539184 100644 --- a/widgets/clearcombobox.cpp +++ b/widgets/clearcombobox.cpp @@ -4,10 +4,10 @@ #include #include -namespace Widgets { +namespace QtUtilities { /*! - * \class Widgets::ClearComboBox + * \class ClearComboBox * \brief A QComboBox with an embedded button for clearing its contents. */ @@ -54,4 +54,4 @@ bool ClearComboBox::isCleared() const { return currentText().isEmpty(); } -} // namespace Widgets +} // namespace QtUtilities diff --git a/widgets/clearcombobox.h b/widgets/clearcombobox.h index 42e7f7b..7ae0a20 100644 --- a/widgets/clearcombobox.h +++ b/widgets/clearcombobox.h @@ -5,7 +5,7 @@ #include -namespace Widgets { +namespace QtUtilities { class QT_UTILITIES_EXPORT ClearComboBox : public QComboBox, public ButtonOverlay { Q_OBJECT @@ -19,6 +19,6 @@ private Q_SLOTS: void handleClearButtonClicked() override; }; -} // namespace Widgets +} // namespace QtUtilities #endif // WIDGETS_CLEARCOMBOBOX_H diff --git a/widgets/clearlineedit.cpp b/widgets/clearlineedit.cpp index 20a4d61..7ffa2fd 100644 --- a/widgets/clearlineedit.cpp +++ b/widgets/clearlineedit.cpp @@ -1,9 +1,9 @@ #include "./clearlineedit.h" -namespace Widgets { +namespace QtUtilities { /*! - * \class Widgets::ClearLineEdit + * \class ClearLineEdit * \brief A QLineEdit with an embedded button for clearing its contents. */ @@ -42,4 +42,4 @@ bool ClearLineEdit::isCleared() const { return text().isEmpty(); } -} // namespace Widgets +} // namespace QtUtilities diff --git a/widgets/clearlineedit.h b/widgets/clearlineedit.h index f2cc3a2..b18c37c 100644 --- a/widgets/clearlineedit.h +++ b/widgets/clearlineedit.h @@ -7,7 +7,7 @@ QT_FORWARD_DECLARE_CLASS(QHBoxLayout) -namespace Widgets { +namespace QtUtilities { class IconButton; @@ -22,6 +22,6 @@ private Q_SLOTS: void handleTextChanged(const QString &text); void handleClearButtonClicked() override; }; -} // namespace Widgets +} // namespace QtUtilities #endif // WIDGETS_CLEARLINEEDIT_H diff --git a/widgets/clearplaintextedit.cpp b/widgets/clearplaintextedit.cpp index 5adec16..657b9d1 100644 --- a/widgets/clearplaintextedit.cpp +++ b/widgets/clearplaintextedit.cpp @@ -5,10 +5,10 @@ using namespace std; -namespace Widgets { +namespace QtUtilities { /*! - * \class Widgets::ClearPlainTextEdit + * \class ClearPlainTextEdit * \brief A QPlainTextEdit with an embedded button for clearing its contents. */ @@ -61,4 +61,4 @@ bool ClearPlainTextEdit::isCleared() const return document()->isEmpty(); } -} // namespace Widgets +} // namespace QtUtilities diff --git a/widgets/clearplaintextedit.h b/widgets/clearplaintextedit.h index 4fc191e..7e6abc3 100644 --- a/widgets/clearplaintextedit.h +++ b/widgets/clearplaintextedit.h @@ -5,7 +5,7 @@ #include -namespace Widgets { +namespace QtUtilities { class QT_UTILITIES_EXPORT ClearPlainTextEdit : public QPlainTextEdit, public ButtonOverlay { Q_OBJECT @@ -20,6 +20,6 @@ private Q_SLOTS: void handleScroll(); }; -} // namespace Widgets +} // namespace QtUtilities #endif // WIDGETS_CLEARPLAINTEXTEDIT_H diff --git a/widgets/clearspinbox.cpp b/widgets/clearspinbox.cpp index e16f76a..e9e97c6 100644 --- a/widgets/clearspinbox.cpp +++ b/widgets/clearspinbox.cpp @@ -4,10 +4,10 @@ #include #include -namespace Widgets { +namespace QtUtilities { /*! - * \class Widgets::ClearSpinBox + * \class ClearSpinBox * \brief A QSpinBox with an embedded button for clearing its contents and the * ability to hide * the minimum value. @@ -75,4 +75,4 @@ QString ClearSpinBox::textFromValue(int val) const return QSpinBox::textFromValue(val); } } -} // namespace Widgets +} // namespace QtUtilities diff --git a/widgets/clearspinbox.h b/widgets/clearspinbox.h index eac9035..2057ded 100644 --- a/widgets/clearspinbox.h +++ b/widgets/clearspinbox.h @@ -8,7 +8,7 @@ QT_FORWARD_DECLARE_CLASS(QHBoxLayout) -namespace Widgets { +namespace QtUtilities { class IconButton; @@ -72,6 +72,6 @@ inline void ClearSpinBox::setPlaceholderText(const QString &placeholderText) { lineEdit()->setPlaceholderText(placeholderText); } -} // namespace Widgets +} // namespace QtUtilities #endif // WIDGETS_CLEARSPINBOX_H diff --git a/widgets/iconbutton.cpp b/widgets/iconbutton.cpp index 527fc62..3a983dc 100644 --- a/widgets/iconbutton.cpp +++ b/widgets/iconbutton.cpp @@ -5,10 +5,10 @@ #include #include -namespace Widgets { +namespace QtUtilities { /*! - * \class Widgets::IconButton + * \class IconButton * \brief A simple QAbstractButton implementation displaying a QPixmap. */ @@ -77,4 +77,4 @@ void IconButton::keyReleaseEvent(QKeyEvent *event) QAbstractButton::keyReleaseEvent(event); event->accept(); } -} // namespace Widgets +} // namespace QtUtilities diff --git a/widgets/iconbutton.h b/widgets/iconbutton.h index 9f17339..fbb04c9 100644 --- a/widgets/iconbutton.h +++ b/widgets/iconbutton.h @@ -6,7 +6,7 @@ #include #include -namespace Widgets { +namespace QtUtilities { class QT_UTILITIES_EXPORT IconButton : public QAbstractButton { Q_OBJECT @@ -45,6 +45,6 @@ inline void IconButton::setPixmap(const QPixmap &pixmap) m_pixmap = pixmap; update(); } -} // namespace Widgets +} // namespace QtUtilities #endif // WIDGETS_ICONBUTTON_H diff --git a/widgets/pathselection.cpp b/widgets/pathselection.cpp index 2007034..93e0e51 100644 --- a/widgets/pathselection.cpp +++ b/widgets/pathselection.cpp @@ -21,10 +21,10 @@ using namespace std; -namespace Widgets { +namespace QtUtilities { /*! - * \class Widgets::PathSelection + * \class PathSelection * \brief A QLineEdit with a QPushButton next to it which allows to select * file/directory via QFileDialog. */ @@ -79,10 +79,10 @@ bool PathSelection::eventFilter(QObject *obj, QEvent *event) if (fileInfo.exists()) { if (fileInfo.isFile()) { connect(menu->addAction(QIcon::fromTheme(QStringLiteral("system-run")), tr("Open")), &QAction::triggered, - bind(&DesktopUtils::openLocalFileOrDir, m_lineEdit->text())); + bind(&openLocalFileOrDir, m_lineEdit->text())); } else if (fileInfo.isDir()) { connect(menu->addAction(QIcon::fromTheme(QStringLiteral("system-file-manager")), tr("Explore")), &QAction::triggered, - bind(&DesktopUtils::openLocalFileOrDir, m_lineEdit->text())); + bind(&openLocalFileOrDir, m_lineEdit->text())); } } menu->exec(static_cast(event)->globalPos()); @@ -127,4 +127,4 @@ void PathSelection::showFileDialog() } } } -} // namespace Widgets +} // namespace QtUtilities diff --git a/widgets/pathselection.h b/widgets/pathselection.h index 1eca447..21d2379 100644 --- a/widgets/pathselection.h +++ b/widgets/pathselection.h @@ -8,7 +8,7 @@ QT_FORWARD_DECLARE_CLASS(QPushButton) QT_FORWARD_DECLARE_CLASS(QCompleter) -namespace Widgets { +namespace QtUtilities { class ClearLineEdit; @@ -72,6 +72,6 @@ inline void PathSelection::provideCustomFileDialog(QFileDialog *customFileDialog { m_customDialog = customFileDialog; } -} // namespace Widgets +} // namespace QtUtilities #endif // WIDGETS_PATHSELECTION_H