|
std::ostream & | operator<< (std::ostream &os, const QString &qs) |
| Operator stream a QString instance to ans std ostream.
|
|
QPoint | operator- (const QPoint &pt, const QSize &sz) |
| Allows moving a QPoint using a QSize.
|
|
QPoint | operator+ (const QPoint &pt, const QSize &sz) |
| Allows moving a QPoint using a QSize.
|
|
QRect | operator+ (const QRect &rc, const QSize &sz) |
| Allows adjusting the QRect size using a QSize.
|
|
QRect | operator- (const QRect &rc, const QSize &sz) |
| Allows adjusting the QRect size using a QSize.
|
|
QRect | operator+ (const QRect &rc, const QPoint &pt) |
| Allows adjusting the QRect position using a QPoint.
|
|
QRect | operator+= (QRect &rc, const QPoint &pt) |
| Allows adjusting the QRect position using a QPoint.
|
|
QRect | operator- (const QRect &rc, const QPoint &pt) |
| Allows adjusting the QRect position using a QPoint.
|
|
QRect | operator-= (QRect &rc, const QPoint &pt) |
| Allows adjusting the QRect position using a QPoint.
|
|
QRect & | inflate (QRect &r, int sz) |
| Inflates the passed rect on all sides using an integer.
|
|
constexpr QRect | inflated (const QRect &r, int sz) |
| Inflates a copy the rectangle an integer and returns it.
|
|
QSize | asQSize (const QPoint &pt) |
| Gets the passed Qt point as a Qt size class.
|
|
QSizeF | asQSizeF (const QPointF &pt) |
| Gets the passed Qt point as a Qt size class.
|
|
_MISC_FUNC std::string | sf::toString (const QRect &rect) |
| Converts the passed Qt rectangle into a std string.
|
|
_MISC_FUNC QRect | sf::moveRectWithinRect (const QRect &outer, const QRect &inner) |
| Moves the inner in to the outer rectangle.
|
|
template<typename T , typename F > |
QMetaEnum | sf::flagsMetaEnum () |
| Gets the QMetaEnum from a given in a QObject embedded Qt type.
|
|
_MISC_FUNC QMetaObject::Connection | sf::connectByName (const QWidget *widget, const QString &sender_name, const char *signal_name, const QObject *receiver, const char *method_name, Qt::ConnectionType ct=Qt::AutoConnection) |
| Connects signals by name of sender and name of signal.
|
|
_MISC_FUNC QStringList | sf::getObjectNamePath (const QObject *object, bool use_rtti=false) |
| Gets all the parent names from the object's parent in a string list.
|
|
_MISC_FUNC QLayout * | sf::getWidgetLayout (const QWidget *widget) |
| Gets the layout containing the passed widget.
|
|
_MISC_FUNC int | sf::indexFromComboBox (const QComboBox *comboBox, const QVariant &value, int default_index=-1) |
| Gets the index from the passed data value of the passed combo box widget.
|
|
_MISC_FUNC QPair< QLayout *, int > | sf::getTopLayoutAndIndex (const QObject *object) |
| Gets the top level QLayout and index of the passed object which can be a QLayout out or QWidget derived type.
|
|
_MISC_FUNC QPair< int, QFormLayout::ItemRole > | sf::getLayoutPosition (const QFormLayout *layout, QObject *target) |
| Gets the position (row, role) from the passed target object in te form-layout.
|
|
_MISC_FUNC int | sf::getLayoutIndex (const QBoxLayout *layout, QObject *target) |
| Gets the index from the passed target object in te box-layout.
|
|
void | sf::resizeColumnsToContents (QTreeView *treeView) |
| Resizes all columns to content of a tree view except the last column.
|
|
_MISC_FUNC void | sf::dumpObjectProperties (const QObject *obj) |
| Dumps all the object properties in qDebug().
|
|
template<typename T > |
T * | sf::getSourceModel (const QAbstractItemModel *am) |
| Gets the model type pointer from the passed abstract model pointer.
|
|
_MISC_FUNC QModelIndex | sf::getSourceModelIndex (const QModelIndex &index) |
| Gets the source index in case a proxy model has been used.
|
|
_MISC_FUNC void | sf::expandTreeView (QTreeView *tv, bool expand=true, const QModelIndex &index={}) |
| Expands or collapses a tree view's items.
|
|
_MISC_FUNC bool | sf::isGuiApplication () |
| Checks if the running QCoreApplication is a GUI application.
|
|
_MISC_FUNC QString | sf::trimRight (const QString &str, const QString &chars=" ") |
| Trims all characters in t from the right end of s .
|
|
_MISC_FUNC QString | sf::trimLeft (const QString &str, const QString &chars=" ") |
| Trims all characters in t from the left end of s .
|
|
_MISC_FUNC QString | sf::trim (const QString &str, const QString &chars=" ") |
| Trims all characters in t from both ends of s .
|
|
_MISC_FUNC bool | sf::isValidFilePath (const QString &path) |
| Gets if the passed filepath is a valid name.
|
|
_MISC_FUNC bool | sf::isValidDirectoryPath (const QString &path) |
| Gets if the passed directory path is a valid name.
|
|
_MISC_FUNC void | sf::storeWindowState (QSettings &settings, QAnyStringView name, QWidget *widget, bool read) |
| Stores or restores the window position and size from the settings file onto the passed widget.
|
|
_MISC_FUNC void | sf::storeTreeViewState (QSettings &settings, QAnyStringView name, const QTreeView *tv, bool read) |
| Stores or restores column widths of a QTreeView.
|
|
std::ostream & | operator<< (std::ostream &os, const QRect &rect) |
| Output stream operator for a QRect class.
|
|