Qt Utilities  6.2.1
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Namespaces | Classes | Enumerations | Functions
QtUtilities Namespace Reference

! More...

Namespaces

 ApplicationInstances
 Convenience functions to check whether a QCoreApplication/QGuiApplication/QApplication singleton has been instantiated yet.
 
 QtUtilitiesResources
 Functions for using the resources provided by this library.
 
 TranslationFiles
 Convenience functions to load translations for Qt and the application.
 
 Ui
 

Classes

class  AboutDialog
 The AboutDialog class provides a simple about dialog. More...
 
class  AdoptLocker
 Like QMutexLocker, but assumes that the mutex has already been locked. More...
 
class  BrushEditor
 The BrushEditor class is used by PaletteEditor. More...
 
class  ButtonOverlay
 The ButtonOverlay class is used to display buttons on top of other widgets. More...
 
class  ChecklistItem
 
class  ChecklistModel
 
class  ClearComboBox
 A QComboBox with an embedded button for clearing its contents. More...
 
class  ClearLineEdit
 A QLineEdit with an embedded button for clearing its contents. More...
 
class  ClearPlainTextEdit
 A QPlainTextEdit with an embedded button for clearing its contents. More...
 
class  ClearSpinBox
 A QSpinBox with an embedded button for clearing its contents and the ability to hide the minimum value. More...
 
class  ColorButton
 The ColorButton class is used by PaletteEditor. More...
 
class  ColorDelegate
 The ColorDelegate class is used by PaletteEditor. More...
 
class  DBusNotification
 The DBusNotification class emits D-Bus notifications. More...
 
class  EnterPasswordDialog
 The EnterPasswordDialog class provides a simple dialog to ask the user for a password. More...
 
class  IconButton
 A simple QAbstractButton implementation displaying a QPixmap. More...
 
struct  NotificationImage
 The NotificationImage struct is a raw data image format. More...
 
class  OptionCategory
 The OptionCategory class wraps associated option pages. More...
 
class  OptionCategoryFilterModel
 The OptionCategoryFilterModel class is used by SettingsDialog to filter option categories. More...
 
class  OptionCategoryModel
 The OptionCategoryModel class is used by SettingsDialog to store and display option categories. More...
 
class  OptionPage
 The OptionPage class is the base class for SettingsDialog pages. More...
 
class  PaletteEditor
 The PaletteEditor class provides a dialog to customize a QPalette. More...
 
class  PaletteModel
 The PaletteModel class is used by PaletteEditor. More...
 
class  PathSelection
 A QLineEdit with a QPushButton next to it which allows to select file/directory via QFileDialog. More...
 
struct  QtSettingsData
 
class  RecentMenuManager
 The RecentMenuManager class manages the entries for a "recently opened files" menu. More...
 
class  RoleEditor
 The RoleEditor class is used by PaletteEditor. More...
 
class  SettingsDialog
 The SettingsDialog class provides a framework for creating settings dialogs with different categories and subcategories. More...
 
struct  SwappedImage
 The SwappedImage struct represents RGB-interved version of the image specified on construction. More...
 
class  TryLocker
 Like QMutexLocker, but it just tries to lock the mutex. More...
 
class  UiFileBasedOptionPage
 

Enumerations

enum  DocumentStatus { DocumentStatus::NoDocument, DocumentStatus::Saved, DocumentStatus::Unsaved }
 The DocumentStatus enum specifies the status of the document in a window. More...
 
enum  NotificationIcon { NotificationIcon::NoIcon, NotificationIcon::Information, NotificationIcon::Warning, NotificationIcon::Critical }
 
enum  NotificationCloseReason {
  NotificationCloseReason::Undefined, NotificationCloseReason::Expired, NotificationCloseReason::Dismissed, NotificationCloseReason::Manually,
  NotificationCloseReason::ActionInvoked
}
 
enum  { BrushRole = 33 }
 

Functions

QT_UTILITIES_EXPORT QString generateWindowTitle (DocumentStatus documentStatus, const QString &documentPath)
 Generates the window title string for the specified documentStatus and documentPath. More...
 
QT_UTILITIES_EXPORT bool openLocalFileOrDir (const QString &path)
 Shows the specified file or directory using the default file browser. More...
 
QByteArray toNativeFileName (const QString &fileName)
 
QString fromNativeFileName (const char *nativeFileName, int size=-1)
 
