QILabel_p.h revision 8e0c2ca3abd721979958f95b9af73b60665478c8
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
* VirtualBox Qt extensions: QILabelPrivate class declaration
*/
/*
* Copyright (C) 2008 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
/*
* This class is based on the original QLabel implementation.
*/
#ifndef __QILabel_p_h__
#define __QILabel_p_h__
/* Qt includes */
#include <QLabel>
{
{
init();
}
{
init();
setFullText (aText);
}
void clearAll()
{
setFullText ("");
}
{
return mText;
}
{
updateText();
}
bool fullSizeSelection () const;
void setFullSizeSelection (bool bOn);
void updateSizeHint()
{
if (minimumWidth() > 0)
heightForWidth (minimumWidth()));
}
{
/* If there is an updated sizeHint() present - using it. */
}
void copy();
void init();
void updateText();
{
/* Remove all HTML tags from the text and return it. */
}
{
/* Converts a string to a Qt elide mode */
if (aStr == "start")
else
if (aStr == "middle")
else
if (aStr == "end")
return mode;
}
/* Private member vars */
bool mFullSizeSeclection;
static const QRegExp mCopyRegExp;
static QRegExp mElideRegExp;
bool mStartDragging;
};
#endif // __QILabel_p_h__