#include "rs.h"
#include "rs_actioninterface.h"
#include "rs_actionprintpreview.h"
+#include "rs_debug.h"
+#include "rs_math.h"
-PrintPreviewOptions::PrintPreviewOptions(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
+//PrintPreviewOptions::PrintPreviewOptions(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
+PrintPreviewOptions::PrintPreviewOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
QWidget(parent, flags), updateDisabled(false)
{
imperialScales
- << "1\" = 1\""
- << "1\" = 2\""
- << "1\" = 4\""
- << "1\" = 8\""
- << "1\" = 16\""
- << "1\" = 32\""
- << "1\" = 64\""
- << "1\" = 128\""
- << "1\" = 256\"";
+ << "1\" = 1\""
+ << "1\" = 2\""
+ << "1\" = 4\""
+ << "1\" = 8\""
+ << "1\" = 16\""
+ << "1\" = 32\""
+ << "1\" = 64\""
+ << "1\" = 128\""
+ << "1\" = 256\"";
metricScales
- << "1:1" << "1:2" << "1:5" << "1:10"
- << "1:20" << "1:25" << "1:50" << "1:75" << "1:100"
- << "1:125" << "1:150" << "1:175" << "1:200"
- << "1:250" << "1:500" << "1:750" << "1:1000"
- << "1:2500" << "1:5000" << "1:7500" << "1:10000"
- << "1:25000" << "1:50000" << "1:75000" << "1:100000"
- << "2:1" << "5:1" << "10:1"
- << "20:1" << "25:1" << "50:1" << "75:1" << "100:1"
- << "125:1" << "150:1" << "175:1" << "200:1"
- << "250:1" << "500:1" << "750:1" << "1000:1"
- << "2500:1" << "5000:1" << "7500:1" << "10000:1"
- << "25000:1" << "50000:1" << "75000:1" << "100000:1";
+ << "1:1" << "1:2" << "1:5" << "1:10"
+ << "1:20" << "1:25" << "1:50" << "1:75" << "1:100"
+ << "1:125" << "1:150" << "1:175" << "1:200"
+ << "1:250" << "1:500" << "1:750" << "1:1000"
+ << "1:2500" << "1:5000" << "1:7500" << "1:10000"
+ << "1:25000" << "1:50000" << "1:75000" << "1:100000"
+ << "2:1" << "5:1" << "10:1"
+ << "20:1" << "25:1" << "50:1" << "75:1" << "100:1"
+ << "125:1" << "150:1" << "175:1" << "200:1"
+ << "250:1" << "500:1" << "750:1" << "1000:1"
+ << "2500:1" << "5000:1" << "7500:1" << "10000:1"
+ << "25000:1" << "50000:1" << "75000:1" << "100000:1";
ui.setupUi(this);
+
+ if (parent)
+ parent->addWidget(this);
}
PrintPreviewOptions::~PrintPreviewOptions()
*/
}
-void PrintPreviewOptions::setAction(RS_ActionInterface* a, bool/*update*/)
+void PrintPreviewOptions::setAction(RS_ActionInterface * a, bool/*update*/)
{
if (a != NULL && a->rtti() == RS2::ActionPrintPreview)
{
{
bool ok1 = false;
bool ok2 = false;
-// int i = s.find(':');
int i = s.indexOf(':');
double n = s.left(i).toDouble(&ok1);
double d = s.mid(i + 1).toDouble(&ok2);
else if (s.contains('='))
{
bool ok = false;
-// int i = s.find('=');
int i = s.indexOf('=');
double d = s.mid(i + 2, s.length() - i - 3).toDouble(&ok);