Improved box and boundary bars render. Added whitespace control.

This commit is contained in:
hooper114
2009-05-03 06:35:18 +00:00
parent aa785f06a8
commit f584c5f8e8
4 changed files with 115 additions and 51 deletions

View File

@ -12,6 +12,10 @@
<property name="windowTitle" >
<string>Zint Barcode Studio</string>
</property>
<property name="windowIcon" >
<iconset>
<normaloff>stripe.ico</normaloff>stripe.ico</iconset>
</property>
<widget class="QComboBox" name="bstyle" >
<property name="geometry" >
<rect>
@ -54,7 +58,7 @@
</rect>
</property>
<property name="currentIndex" >
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="tabGeneral" >
<property name="geometry" >
@ -2242,7 +2246,7 @@ p, li { white-space: pre-wrap; }
<x>10</x>
<y>6</y>
<width>572</width>
<height>92</height>
<height>102</height>
</rect>
</property>
<property name="title" >
@ -2382,6 +2386,29 @@ p, li { white-space: pre-wrap; }
<string>Backgound Colour</string>
</property>
</widget>
<widget class="QSpinBox" name="spnWhitespace" >
<property name="geometry" >
<rect>
<x>117</x>
<y>73</y>
<width>120</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="lblWhitespace" >
<property name="geometry" >
<rect>
<x>21</x>
<y>73</y>
<width>78</width>
<height>16</height>
</rect>
</property>
<property name="text" >
<string>Whitespace:</string>
</property>
</widget>
</widget>
</widget>
</widget>

View File

@ -162,6 +162,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
connect(cmbMaxiMode, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(cmbMaxiMode, SIGNAL(currentIndexChanged( int )), SLOT(maxi_primary()));
connect(txtMaxiPrimary, SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
connect(spnWhitespace, SIGNAL(valueChanged( int )), SLOT(update_preview()));
}
MainWindow::~MainWindow()
@ -652,6 +653,7 @@ void MainWindow::update_preview()
m_bc.bc.setBorderType((Zint::QZint::BorderType)(btype->currentIndex()*2));
m_bc.bc.setBorderWidth(bwidth->value());
m_bc.bc.setHeight(heightb->value());
m_bc.bc.setWhitespace(spnWhitespace->value());
m_bc.bc.setFgColor(m_fgcolor);
m_bc.bc.setBgColor(m_bgcolor);
m_bc.update();