* Default Constructor. You must call init manually if you choose
* to use this constructor.
*/
-QG_WidthBox::QG_WidthBox(QWidget * parent, const char */*name*/): QComboBox(parent)
+WidthBox::WidthBox(QWidget * parent, const char */*name*/): QComboBox(parent)
{
showByLayer = false;
showUnchanged = false;
*
* @param showByLayer true: Show attributes ByLayer, ByBlock
*/
-QG_WidthBox::QG_WidthBox(bool showByLayer, bool showUnchanged, QWidget * parent, const char */*name*/):
+WidthBox::WidthBox(bool showByLayer, bool showUnchanged, QWidget * parent, const char */*name*/):
QComboBox(parent)
{
init(showByLayer, showUnchanged);
/**
* Destructor
*/
-QG_WidthBox::~QG_WidthBox()
+WidthBox::~WidthBox()
{
}
*
* @param showByLayer true: Show attributes ByLayer, ByBlock
*/
-void QG_WidthBox::init(bool showByLayer, bool showUnchanged)
+void WidthBox::init(bool showByLayer, bool showUnchanged)
{
this->showByLayer = showByLayer;
this->showUnchanged = showUnchanged;
slotWidthChanged(currentIndex());
}
-RS2::LineWidth QG_WidthBox::getWidth()
+RS2::LineWidth WidthBox::getWidth()
{
return currentWidth;
}
/**
* Sets the currently selected width item to the given width.
*/
-void QG_WidthBox::setWidth(RS2::LineWidth w)
+void WidthBox::setWidth(RS2::LineWidth w)
{
- RS_DEBUG->print("QG_WidthBox::setWidth %d\n", (int)w);
+ RS_DEBUG->print("WidthBox::setWidth %d\n", (int)w);
int offset = (int)showByLayer * 2 + (int)showUnchanged;
switch (w)
if (showByLayer)
setCurrentIndex(0 + (int)showUnchanged);
else
- RS_DEBUG->print(RS_Debug::D_WARNING, "QG_WidthBox::setWidth: Unsupported width.");
+ RS_DEBUG->print(RS_Debug::D_WARNING, "WidthBox::setWidth: Unsupported width.");
break;
case RS2::WidthByBlock:
if (showByLayer)
setCurrentIndex(1 + (int)showUnchanged);
else
- RS_DEBUG->print(RS_Debug::D_WARNING, "QG_WidthBox::setWidth: Unsupported width.");
+ RS_DEBUG->print(RS_Debug::D_WARNING, "WidthBox::setWidth: Unsupported width.");
break;
case RS2::WidthDefault:
setCurrentIndex(0 + offset);
/**
* Sets the pixmap showing the width of the "By Layer" item.
*/
-void QG_WidthBox::setLayerWidth(RS2::LineWidth w)
+void WidthBox::setLayerWidth(RS2::LineWidth w)
{
if (showByLayer)
{
}
}
-bool QG_WidthBox::isUnchanged()
+bool WidthBox::isUnchanged()
{
return unchanged;
}
* offers a dialog to the user that allows him/ her to
* choose an individual width.
*/
-void QG_WidthBox::slotWidthChanged(int index)
+void WidthBox::slotWidthChanged(int index)
{
- RS_DEBUG->print("QG_WidthBox::slotWidthChanged %d\n", index);
+ RS_DEBUG->print("WidthBox::slotWidthChanged %d\n", index);
bool done = false;