QString fromNativeFileName (const std::string &nativeFileName)
 
QT_UTILITIES_EXPORT void setupCommonQtApplicationAttributes ()
 Sets Qt application attributes which are commonly used within my Qt applications. More...
 
QDBusArgument & operator<< (QDBusArgument &argument, const NotificationImage &img)
 
const QDBusArgument & operator>> (const QDBusArgument &argument, NotificationImage &img)
 
 QtAppearanceOptionPage (QtSettingsData &settings, QWidget *parentWidget=nullptr)
 
 QtLanguageOptionPage (QtSettingsData &settings, QWidget *parentWidget=nullptr)
 
 QtEnvOptionPage (QtSettingsData &settings, QWidget *parentWidget=nullptr)
 

Detailed Description

!

The QtUtilities namespace contains all utilities provided by the qtutilities library.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BrushRole 

Definition at line 15 of file paletteeditor.cpp.

◆ DocumentStatus

The DocumentStatus enum specifies the status of the document in a window.

Enumerator
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.

Definition at line 20 of file dialogutils.h.

◆ NotificationCloseReason

Enumerator
Undefined 
Expired 
Dismissed 
Manually 
ActionInvoked 

Definition at line 20 of file dbusnotification.h.

◆ NotificationIcon

Enumerator
NoIcon 
Information 
Warning 
Critical 

Definition at line 18 of file dbusnotification.h.

Function Documentation

◆ fromNativeFileName() [1/2]

QString QtUtilities::fromNativeFileName ( const char *  nativeFileName,
int  size = -1 
)
inline

Definition at line 21 of file conversion.h.

◆ fromNativeFileName() [2/2]

QString QtUtilities::fromNativeFileName ( const std::string &  nativeFileName)
inline

Definition at line 30 of file conversion.h.

◆ generateWindowTitle()

QString QtUtilities::generateWindowTitle ( DocumentStatus  documentStatus,
const QString &  documentPath 
)

Generates the window title string for the specified documentStatus and documentPath.

Definition at line 27 of file dialogutils.cpp.

◆ openLocalFileOrDir()

bool QtUtilities::openLocalFileOrDir ( const QString &  path)

Shows the specified file or directory using the default file browser.

Remarks
  • The specified path must not be specified as URL. (The conversion to a URL suitable for QDesktopServices::openUrl() is the whole purpose of this function).
  • The Qt documentation suggests to use QDesktopServices::openUrl(QUrl("file:///C:/Documents and Settings/All Users/Desktop", QUrl::TolerantMode)); under Windows. However, that does not work if the path contains a '#'. It is also better to use QUrl::DecodedMode to prevent QUrl from interpreting any of the paths characters in a special way.

Definition at line 21 of file desktoputils.cpp.

◆ operator<<()

QDBusArgument& QtUtilities::operator<< ( QDBusArgument &  argument,
const NotificationImage img 
)

Definition at line 87 of file dbusnotification.cpp.

◆ operator>>()

const QDBusArgument& QtUtilities::operator>> ( const QDBusArgument &  argument,
NotificationImage img 
)

Definition at line 95 of file dbusnotification.cpp.

◆ QtAppearanceOptionPage()

QtUtilities::QtAppearanceOptionPage::QtAppearanceOptionPage ( QtSettingsData settings,
QWidget *  parentWidget = nullptr 
)
explicit

Definition at line 220 of file qtsettings.cpp.

◆ QtEnvOptionPage()

QtUtilities::QtEnvOptionPage::QtEnvOptionPage ( QtSettingsData settings,
QWidget *  parentWidget = nullptr 
)
explicit

Definition at line 373 of file qtsettings.cpp.

◆ QtLanguageOptionPage()

QtUtilities::QtLanguageOptionPage::QtLanguageOptionPage ( QtSettingsData settings,
QWidget *  parentWidget = nullptr 
)
explicit

Definition at line 328 of file qtsettings.cpp.

◆ setupCommonQtApplicationAttributes()

void QtUtilities::setupCommonQtApplicationAttributes ( )

Sets Qt application attributes which are commonly used within my Qt applications.

Remarks
  • So far this enables High-DPI support.
  • The exact attributes are unspecified and might change to whatever makes sense in the future.

Definition at line 307 of file resources.cpp.

◆ toNativeFileName()

QByteArray QtUtilities::toNativeFileName ( const QString &  fileName)
inline

Definition at line 12 of file conversion.h.