diff --git a/aboutdialog/aboutdialog.cpp b/aboutdialog/aboutdialog.cpp index 01c3ffc..b2faad1 100644 --- a/aboutdialog/aboutdialog.cpp +++ b/aboutdialog/aboutdialog.cpp @@ -10,7 +10,8 @@ /*! \namespace Dialogs - \brief Provides common dialogs such as AboutDialog, EnterPasswordDialog and SettingsDialog. + \brief Provides common dialogs such as AboutDialog, EnterPasswordDialog and + SettingsDialog. */ namespace Dialogs { @@ -23,12 +24,17 @@ namespace Dialogs { /*! * \brief Constructs an about dialog with the provided information. * \param parent Specifies the parent widget. - * \param applicationName Specifies the name of the application. If empty, QApplication::applicationName() will be used. - * \param creator Specifies the creator of the application. If empty, QApplication::organizationName() will be used. - * \param version Specifies the version of the application. If empty, QApplication::applicationVersion() will be used. + * \param applicationName Specifies the name of the application. If empty, + * QApplication::applicationName() will be used. + * \param creator Specifies the creator of the application. If empty, + * QApplication::organizationName() will be used. + * \param version Specifies the version of the application. If empty, + * QApplication::applicationVersion() will be used. * \param description Specifies a short description about the application. - * \param website Specifies the URL to the website of the application. If empty, QApplication::organizationDomain() will be used. - * \param image Specifies the application icon. If the image is null, the standard information icon will be used. + * \param website Specifies the URL to the website of the application. If empty, + * QApplication::organizationDomain() will be used. + * \param image Specifies the application icon. If the image is null, the + * standard information icon will be used. */ AboutDialog::AboutDialog(QWidget *parent, const QString &applicationName, const QString &creator, const QString &version, const QString &website, const QString &description, const QImage &image) @@ -48,9 +54,10 @@ 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); - m_ui->websiteLabel->setText( - tr("For updates and bug reports visit the project website.") - .arg(website.isEmpty() ? QApplication::organizationDomain() : website)); + m_ui->websiteLabel->setText(tr( + "For updates and bug reports visit the project " + "website.").arg(website.isEmpty() ? QApplication::organizationDomain() : website)); m_ui->descLabel->setText(description); m_iconScene = new QGraphicsScene(this); auto *item = image.isNull() @@ -63,7 +70,8 @@ AboutDialog::AboutDialog(QWidget *parent, const QString &applicationName, const } /*! - * \brief Constructs an about dialog with the specified \a parent, \a description and \a image. + * \brief Constructs an about dialog with the specified \a parent, \a + * description and \a image. */ AboutDialog::AboutDialog(QWidget *parent, const QString &description, const QImage &image) : AboutDialog(parent, QString(), QString(), QString(), QString(), description, image) diff --git a/enterpassworddialog/enterpassworddialog.cpp b/enterpassworddialog/enterpassworddialog.cpp index 18bea9b..e312355 100644 --- a/enterpassworddialog/enterpassworddialog.cpp +++ b/enterpassworddialog/enterpassworddialog.cpp @@ -25,7 +25,8 @@ namespace Dialogs { /*! * \class Dialogs::EnterPasswordDialog - * \brief The EnterPasswordDialog class provides a simple dialog to ask the user for a password. + * \brief The EnterPasswordDialog class provides a simple dialog to ask the user + * for a password. */ /*! @@ -78,7 +79,8 @@ EnterPasswordDialog::~EnterPasswordDialog() } /*! - * \brief Returns the description. The description is shown under the instruction text. + * \brief Returns the description. The description is shown under the + * instruction text. * \sa setDescription() */ QString EnterPasswordDialog::description() const @@ -120,7 +122,8 @@ void EnterPasswordDialog::setPromptForUserName(bool prompt) } /*! - * \brief Returns an indication whether a verification (password has to be entered twice) is required. + * \brief Returns an indication whether a verification (password has to be + * entered twice) is required. * * \sa EnterPasswordDialog::setVerificationRequired() */ @@ -132,7 +135,8 @@ bool EnterPasswordDialog::isVerificationRequired() const /*! * \brief Returns an indication whether the user is force to enter a password. * - * If no password is required, the user is allowed to skip the dialog without entering + * If no password is required, the user is allowed to skip the dialog without + * entering * a password. * * \sa EnterPasswordDialog::setPasswordRequired() @@ -145,7 +149,8 @@ bool EnterPasswordDialog::isPasswordRequired() const /*! * \brief Sets whether the user is force to enter a password. * - * If no password is required, the user is allowed to skip the dialog without entering + * If no password is required, the user is allowed to skip the dialog without + * entering * a password. * * \sa EnterPasswordDialog::isPasswordRequired() @@ -158,7 +163,8 @@ void EnterPasswordDialog::setPasswordRequired(bool value) } /*! - * \brief Updates the relevant controls to show entered characters or to mask them them. + * \brief Updates the relevant controls to show entered characters or to mask + * them them. * * This private slot is called when m_ui->showPasswordCheckBox is clicked. */ @@ -170,7 +176,8 @@ void EnterPasswordDialog::updateShowPassword() } /*! - * \brief Sets whether a verification (password has to be entered twice) is required. + * \brief Sets whether a verification (password has to be entered twice) is + * required. * * \sa EnterPasswordDialog::isVerificationRequired() */ @@ -216,9 +223,11 @@ bool EnterPasswordDialog::event(QEvent *event) } /*! - * \brief Internal method to notice when the capslock key is pressed by the user. + * \brief Internal method to notice when the capslock key is pressed by the + * user. * - * Invocation of this method is done by installing the event filter in the constructor. + * Invocation of this method is done by installing the event filter in the + * constructor. */ bool EnterPasswordDialog::eventFilter(QObject *sender, QEvent *event) { @@ -259,7 +268,8 @@ bool EnterPasswordDialog::eventFilter(QObject *sender, QEvent *event) } /*! - * \brief Sets the dialog status to QDialog::Accepted if a valid password has been enterd. + * \brief Sets the dialog status to QDialog::Accepted if a valid password has + * been enterd. * Displays an error message otherwise. * * This private slot is called when m_ui->confirmPushButton is clicked. @@ -280,7 +290,8 @@ void EnterPasswordDialog::confirm() } else { if (isVerificationRequired() && (password != repeatedPassword) && !m_ui->showPasswordCheckBox->isChecked()) { if (repeatedPassword.isEmpty()) { - QMessageBox::warning(this, windowTitle(), tr("You have to enter the new password twice to ensure you enterd it correct.")); + QMessageBox::warning(this, windowTitle(), tr("You have to enter the new password twice to " + "ensure you enterd it correct.")); } else { QMessageBox::warning(this, windowTitle(), tr("You mistyped the password.")); } @@ -294,13 +305,17 @@ void EnterPasswordDialog::confirm() } /*! - * \brief Returns an indication whether the capslock key is pressed using platform specific functions. + * \brief Returns an indication whether the capslock key is pressed using + * platform specific functions. * * \remarks - Returns always false for unsupported platforms. - * - This method always returns false when the detection is not supported. It is supported under X11 + * - This method always returns false when the detection is not + * supported. It is supported under X11 * and Windows. - * - The function requires the application to be linked against X11 on Linux/Unix. - * - This static function will be used internally to detect whether the capslock key is pressed + * - The function requires the application to be linked against X11 on + * Linux/Unix. + * - This static function will be used internally to detect whether the + * capslock key is pressed * when initializing the dialog. */ bool EnterPasswordDialog::isCapslockPressed() diff --git a/misc/adoptlocker.h b/misc/adoptlocker.h index 0b01e45..37f2da0 100644 --- a/misc/adoptlocker.h +++ b/misc/adoptlocker.h @@ -13,16 +13,16 @@ namespace ThreadingUtils { template class AdoptLocker { public: /*! - * \brief Constructs the locker for the specified \a mutex. - */ + * \brief Constructs the locker for the specified \a mutex. + */ AdoptLocker(Mutex &mutex) : m_mutex(mutex) { } /*! - * \brief Unlocks the mutex specified when constructing the instance. - */ + * \brief Unlocks the mutex specified when constructing the instance. + */ ~AdoptLocker() { m_mutex.unlock(); diff --git a/misc/dbusnotification.cpp b/misc/dbusnotification.cpp index 8a128c3..f46013f 100644 --- a/misc/dbusnotification.cpp +++ b/misc/dbusnotification.cpp @@ -15,15 +15,20 @@ namespace MiscUtils { * \class DBusNotification * \brief The DBusNotification class emits D-Bus notifications. * - * D-Bus notifications are only available if the library has been compiled with support for it by specifying - * CMake option `DBUS_NOTIFICATIONS`. If support is available, the macro `QT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS` + * D-Bus notifications are only available if the library has been compiled with + * support for it by specifying + * CMake option `DBUS_NOTIFICATIONS`. If support is available, the macro + * `QT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS` * is defined. * * **Usage** * - * First create a new instance. The constructor allows to set basic parameters. To set more parameters, use - * setter methods. Call show() to actually show the notification. This method can also be used to update - * the currently shown notification (it will not be updated automatically by just using the setter methods). + * First create a new instance. The constructor allows to set basic parameters. + * To set more parameters, use + * setter methods. Call show() to actually show the notification. This method + * can also be used to update + * the currently shown notification (it will not be updated automatically by + * just using the setter methods). * * \sa https://developer.gnome.org/notification-spec */ @@ -115,7 +120,8 @@ void DBusNotification::setIcon(NotificationIcon icon) } /*! - * \brief Makes the notification object delete itself when the notification has been closed or an error occured. + * \brief Makes the notification object delete itself when the notification has + * been closed or an error occured. */ void DBusNotification::deleteOnCloseOrError() { @@ -125,8 +131,10 @@ void DBusNotification::deleteOnCloseOrError() /*! * \brief Shows the notification. - * \remarks If called when a previous notification is still shown, the previous notification is updated. - * \returns Returns false is the D-Bus daemon isn't reachable and true otherwise. + * \remarks If called when a previous notification is still shown, the previous + * notification is updated. + * \returns Returns false is the D-Bus daemon isn't reachable and true + * otherwise. */ bool DBusNotification::show() { @@ -144,8 +152,10 @@ bool DBusNotification::show() /*! * \brief Updates the message and shows/updates the notification. - * \remarks If called when a previous notification is still shown, the previous notification is updated. - * \returns Returns false is the D-Bus daemon isn't reachable and true otherwise. The message is updated in any case. + * \remarks If called when a previous notification is still shown, the previous + * notification is updated. + * \returns Returns false is the D-Bus daemon isn't reachable and true + * otherwise. The message is updated in any case. */ bool DBusNotification::show(const QString &message) { @@ -156,11 +166,14 @@ bool DBusNotification::show(const QString &message) /*! * \brief Updates the message and shows/updates the notification. * \remarks - * - If called when a previous notification is still shown, the previous notification is updated. In this + * - If called when a previous notification is still shown, the previous + * notification is updated. In this * case the specified \a line will be appended to the current message. - * - If called when no previous notification is still shown, the previous message is completely replaced + * - If called when no previous notification is still shown, the previous + * message is completely replaced * by \a line and shown as a new notification. - * \returns Returns false is the D-Bus daemon isn't reachable and true otherwise. The message is updated in any case. + * \returns Returns false is the D-Bus daemon isn't reachable and true + * otherwise. The message is updated in any case. */ bool DBusNotification::update(const QString &line) { @@ -178,7 +191,8 @@ bool DBusNotification::update(const QString &line) /*! * \brief Hides the notification (if still visible). - * \remarks On success, the signal closed() is emitted with the reason NotificationCloseReason::Manually. + * \remarks On success, the signal closed() is emitted with the reason + * NotificationCloseReason::Manually. */ void DBusNotification::hide() { @@ -232,7 +246,8 @@ void DBusNotification::handleActionInvoked(uint id, const QString &action) if (i != pendingNotifications.end()) { DBusNotification *notification = i->second; emit notification->actionInvoked(action); - // Plasma 5 also closes the notification but doesn't emit the NotificationClose signal + // Plasma 5 also closes the notification but doesn't emit the + // NotificationClose signal // -> just consider the notification closed emit notification->closed(NotificationCloseReason::ActionInvoked); notification->m_id = 0; @@ -254,18 +269,21 @@ void DBusNotification::handleActionInvoked(uint id, const QString &action) * \brief Sets the message to be shown. * \remarks * - Might also be set via show() and update(). - * - Can contain the following HTML tags: ``, ``, ``, `` and `...` + * - Can contain the following HTML tags: ``, ``, ``, `` + * and `...` */ /*! * \fn DBusNotification::timeout() - * \brief Returns the number of milliseconds the notification will be visible after calling show(). + * \brief Returns the number of milliseconds the notification will be visible + * after calling show(). * \sa setTimeout() for more details. */ /*! * \fn DBusNotification::setTimeout() - * \brief Sets the number of milliseconds the notification will be visible after calling show(). + * \brief Sets the number of milliseconds the notification will be visible after + * calling show(). * \remarks * - Set to 0 for non-expiring notifications. * - Set to -1 to let the notification daemon decide. @@ -282,7 +300,8 @@ void DBusNotification::handleActionInvoked(uint id, const QString &action) * \brief Sets the list of available actions. * \remarks * The list consists of pairs of action IDs and action labels, eg. - * `QStringList({QStringLiteral("first_id"), tr("First action"), QStringLiteral("second_id"), tr("Second action"), ...})` + * `QStringList({QStringLiteral("first_id"), tr("First action"), + * QStringLiteral("second_id"), tr("Second action"), ...})` * \sa actionInvoked() signal */ diff --git a/misc/dbusnotification.h b/misc/dbusnotification.h index b876188..caf801b 100644 --- a/misc/dbusnotification.h +++ b/misc/dbusnotification.h @@ -115,7 +115,8 @@ inline const QString &DBusNotification::icon() const /*! * \brief Sets the icon name. * \remarks - * The specified \a icon should be either an URI (file:// is the only URI schema supported + * The specified \a icon should be either an URI (file:// is the only URI schema + * supported * right now) or a name in an icon theme. */ inline void DBusNotification::setIcon(const QString &icon) diff --git a/misc/desktoputils.cpp b/misc/desktoputils.cpp index 730b11a..ff138f3 100644 --- a/misc/desktoputils.cpp +++ b/misc/desktoputils.cpp @@ -7,7 +7,8 @@ namespace DesktopUtils { /*! * \brief Shows the specified file or directory using the default file browser. - * \remarks \a path musn't be specified as URL. (Conversion to URL is the purpose of this function). + * \remarks \a path musn't be specified as URL. (Conversion to URL is the + * purpose of this function). */ bool openLocalFileOrDir(const QString &path) { diff --git a/misc/dialogutils.cpp b/misc/dialogutils.cpp index 441dda4..ed924b1 100644 --- a/misc/dialogutils.cpp +++ b/misc/dialogutils.cpp @@ -44,7 +44,8 @@ QString generateWindowTitle(DocumentStatus documentStatus, const QString &docume case DocumentStatus::NoDocument: return QCoreApplication::applicationName(); default: - return QString(); // to suppress warning: "control reaches end of non-void function" + return QString(); // to suppress warning: "control reaches end of non-void + // function" } } @@ -72,17 +73,21 @@ QColor instructionTextColor() #endif /*! - * \brief Returns the stylesheet for dialogs and other windows used in my applications. + * \brief Returns the stylesheet for dialogs and other windows used in my + * applications. */ const QString &dialogStyle() { #ifdef Q_OS_WIN32 - static const auto style - = QStringLiteral("#mainWidget { color: palette(text); background-color: palette(base); border: none; }" - "#bottomWidget { background-color: palette(window); color: palette(window-text); border-top: 1px solid %1; }" - "QMessageBox QLabel, QInputDialog QLabel, *[classNames~=\"heading\"] { font-size: 12pt; color: %2; }" - "*[classNames~=\"input-invalid\"] { color: red; }") - .arg(windowFrameColor().name(), instructionTextColor().name()); + static const auto style = QStringLiteral("#mainWidget { color: palette(text); background-color: " + "palette(base); border: none; }" + "#bottomWidget { background-color: palette(window); " + "color: palette(window-text); border-top: 1px solid %1; }" + "QMessageBox QLabel, QInputDialog QLabel, " + "*[classNames~=\"heading\"] { font-size: 12pt; color: %2; " + "}" + "*[classNames~=\"input-invalid\"] { color: red; }") + .arg(windowFrameColor().name(), instructionTextColor().name()); #else static const auto style = QStringLiteral("*[classNames~=\"heading\"] { font-weight: bold; }" "*[classNames~=\"input-invalid\"] { color: red; }"); @@ -93,8 +98,10 @@ const QString &dialogStyle() #ifdef QT_UTILITIES_GUI_QTWIDGETS /*! - * \brief Moves the specified \a widget in the middle of the (available) screen area. If there are multiple - * screens available, the screen where the cursor currently is located is chosen. + * \brief Moves the specified \a widget in the middle of the (available) screen + * area. If there are multiple + * screens available, the screen where the cursor currently is located is + * chosen. */ void centerWidget(QWidget *widget) { @@ -103,8 +110,10 @@ void centerWidget(QWidget *widget) } /*! - * \brief Moves the specified \a widget to the corner which is closest to the current cursor position. - * If there are multiple screens available, the screen where the cursor currently is located is chosen. + * \brief Moves the specified \a widget to the corner which is closest to the + * current cursor position. + * If there are multiple screens available, the screen where the cursor + * currently is located is chosen. */ void cornerWidget(QWidget *widget) { @@ -127,7 +136,8 @@ void makeHeading(QWidget *widget) /*! * \brief Updates the widget style. * \remarks Useful when dynamic properties are used in the stylesheet because - * the widget style does not update automatically when a property changes. + * the widget style does not update automatically when a property + * changes. */ void updateStyle(QWidget *widget) { diff --git a/misc/dialogutils.h b/misc/dialogutils.h index 58660cc..1f981ab 100644 --- a/misc/dialogutils.h +++ b/misc/dialogutils.h @@ -12,12 +12,16 @@ QT_FORWARD_DECLARE_CLASS(QColor) namespace Dialogs { /*! - * \brief The DocumentStatus enum specifies the status of the document in a window. + * \brief The DocumentStatus enum specifies the status of the document in a + * window. */ enum class DocumentStatus { - NoDocument, /**< There is no document opened. The document path is ignored in this case. */ - Saved, /**< There is a document opened. All modifications have been saved yet. */ - Unsaved /**< There is a document opened and there are unsaved modifications. */ + NoDocument, /**< There is no document opened. The document path is ignored in + this case. */ + Saved, /**< There is a document opened. All modifications have been saved yet. + */ + Unsaved /**< There is a document opened and there are unsaved modifications. + */ }; QString QT_UTILITIES_EXPORT generateWindowTitle(DocumentStatus documentStatus, const QString &documentPath); diff --git a/misc/recentmenumanager.cpp b/misc/recentmenumanager.cpp index 68dd0b5..89fc0e5 100644 --- a/misc/recentmenumanager.cpp +++ b/misc/recentmenumanager.cpp @@ -12,7 +12,8 @@ namespace MiscUtils { /*! * \class RecentMenuManager - * \brief The RecentMenuManager class manages the entries for a "recently opened files" menu. + * \brief The RecentMenuManager class manages the entries for a "recently opened + * files" menu. */ /*! @@ -22,7 +23,8 @@ namespace MiscUtils { * \remarks * - Menu title and icon are set within the constructor. * - The current menu entries are cleared. - * - The menu entries shouldn't be manipulated manually by the caller till the manager is destructed. + * - The menu entries shouldn't be manipulated manually by the caller till the + * manager is destructed. * - The manager does not take ownership over \a menu. */ RecentMenuManager::RecentMenuManager(QMenu *menu, QObject *parent) @@ -74,7 +76,8 @@ QStringList RecentMenuManager::save() } /*! - * \brief Ensures an entry for the specified \a path is present and the first entry in the list. + * \brief Ensures an entry for the specified \a path is present and the first + * entry in the list. */ void RecentMenuManager::addEntry(const QString &path) { @@ -126,7 +129,8 @@ void RecentMenuManager::clearEntries() } /*! - * \brief Internally called to emit fileSelected() after an action has been triggered. + * \brief Internally called to emit fileSelected() after an action has been + * triggered. */ void RecentMenuManager::handleActionTriggered() { @@ -138,7 +142,8 @@ void RecentMenuManager::handleActionTriggered() } else { QMessageBox msg; msg.setWindowTitle(tr("Recently opened files - ") + QCoreApplication::applicationName()); - msg.setText(tr("The selected file can't be found anymore. Do you want to delete the obsolete entry from the list?")); + msg.setText(tr("The selected file can't be found anymore. Do you want " + "to delete the obsolete entry from the list?")); msg.setIcon(QMessageBox::Warning); QPushButton *keepEntryButton = msg.addButton(tr("keep entry"), QMessageBox::NoRole); QPushButton *deleteEntryButton = msg.addButton(tr("delete entry"), QMessageBox::YesRole); @@ -162,6 +167,7 @@ void RecentMenuManager::handleActionTriggered() /*! * \fn RecentMenuManager::fileSelected() * \brief Emitted after the user selected a file. - * \remarks Only emitted when the selected file still existed; otherwise the user is ask whether to keep or delete the entry. + * \remarks Only emitted when the selected file still existed; otherwise the + * user is ask whether to keep or delete the entry. */ } diff --git a/misc/trylocker.h b/misc/trylocker.h index 8d7cabe..50e1979 100644 --- a/misc/trylocker.h +++ b/misc/trylocker.h @@ -13,17 +13,17 @@ namespace ThreadingUtils { template class TryLocker { public: /*! - * \brief Tries to lock the specified mutex. - */ + * \brief Tries to lock the specified mutex. + */ TryLocker(Mutex &mutex) : m_mutex(mutex.tryLock() ? &mutex : nullptr) { } /*! - * \brief Unlocks the mutex specified when constructing. - * \remarks Does nothing if the mutex couldn't be locked in the first place. - */ + * \brief Unlocks the mutex specified when constructing. + * \remarks Does nothing if the mutex couldn't be locked in the first place. + */ ~TryLocker() { if (m_mutex) { @@ -32,16 +32,16 @@ public: } /*! - * \brief Returns whether the mutex could be locked. - */ + * \brief Returns whether the mutex could be locked. + */ bool isLocked() const { return m_mutex != nullptr; } /*! - * \brief Returns whether the mutex could be locked. - */ + * \brief Returns whether the mutex could be locked. + */ operator bool() const { return m_mutex != nullptr; diff --git a/models/checklistmodel.cpp b/models/checklistmodel.cpp index dd6809e..71611c2 100644 --- a/models/checklistmodel.cpp +++ b/models/checklistmodel.cpp @@ -11,12 +11,14 @@ namespace Models { /*! * \class Models::ChecklistItem - * \brief The ChecklistItem class provides an item for use with the ChecklistModel class. + * \brief The ChecklistItem class provides an item for use with the + * ChecklistModel class. */ /*! * \class Models::ChecklistModel - * \brief The ChecklistModel class provides a generic model for storing checkable items. + * \brief The ChecklistModel class provides a generic model for storing + * checkable items. */ /*! @@ -169,7 +171,8 @@ void ChecklistModel::setItems(const QList &items) } /*! - * \brief Restores the IDs and checkstates read from the specified \a settings object. + * \brief Restores the IDs and checkstates read from the specified \a settings + * object. * * The items will be read from the array with the specified \a name. * diff --git a/paletteeditor/colorbutton.cpp b/paletteeditor/colorbutton.cpp index 9eec038..9caa8eb 100644 --- a/paletteeditor/colorbutton.cpp +++ b/paletteeditor/colorbutton.cpp @@ -149,21 +149,22 @@ void ColorButton::paintEvent(QPaintEvent *event) p.setBrushOrigin((r.width() % pixSize + pixSize) / 2 + corr, (r.height() % pixSize + pixSize) / 2 + corr); p.fillRect(r, br); - //const int adjX = qRound(r.width() / 4.0); - //const int adjY = qRound(r.height() / 4.0); - //p.fillRect(r.adjusted(adjX, adjY, -adjX, -adjY), + // const int adjX = qRound(r.width() / 4.0); + // const int adjY = qRound(r.height() / 4.0); + // p.fillRect(r.adjusted(adjX, adjY, -adjX, -adjY), // QColor(d_ptr->shownColor().rgb())); /* - p.fillRect(r.adjusted(0, r.height() * 3 / 4, 0, 0), - QColor(d_ptr->shownColor().rgb())); - p.fillRect(r.adjusted(0, 0, 0, -r.height() * 3 / 4), - QColor(d_ptr->shownColor().rgb())); - */ + p.fillRect(r.adjusted(0, r.height() * 3 / 4, 0, 0), + QColor(d_ptr->shownColor().rgb())); + p.fillRect(r.adjusted(0, 0, 0, -r.height() * 3 / 4), + QColor(d_ptr->shownColor().rgb())); + */ /* - const QColor frameColor0(0, 0, 0, qRound(0.2 * (0xFF - d_ptr->shownColor().alpha()))); - p.setPen(frameColor0); - p.drawRect(r.adjusted(adjX, adjY, -adjX - 1, -adjY - 1)); - */ + const QColor frameColor0(0, 0, 0, qRound(0.2 * (0xFF - + d_ptr->shownColor().alpha()))); + p.setPen(frameColor0); + p.drawRect(r.adjusted(adjX, adjY, -adjX - 1, -adjY - 1)); + */ const QColor frameColor1(0, 0, 0, 26); p.setPen(frameColor1); diff --git a/paletteeditor/paletteeditor.cpp b/paletteeditor/paletteeditor.cpp index bdef05e..b805508 100644 --- a/paletteeditor/paletteeditor.cpp +++ b/paletteeditor/paletteeditor.cpp @@ -272,7 +272,8 @@ bool PaletteModel::setData(const QModelIndex &index, const QVariant &value, int idxBegin = PaletteModel::index(QPalette::Base, 0); break; case QPalette::Highlight: - //m_palette.setBrush(QPalette::Disabled, QPalette::Highlight, c.dark(120)); + // m_palette.setBrush(QPalette::Disabled, QPalette::Highlight, + // c.dark(120)); break; default: m_palette.setBrush(QPalette::Disabled, r, br); @@ -411,7 +412,8 @@ RoleEditor::RoleEditor(QWidget *parent) layout->addWidget(m_label); m_label->setAutoFillBackground(true); - m_label->setIndent(3); // ### hardcode it should have the same value of textMargin in QItemDelegate + m_label->setIndent(3); // ### hardcode it should have the same value of + // textMargin in QItemDelegate setFocusProxy(m_label); QToolButton *button = new QToolButton(this); @@ -461,8 +463,8 @@ QWidget *ColorDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem if (index.column() == 0) { RoleEditor *editor = new RoleEditor(parent); connect(editor, &RoleEditor::changed, this, &ColorDelegate::commitData); - //editor->setFocusPolicy(Qt::NoFocus); - //editor->installEventFilter(const_cast(this)); + // editor->setFocusPolicy(Qt::NoFocus); + // editor->installEventFilter(const_cast(this)); ed = editor; } else { typedef void (BrushEditor::*BrushEditorWidgetSignal)(QWidget *); diff --git a/paletteeditor/paletteeditor.h b/paletteeditor/paletteeditor.h index 5a4dafc..2a60624 100644 --- a/paletteeditor/paletteeditor.h +++ b/paletteeditor/paletteeditor.h @@ -26,7 +26,8 @@ class PaletteEditor; /*! * \brief The PaletteEditor class provides a dialog to customize a QPalette. * - * This is taken from qttools/src/designer/src/components/propertyeditor/paletteeditor.cpp. + * This is taken from + * qttools/src/designer/src/components/propertyeditor/paletteeditor.cpp. * In contrast to the original version this version doesn't provide a preview. */ class QT_UTILITIES_EXPORT PaletteEditor : public QDialog { diff --git a/resources/qtconfigarguments.cpp b/resources/qtconfigarguments.cpp index 79c2661..dd368fe 100644 --- a/resources/qtconfigarguments.cpp +++ b/resources/qtconfigarguments.cpp @@ -28,11 +28,15 @@ QtConfigArguments::QtConfigArguments() : m_qtWidgetsGuiArg("qt-widgets-gui", 'g', "shows a Qt widgets based graphical user interface") , m_qtQuickGuiArg("qt-quick-gui", 'q', "shows a Qt quick based graphical user interface") , m_lngArg("lang", 'l', "sets the language for the Qt GUI") - , m_qmlDebuggerArg("qmljsdebugger", '\0', "enables QML debugging (see http://doc.qt.io/qt-5/qtquick-debugging.html)") + , m_qmlDebuggerArg("qmljsdebugger", '\0', "enables QML debugging (see " + "http://doc.qt.io/qt-5/" + "qtquick-debugging.html)") , m_styleArg("style", '\0', "sets the Qt widgets style") - , m_iconThemeArg("icon-theme", '\0', "sets the icon theme and additional theme search paths for the Qt GUI") + , m_iconThemeArg("icon-theme", '\0', "sets the icon theme and additional " + "theme search paths for the Qt GUI") , m_fontArg("font", '\0', "sets the font family and size (point) for the Qt GUI") - , m_libraryPathsArg("library-paths", '\0', "sets the list of directories to search when loading libraries (all existing paths will be deleted)") + , m_libraryPathsArg("library-paths", '\0', "sets the list of directories to search when loading " + "libraries (all existing paths will be deleted)") , m_platformThemeArg("platformtheme", '\0', "specifies the Qt platform theme to be used") { // language @@ -76,7 +80,8 @@ QtConfigArguments::QtConfigArguments() /*! * \brief Applies the settings from the arguments. * \remarks Also checks environment variables for the icon theme. - * \param preventApplyingDefaultFont If true, the font will not be updated to some default value if no font has been specified explicitly. + * \param preventApplyingDefaultFont If true, the font will not be updated to + * some default value if no font has been specified explicitly. */ void QtConfigArguments::applySettings(bool preventApplyingDefaultFont) const { @@ -136,7 +141,9 @@ void QtConfigArguments::applySettings(bool preventApplyingDefaultFont) const try { font.setPointSize(stringToNumber(m_fontArg.values().back())); } catch (const ConversionException &) { - cerr << "Warning: The specified font size is no number and will be ignored." << endl; + cerr << "Warning: The specified font size is no number and will be " + "ignored." + << endl; } QGuiApplication::setFont(font); } diff --git a/resources/resources.cpp b/resources/resources.cpp index 81e4d4e..f5bcd03 100644 --- a/resources/resources.cpp +++ b/resources/resources.cpp @@ -80,14 +80,18 @@ QString &additionalTranslationFilePath() } /*! - * \brief Loads and installs the appropriate Qt translation file for the current locale. - * \param repositoryNames Specifies the names of the Qt repositories to load translations for (eg. qtbase, qtscript, ...). + * \brief Loads and installs the appropriate Qt translation file for the current + * locale. + * \param repositoryNames Specifies the names of the Qt repositories to load + * translations for (eg. qtbase, qtscript, ...). * \remarks * - Translation files have to be placed in one of the following locations: * * QLibraryInfo::location(QLibraryInfo::TranslationsPath) (used in UNIX) * * ../share/qt/translations (used in Windows) - * - Translation files can also be built-in using by setting the CMake variable BUILTIN_TRANSLATIONS. - * In this case it is also necessary to load the translations using this function. + * - Translation files can also be built-in using by setting the CMake variable + * BUILTIN_TRANSLATIONS. + * In this case it is also necessary to load the translations using this + * function. */ void loadQtTranslationFile(std::initializer_list repositoryNames) { @@ -95,15 +99,19 @@ void loadQtTranslationFile(std::initializer_list repositoryNames) } /*! - * \brief Loads and installs the appropriate Qt translation file for the specified locale. - * \param repositoryNames Specifies the names of the Qt repositories to load translations for (eg. qtbase, qtscript, ...). + * \brief Loads and installs the appropriate Qt translation file for the + * specified locale. + * \param repositoryNames Specifies the names of the Qt repositories to load + * translations for (eg. qtbase, qtscript, ...). * \param localeName Specifies the name of the locale. * \remarks * - Translation files have to be placed in one of the following locations: * * QLibraryInfo::location(QLibraryInfo::TranslationsPath) (used in UNIX) * * ../share/qt/translations (used in Windows) - * - Translation files can also be built-in using by setting the CMake variable BUILTIN_TRANSLATIONS. - * In this case it is also necessary to load the translations using this function. + * - Translation files can also be built-in using by setting the CMake variable + * BUILTIN_TRANSLATIONS. + * In this case it is also necessary to load the translations using this + * function. */ void loadQtTranslationFile(initializer_list repositoryNames, const QString &localeName) { @@ -128,7 +136,8 @@ void loadQtTranslationFile(initializer_list repositoryNames, const QStr } /*! - * \brief Loads and installs the appropriate application translation file for the current locale. + * \brief Loads and installs the appropriate application translation file for + * the current locale. * \param applicationName Specifies the name of the application. * \remarks * - Translation files have to be placed in one of the following locations: @@ -137,8 +146,10 @@ void loadQtTranslationFile(initializer_list repositoryNames, const QStr * * ../share/$application/translations (used in Windows) * - Translation files must be named using the following scheme: * * $application_$language.qm - * - Translation files can also be built-in using by setting the CMake variable BUILTIN_TRANSLATIONS. - * In this case it is also necessary to load the translations using this function. + * - Translation files can also be built-in using by setting the CMake variable + * BUILTIN_TRANSLATIONS. + * In this case it is also necessary to load the translations using this + * function. */ void loadApplicationTranslationFile(const QString &applicationName) { @@ -151,7 +162,8 @@ void loadApplicationTranslationFile(const QString &applicationName) } /*! - * \brief Loads and installs the appropriate application translation file for the specified locale. + * \brief Loads and installs the appropriate application translation file for + * the specified locale. * \param applicationName Specifies the name of the application. * \param localeName Specifies the name of the locale. * \remarks @@ -161,8 +173,10 @@ void loadApplicationTranslationFile(const QString &applicationName) * * ../share/$application/translations (used in Windows) * - Translation files must be named using the following scheme: * * $application_$language.qm - * - Translation files can also be built-in using by setting the CMake variable BUILTIN_TRANSLATIONS. - * In this case it is also necessary to load the translations using this function. + * - Translation files can also be built-in using by setting the CMake variable + * BUILTIN_TRANSLATIONS. + * In this case it is also necessary to load the translations using this + * function. */ void loadApplicationTranslationFile(const QString &applicationName, const QString &localeName) { @@ -188,7 +202,8 @@ void loadApplicationTranslationFile(const QString &applicationName, const QStrin } /*! - * \brief Loads and installs the appropriate application translation file for the current locale. + * \brief Loads and installs the appropriate application translation file for + * the current locale. * \param applicationNames Specifies the names of the applications. */ void loadApplicationTranslationFile(const std::initializer_list &applicationNames) @@ -199,7 +214,8 @@ void loadApplicationTranslationFile(const std::initializer_list &applic } /*! - * \brief Loads and installs the appropriate application translation file for the specified locale. + * \brief Loads and installs the appropriate application translation file for + * the specified locale. * \param applicationNames Specifies the names of the applications. * \param localeName Specifies the name of the locale. */ @@ -212,7 +228,9 @@ void loadApplicationTranslationFile(const std::initializer_list &applic } /*! - * \brief Convenience functions to check whether a QCoreApplication/QGuiApplication/QApplication singleton has been instantiated yet. + * \brief Convenience functions to check whether a + * QCoreApplication/QGuiApplication/QApplication singleton has been instantiated + * yet. */ namespace ApplicationInstances { @@ -251,8 +269,10 @@ bool hasCoreApp() namespace ConfigFile { /*! - * \brief Locates the config file with the specified \a fileName for the application with the specified \a applicationName. - * \remarks If \a settings is not nullptr, the path provided by that object is also considered. + * \brief Locates the config file with the specified \a fileName for the + * application with the specified \a applicationName. + * \remarks If \a settings is not nullptr, the path provided by that object is + * also considered. */ QString locateConfigFile(const QString &applicationName, const QString &fileName, const QSettings *settings) { @@ -275,7 +295,8 @@ QString locateConfigFile(const QString &applicationName, const QString &fileName if (QFile::exists(path)) { return path; } else { - // check whether there is the default version of the file under /usr/share/app/ + // check whether there is the default version of the file under + // /usr/share/app/ path = QStringLiteral("../share/") % applicationName % QChar('/') % fileName; if (QFile::exists(path)) { return path; @@ -288,7 +309,8 @@ QString locateConfigFile(const QString &applicationName, const QString &fileName if (QFile::exists(path)) { return path; } else { - // check whether there is the default version of the file under /usr/share/app/ + // check whether there is the default version of the file under + // /usr/share/app/ path = QStringLiteral("/usr/share/") % applicationName % QChar('/') % fileName; if (QFile::exists(path)) { return path; diff --git a/settingsdialog/optioncategory.cpp b/settingsdialog/optioncategory.cpp index 98c531c..d3d73c3 100644 --- a/settingsdialog/optioncategory.cpp +++ b/settingsdialog/optioncategory.cpp @@ -51,7 +51,8 @@ void OptionCategory::resetAllPages() } /*! - * \brief Returns whether the option category matches the specified \a searchKeyWord. + * \brief Returns whether the option category matches the specified \a + * searchKeyWord. */ bool OptionCategory::matches(const QString &searchKeyWord) const { diff --git a/settingsdialog/optioncategoryfiltermodel.cpp b/settingsdialog/optioncategoryfiltermodel.cpp index 9cf94a8..adbea2f 100644 --- a/settingsdialog/optioncategoryfiltermodel.cpp +++ b/settingsdialog/optioncategoryfiltermodel.cpp @@ -6,7 +6,8 @@ namespace Dialogs { /*! * \class Dialogs::OptionCategoryFilterModel - * \brief The OptionCategoryFilterModel class is used by SettingsDialog to filter option categories. + * \brief The OptionCategoryFilterModel class is used by SettingsDialog to + * filter option categories. */ /*! diff --git a/settingsdialog/optioncategorymodel.cpp b/settingsdialog/optioncategorymodel.cpp index 99b3202..1b6e9dd 100644 --- a/settingsdialog/optioncategorymodel.cpp +++ b/settingsdialog/optioncategorymodel.cpp @@ -10,7 +10,8 @@ namespace Dialogs { /*! * \class Dialogs::OptionCategoryModel - * \brief The OptionCategoryModel class is used by SettingsDialog to store and display option categories. + * \brief The OptionCategoryModel class is used by SettingsDialog to store and + * display option categories. */ /*! diff --git a/settingsdialog/optionpage.cpp b/settingsdialog/optionpage.cpp index 577cdf8..e903ade 100644 --- a/settingsdialog/optionpage.cpp +++ b/settingsdialog/optionpage.cpp @@ -12,7 +12,8 @@ namespace Dialogs { * \class Dialogs::OptionPage * \brief The OptionPage class is the base class for SettingsDialog pages. * - * The specified \a parentWindow might be used by some implementations as parent when showing dialogs. + * The specified \a parentWindow might be used by some implementations as parent + * when showing dialogs. */ /*! @@ -98,6 +99,7 @@ bool OptionPage::matches(const QString &searchKeyWord) /*! * \fn OptionPage::setupWidget() - * \brief Creates the widget for the page. Called in the first invocation of widget(). + * \brief Creates the widget for the page. Called in the first invocation of + * widget(). */ } diff --git a/settingsdialog/optionpage.h b/settingsdialog/optionpage.h index 78307b5..4d73816 100644 --- a/settingsdialog/optionpage.h +++ b/settingsdialog/optionpage.h @@ -57,7 +57,8 @@ inline bool OptionPage::hasBeenShown() const } /*! - * \brief Returns the errors which haven been occurred when applying the changes. + * \brief Returns the errors which haven been occurred when applying the + * changes. */ inline const QStringList &OptionPage::errors() const { @@ -65,9 +66,11 @@ inline const QStringList &OptionPage::errors() const } /*! - * \brief Returns the errors which haven been occurred when applying the changes. + * \brief Returns the errors which haven been occurred when applying the + * changes. * - * Error messages should be added when implementing apply() and something goes wrong. + * Error messages should be added when implementing apply() and something goes + * wrong. * In this case, apply() should return false. */ inline QStringList &OptionPage::errors() @@ -77,7 +80,8 @@ inline QStringList &OptionPage::errors() /*! * \class Dialogs::UiFileBasedOptionPage - * \brief The UiFileBasedOptionPage class is the base class for SettingsDialog pages using UI files + * \brief The UiFileBasedOptionPage class is the base class for SettingsDialog + * pages using UI files * to describe the widget tree. * * \tparam UiClass Specifies the UI class generated by uic. @@ -137,7 +141,8 @@ template inline UiClass *UiFileBasedOptionPage::ui() } /*! - * \brief Declares a class inheriting from Dialogs::OptionPage in a convenient way. + * \brief Declares a class inheriting from Dialogs::OptionPage in a convenient + * way. * \remarks Must be closed with END_DECLARE_OPTION_PAGE. */ #define BEGIN_DECLARE_OPTION_PAGE(SomeClass) \ @@ -152,7 +157,8 @@ template inline UiClass *UiFileBasedOptionPage::ui() private: /*! - * \brief Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way. + * \brief Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a + * convenient way. * \remarks Must be closed with END_DECLARE_OPTION_PAGE. */ #define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_CTOR(SomeClass) \ @@ -169,7 +175,8 @@ template inline UiClass *UiFileBasedOptionPage::ui() private: /*! - * \brief Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way. + * \brief Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a + * convenient way. * \remarks Must be closed with END_DECLARE_OPTION_PAGE. */ #define BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE(SomeClass) \ @@ -180,14 +187,16 @@ public: private: /*! - * \brief Must be used after BEGIN_DECLARE_OPTION_PAGE and BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE. + * \brief Must be used after BEGIN_DECLARE_OPTION_PAGE and + * BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE. */ #define END_DECLARE_OPTION_PAGE \ } \ ; /*! - * \brief Instantiates a class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE in a convenient way. + * \brief Instantiates a class declared with + * BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE in a convenient way. * \remarks Might be required when the class is used by another application. */ #define INSTANTIATE_UI_FILE_BASED_OPTION_PAGE(SomeClass) \ @@ -196,16 +205,19 @@ private: } /*! - * \brief Instantiates a class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE inside a given namespace in a convenient way. + * \brief Instantiates a class declared with + * BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE inside a given namespace in a + * convenient way. * \remarks Might be required when the class is used by another application. */ #define INSTANTIATE_UI_FILE_BASED_OPTION_PAGE_NS(SomeNamespace, SomeClass) \ namespace Dialogs { \ - template class UiFileBasedOptionPage< ::SomeNamespace::Ui::SomeClass>; \ + template class UiFileBasedOptionPage<::SomeNamespace::Ui::SomeClass>; \ } /*! - * \brief Declares external instantiation of class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE in a convenient way. + * \brief Declares external instantiation of class declared with + * BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE in a convenient way. * \remarks Might be required when the class comes from an external library. */ #define DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE(SomeClass) \ @@ -217,7 +229,9 @@ private: } /*! - * \brief Declares external instantiation of class declared with BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE inside a given namespace in a convenient way. + * \brief Declares external instantiation of class declared with + * BEGIN_DECLARE_UI_FILE_BASED_OPTION_PAGE inside a given namespace in a + * convenient way. * \remarks Might be required when the class comes from an external library. */ #define DECLARE_EXTERN_UI_FILE_BASED_OPTION_PAGE_NS(SomeNamespace, SomeClass) \ @@ -227,12 +241,13 @@ private: } \ } \ namespace Dialogs { \ - extern template class UiFileBasedOptionPage< ::SomeNamespace::Ui::SomeClass>; \ + extern template class UiFileBasedOptionPage<::SomeNamespace::Ui::SomeClass>; \ } /*! * \brief Declares the method setupWidget() in a convenient way. - * \remarks Can be used between BEGIN_DECLARE_OPTION_PAGE and END_DECLARE_OPTION_PAGE. + * \remarks Can be used between BEGIN_DECLARE_OPTION_PAGE and + * END_DECLARE_OPTION_PAGE. */ #define DECLARE_SETUP_WIDGETS \ protected: \ @@ -241,7 +256,8 @@ protected: private: /*! - * \brief Declares a class inheriting from Dialogs::OptionPage in a convenient way. + * \brief Declares a class inheriting from Dialogs::OptionPage in a convenient + * way. * \remarks Doesn't allow to declare additional class members. */ #define DECLARE_UI_FILE_BASED_OPTION_PAGE(SomeClass) \ @@ -249,7 +265,8 @@ private: END_DECLARE_OPTION_PAGE /*! - * \brief Declares a class inheriting from Dialogs::OptionPage in a convenient way. + * \brief Declares a class inheriting from Dialogs::OptionPage in a convenient + * way. * \remarks Doesn't allow to declare additional class members. */ #define DECLARE_OPTION_PAGE(SomeClass) \ @@ -258,7 +275,8 @@ private: END_DECLARE_OPTION_PAGE /*! - * \brief Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a convenient way. + * \brief Declares a class inheriting from Dialogs::UiFileBasedOptionPage in a + * convenient way. * \remarks Doesn't allow to declare additional class members. */ #define DECLARE_UI_FILE_BASED_OPTION_PAGE_CUSTOM_SETUP(SomeClass) \ diff --git a/settingsdialog/qtsettings.cpp b/settingsdialog/qtsettings.cpp index 39f8efb..5eddb32 100644 --- a/settingsdialog/qtsettings.cpp +++ b/settingsdialog/qtsettings.cpp @@ -64,8 +64,10 @@ inline QtSettingsData::QtSettingsData() /*! * \brief Creates a new settings object. - * \remarks Settings are not restored automatically. Instead, some values (font, widget style, ...) are initialized - * from the current Qt configuration. These values are considered as system-default. + * \remarks Settings are not restored automatically. Instead, some values (font, + * widget style, ...) are initialized + * from the current Qt configuration. These values are considered as + * system-default. */ QtSettings::QtSettings() : m_d(new QtSettingsData()) @@ -74,7 +76,8 @@ QtSettings::QtSettings() /*! * \brief Destroys the settings object. - * \remarks Unlike QSettings not explicitely saved settings are not saved automatically. + * \remarks Unlike QSettings not explicitely saved settings are not saved + * automatically. */ QtSettings::~QtSettings() { @@ -90,7 +93,8 @@ bool QtSettings::hasCustomFont() const /*! * \brief Restors the settings from the specified QSettings object. - * \remarks The restored values are not applied automatically (except translation path). + * \remarks The restored values are not applied automatically (except + * translation path). * \sa apply(), save() */ void QtSettings::restore(QSettings &settings) @@ -142,8 +146,10 @@ void QtSettings::save(QSettings &settings) const * \brief Applies the current configuraion. * \remarks * - Some settings take only affect after restarting the application. - * - QApplication/QGuiApplication must be instantiated before calling this method. - * - Hence it makes most sense to call this directly after instantiating QApplication/QGuiApplication. + * - QApplication/QGuiApplication must be instantiated before calling this + * method. + * - Hence it makes most sense to call this directly after instantiating + * QApplication/QGuiApplication. */ void QtSettings::apply() { @@ -197,8 +203,10 @@ void QtSettings::apply() /*! * \brief Returns a new OptionCatecory containing all Qt related option pages. * \remarks - * - The QtSettings instance does not keep the ownership over the returned category. - * - The pages of the returned category require the QtSetings instance which hence + * - The QtSettings instance does not keep the ownership over the returned + * category. + * - The pages of the returned category require the QtSetings instance which + * hence * must be present as long as all pages are destroyed. */ OptionCategory *QtSettings::category() diff --git a/settingsdialog/settingsdialog.cpp b/settingsdialog/settingsdialog.cpp index cb01a00..a21c1a8 100644 --- a/settingsdialog/settingsdialog.cpp +++ b/settingsdialog/settingsdialog.cpp @@ -19,7 +19,8 @@ namespace Dialogs { /*! * \class Dialogs::SettingsDialog - * \brief The SettingsDialog class provides a framework for creating settings dialogs with different categories and subcategories. + * \brief The SettingsDialog class provides a framework for creating settings + * dialogs with different categories and subcategories. */ /*! @@ -86,7 +87,8 @@ OptionCategory *SettingsDialog::category(int categoryIndex) const } /*! - * \brief Returns the page for the specified \a categoryIndex and the specified \a pageIndex. + * \brief Returns the page for the specified \a categoryIndex and the specified + * \a pageIndex. * * The settings dialog keeps ownership over the returned category. * If no page for the specified indices a null pointer is returned. @@ -116,9 +118,11 @@ void SettingsDialog::showEvent(QShowEvent *event) } /*! - * \brief Shows the selected category specified by its model \a index in the category filter model. + * \brief Shows the selected category specified by its model \a index in the + * category filter model. * - * This private slot is called when m_ui->categoriesListView->selectionModel()->currentChanged() is emitted. + * This private slot is called when + * m_ui->categoriesListView->selectionModel()->currentChanged() is emitted. */ void SettingsDialog::currentCategoryChanged(const QModelIndex &index) { @@ -126,7 +130,8 @@ void SettingsDialog::currentCategoryChanged(const QModelIndex &index) } /*! - * \brief Sets the current category to the specified \a category and updates the relevant widgets to show it. + * \brief Sets the current category to the specified \a category and updates the + * relevant widgets to show it. */ void SettingsDialog::showCategory(OptionCategory *category) { @@ -146,10 +151,13 @@ void SettingsDialog::showCategory(OptionCategory *category) } /*! - * \brief Enables *single-category mode* to show only the specified \a singleCategory. + * \brief Enables *single-category mode* to show only the specified \a + * singleCategory. * \remarks - * - In *single-category mode* category selection, filter and heading are hidden. - * - The *single-category mode* can be disabled again by setting \a singleCategory to nullptr. + * - In *single-category mode* category selection, filter and heading are + * hidden. + * - The *single-category mode* can be disabled again by setting \a + * singleCategory to nullptr. */ void SettingsDialog::setSingleCategory(OptionCategory *singleCategory) { @@ -215,7 +223,8 @@ void SettingsDialog::updateTabWidget() } /*! - * \brief Applies all changes. Calls OptionCategory::applyAllPages() for each category. + * \brief Applies all changes. Calls OptionCategory::applyAllPages() for each + * category. */ bool SettingsDialog::apply() { @@ -249,7 +258,8 @@ bool SettingsDialog::apply() } /*! - * \brief Resets all changes. Calls OptionCategory::resetAllPages() for each category. + * \brief Resets all changes. Calls OptionCategory::resetAllPages() for each + * category. */ void SettingsDialog::reset() { diff --git a/settingsdialog/settingsdialog.h b/settingsdialog/settingsdialog.h index 2090a9d..06515c4 100644 --- a/settingsdialog/settingsdialog.h +++ b/settingsdialog/settingsdialog.h @@ -68,7 +68,8 @@ inline bool SettingsDialog::isTabBarAlwaysVisible() const } /*! - * \brief Returns the category model used by the settings dialog to manage the categories. + * \brief Returns the category model used by the settings dialog to manage the + * categories. */ inline OptionCategoryModel *SettingsDialog::categoryModel() { diff --git a/translations/qtutilities_de_DE.ts b/translations/qtutilities_de_DE.ts index 39feed2..58dc127 100644 --- a/translations/qtutilities_de_DE.ts +++ b/translations/qtutilities_de_DE.ts @@ -39,12 +39,12 @@ - + developed by %1 entwickelt von %1 - + 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>. @@ -54,8 +54,8 @@ - - + + Enter the password Passwort eingeben @@ -100,28 +100,28 @@ 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. @@ -157,22 +157,22 @@ Dialogs::PaletteModel - + Color Role Farbrolle - + Active Aktiv - + Inactive Inaktiv - + Disabled Deaktiviert @@ -292,7 +292,7 @@ Außerdem werden sie vielleicht vom QPA plugin überschrieben und funktionieren - + No category selected Keine Kategorie gewählt @@ -317,12 +317,12 @@ Außerdem werden sie vielleicht vom QPA plugin überschrieben und funktionieren - + <p><b>Errors occured when applying changes:</b></p><ul> <p><b>Beim Anwenden der Einstellungen sind Fehler aufgetreten:</b></p><ul> - + unknonw error unbekannter Fehler @@ -330,32 +330,32 @@ Außerdem werden sie vielleicht vom QPA plugin überschrieben und funktionieren 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 @@ -363,7 +363,7 @@ Außerdem werden sie vielleicht vom QPA plugin überschrieben und funktionieren QObject - + Clear Text löschen @@ -371,7 +371,7 @@ Außerdem werden sie vielleicht vom QPA plugin überschrieben und funktionieren QtGui::QtLanguageOptionPage - + recognized by Qt as von Qt erkannt als @@ -379,7 +379,7 @@ Außerdem werden sie vielleicht vom QPA plugin überschrieben und funktionieren QtGui::QtOptionCategory - + Qt @@ -410,24 +410,24 @@ Außerdem werden sie vielleicht vom QPA plugin überschrieben und funktionieren Widgets::PathSelection - - + + Select ... Wählen ... - + Open Öffnen - + Explore Im Dateibrowser öffnen - - + + Select path Pfad auswählen diff --git a/translations/qtutilities_en_US.ts b/translations/qtutilities_en_US.ts index d54d6cd..549df72 100644 --- a/translations/qtutilities_en_US.ts +++ b/translations/qtutilities_en_US.ts @@ -34,12 +34,12 @@ - + developed by %1 - + For updates and bug reports visit the <a href="%1" style="text-decoration: underline; color: palette(link);">project website</a>. @@ -49,8 +49,8 @@ - - + + Enter the password @@ -95,28 +95,28 @@ - - + + Enter the new password - + You didn't enter a user name. - + You didn't enter a password. - + You have to enter the new password twice to ensure you enterd it correct. - + You mistyped the password. @@ -152,22 +152,22 @@ Dialogs::PaletteModel - + Color Role - + Active - + Inactive - + Disabled @@ -286,7 +286,7 @@ These settings might be overwritten by your Qt 5 platfrom integration plugin and - + No category selected @@ -311,12 +311,12 @@ These settings might be overwritten by your Qt 5 platfrom integration plugin and - + <p><b>Errors occured when applying changes:</b></p><ul> - + unknonw error @@ -324,32 +324,32 @@ 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 @@ -357,7 +357,7 @@ These settings might be overwritten by your Qt 5 platfrom integration plugin and QObject - + Clear @@ -365,7 +365,7 @@ These settings might be overwritten by your Qt 5 platfrom integration plugin and QtGui::QtLanguageOptionPage - + recognized by Qt as @@ -373,7 +373,7 @@ These settings might be overwritten by your Qt 5 platfrom integration plugin and QtGui::QtOptionCategory - + Qt @@ -404,24 +404,24 @@ These settings might be overwritten by your Qt 5 platfrom integration plugin and Widgets::PathSelection - - + + Select ... - + Open - + Explore - - + + Select path diff --git a/widgets/buttonoverlay.cpp b/widgets/buttonoverlay.cpp index 59a1dc4..8650163 100644 --- a/widgets/buttonoverlay.cpp +++ b/widgets/buttonoverlay.cpp @@ -12,19 +12,24 @@ /*! * \namespace Widgets - * \brief Provides a set of extended widgets such as ClearLineEdit and ClearComboBox. + * \brief Provides a set of extended widgets such as ClearLineEdit and + * ClearComboBox. */ namespace Widgets { /*! * \class Widgets::ButtonOverlay - * \brief The ButtonOverlay class is used to display buttons on top of other widgets. + * \brief The ButtonOverlay class is used to display buttons on top of other + * widgets. * - * The class creates a new layout manager and sets it to the widget which is specified - * when constructing an instance. Thus this widget must not already have a layout manager. + * The class creates a new layout manager and sets it to the widget which is + * specified + * when constructing an instance. Thus this widget must not already have a + * layout manager. * - * The class is used to implement widget customization like ClearLineEidt and ClearComboBox. + * The class is used to implement widget customization like ClearLineEidt and + * ClearComboBox. */ /*! @@ -71,9 +76,10 @@ void ButtonOverlay::setClearButtonEnabled(bool enabled) // enable clear button m_clearButton = new IconButton; m_clearButton->setHidden(isCleared()); - m_clearButton->setPixmap(/*QIcon::fromTheme(QStringLiteral("edit-clear"), */ QIcon( - QStringLiteral(":/qtutilities/icons/hicolor/48x48/actions/edit-clear.png") /*)*/) - .pixmap(16)); + m_clearButton->setPixmap( + /*QIcon::fromTheme(QStringLiteral("edit-clear"), */ QIcon(QStringLiteral(":/qtutilities/icons/hicolor/48x48/actions/" + "edit-clear.png") /*)*/) + .pixmap(16)); m_clearButton->setGeometry(0, 0, 16, 16); m_clearButton->setToolTip(QObject::tr("Clear")); QObject::connect(m_clearButton, &IconButton::clicked, std::bind(&ButtonOverlay::handleClearButtonClicked, this)); @@ -84,7 +90,8 @@ void ButtonOverlay::setClearButtonEnabled(bool enabled) /*! * \brief Shows an info button with the specified \a pixmap and \a infoText. * - * If there is already an info button enabled, it gets replaced with the new button. + * If there is already an info button enabled, it gets replaced with the new + * button. * * \sa ButtonOverlay::disableInfoButton() */ diff --git a/widgets/clearspinbox.cpp b/widgets/clearspinbox.cpp index 91ade8b..4040f76 100644 --- a/widgets/clearspinbox.cpp +++ b/widgets/clearspinbox.cpp @@ -8,7 +8,8 @@ namespace Widgets { /*! * \class Widgets::ClearSpinBox - * \brief A QSpinBox with an embedded button for clearing its contents and the ability to hide + * \brief A QSpinBox with an embedded button for clearing its contents and the + * ability to hide * the minimum value. */ diff --git a/widgets/pathselection.cpp b/widgets/pathselection.cpp index b389a52..fe3de6d 100644 --- a/widgets/pathselection.cpp +++ b/widgets/pathselection.cpp @@ -24,7 +24,8 @@ namespace Widgets { /*! * \class Widgets::PathSelection - * \brief A QLineEdit with a QPushButton next to it which allows to select file/directory via QFileDialog. + * \brief A QLineEdit with a QPushButton next to it which allows to select + * file/directory via QFileDialog. */ QCompleter *PathSelection::m_completer = nullptr; diff --git a/widgets/pathselection.h b/widgets/pathselection.h index 56c005f..ae9c434 100644 --- a/widgets/pathselection.h +++ b/widgets/pathselection.h @@ -65,7 +65,8 @@ inline void PathSelection::provideCustomFileMode(QFileDialog::FileMode customFil /*! * \brief Can be used to provide a custom file dialog. * - * The default file mode is ignored when a custom file dialog has been specified. + * The default file mode is ignored when a custom file dialog has been + * specified. */ inline void PathSelection::provideCustomFileDialog(QFileDialog *customFileDialog) {