Qtx Class Reference

Set of auxiliary static methods.

#include <Qtx.h>

Inheritance diagram for Qtx:

Inheritance graph

Public Types

enum  AlignmentFlags { AlignOutLeft = AlignVCenter << 2, AlignOutRight = AlignOutLeft << 2, AlignOutTop = AlignOutRight << 2, AlignOutBottom = AlignOutTop << 2 }

Static Public Member Functions

static void setTabOrder (QWidget *,...)
static void setTabOrder (const QWidgetList &)
static void alignWidget (QWidget *, const QWidget *, const int)
static void simplifySeparators (QToolBar *)
static void simplifySeparators (QPopupMenu *, const bool=true)
static bool isParent (QObject *, QObject *)
static QString extension (const QString &)
static QString dir (const QString &, const bool=true)
static QString file (const QString &, const bool=true)
static QString library (const QString &)
static QString tmpDir ()
static bool mkDir (const QString &)
static bool rmDir (const QString &)
static bool dos2unix (const QString &)
static QString addSlash (const QString &)
static int rgbSet (const QColor &)
static int rgbSet (const int, const int, const int)
static void rgbSet (const int, QColor &)
static void rgbSet (const int, int &, int &, int &)
static QColor scaleColor (const int, const int, const int)
static void scaleColors (const int, QValueList< QColor > &)

Member Enumeration Documentation

enum Qtx::AlignmentFlags
 

Enumerator:
AlignOutLeft 
AlignOutRight 
AlignOutTop 
AlignOutBottom 


Member Function Documentation

void Qtx::setTabOrder QWidget first,
  ...
[static]
 

Name: setTabOrder [static public] Desc: Set tab order for specified list of widgets. Last parameter should be null pointer.

void Qtx::setTabOrder const QWidgetList &  widgets  )  [static]
 

Name: setTabOrder [static public] Desc: Set tab order for specified list of widgets.

void Qtx::alignWidget QWidget src,
const QWidget ref,
const   int
[static]
 

Name: alignWidget [static public] Desc: Align widget 'src' relative to widget 'ref' acording to alignment flags. Alignment flags: Qtx.AlignLeft - Align left side of 'src' to left side of 'ref'. Qtx.AlignRight - Align right side of 'src' to right side of 'ref'. Qtx.AlignTop - Align top side of 'src' to top side of 'ref'. Qtx.AlignBottom - Align bottom side of 'src' to bottom side of 'ref'. Qtx.AlignHCenter - Align 'src' to center of 'ref' in horizontal dimension. Qtx.AlignVCenter - Align 'src' to center of 'ref' in vertical dimension. Qtx.AlignCenter - Align 'src' to center of 'ref' in both dimensions. Qtx.AlignOutLeft - Align right side of 'src' to left side of 'ref'. Qtx.AlignOutRight - Align left side of 'src' to right side of 'ref'. Qtx.AlignOutTop - Align bottom side of 'src' to top side of 'ref'. Qtx.AlignOutBottom - Align top side of 'src' to bottom side of 'ref'.

void Qtx::simplifySeparators QToolBar toolbar  )  [static]
 

Name: simplifySeparators [static public] Desc: Checks toolbar for unnecessary separators and removes them

void Qtx::simplifySeparators QPopupMenu popup,
const   bool = true
[static]
 

Name: simplifySeparators [static public] Desc: Checks popup menu recursively for unnecessary separators and removes them

bool Qtx::isParent QObject child,
QObject parent
[static]
 

Name: isParent [static public] Desc: Returns 'true' if specified 'parent' is parent object of given 'child'.

QString Qtx::extension const QString &  path  )  [static]
 

Name: extension [static public] Desc: Returns the file extension only or null string.

QString Qtx::dir const QString &  path,
const   bool = true
[static]
 

Name: dir [static public] Desc: Returns dir name or null string.

QString Qtx::file const QString &  path,
const   bool = true
[static]
 

Name: file [static public] Desc: Returns file with or without extension.

QString Qtx::library const QString &  str  )  [static]
 

Name: library [static public] Desc: Generate library file name. Append required prefix (lib) and suffix (.dll/.so) to the library file name.

QString Qtx::tmpDir  )  [static]
 

Name: tmpDir [static public] Desc: Returns path to temporary directory.

bool Qtx::mkDir const QString &  dirPath  )  [static]
 

Name: mkDir [static public] Desc: Creates directory with intermediate perent directories. Returns true in successfull case.

bool Qtx::rmDir const QString &  thePath  )  [static]
 

Name: rmDir [static public] Desc: Removes directory with its subdirectories and files. Returns true in successfull case.

bool Qtx::dos2unix const QString &  absName  )  [static]
 

Name: dos2unix [static public] Desc: Convert text file. Replace symbols "LF/CR" by symbol "LF".

QString Qtx::addSlash const QString &  path  )  [static]
 

Name: addSlash [static public] Desc: Adds a slash to the end of 'path' if it is not already there.

int Qtx::rgbSet const QColor &  c  )  [static]
 

Name: rgbSet [static public] Desc: Pack the specified color into one integer RGB set.

int Qtx::rgbSet const   int,
const   int,
const   int
[static]
 

Name: rgbSet [static public] Desc: Pack the specified color components into one integer RGB set.

void Qtx::rgbSet const   int,
QColor &  c
[static]
 

Name: rgbSet [static public] Desc: Unpack the specified integer RGB set into the color.

void Qtx::rgbSet const   int,
int &  r,
int &  g,
int &  b
[static]
 

Name: rgbSet [static public] Desc: Unpack the specified integer RGB set into the color components.

QColor Qtx::scaleColor const   int,
const   int,
const   int
[static]
 

Name: scaleColor [static public] Desc: Returns the color specified by the index between min (blue) and max (red).

void Qtx::scaleColors const   int,
QValueList< QColor > &  lst
[static]
 

Name: scaleColors [static public] Desc: Returns the 'num' number of colors from blue to red.