Merge branch 'master' into bim-ifcproperty-6
|
@ -165,13 +165,8 @@ PyDoc_STRVAR(Console_doc,
|
|||
"FreeCAD Console\n"
|
||||
);
|
||||
|
||||
Application::Application(ParameterManager * /*pcSysParamMngr*/,
|
||||
ParameterManager * /*pcUserParamMngr*/,
|
||||
std::map<std::string,std::string> &mConfig)
|
||||
://_pcSysParamMngr(pcSysParamMngr),
|
||||
//_pcUserParamMngr(pcUserParamMngr),
|
||||
_mConfig(mConfig),
|
||||
_pActiveDoc(0)
|
||||
Application::Application(std::map<std::string,std::string> &mConfig)
|
||||
: _mConfig(mConfig), _pActiveDoc(0)
|
||||
{
|
||||
//_hApp = new ApplicationOCC;
|
||||
mpcPramManager["System parameter"] = _pcSysParamMngr;
|
||||
|
@ -1277,7 +1272,7 @@ void Application::initApplication(void)
|
|||
|
||||
// creating the application
|
||||
if (!(mConfig["Verbose"] == "Strict")) Console().Log("Create Application\n");
|
||||
Application::_pcSingleton = new Application(0,0,mConfig);
|
||||
Application::_pcSingleton = new Application(mConfig);
|
||||
|
||||
// set up Unit system default
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
|
||||
|
|
|
@ -273,7 +273,7 @@ protected:
|
|||
|
||||
private:
|
||||
/// Constructor
|
||||
Application(ParameterManager *pcSysParamMngr, ParameterManager *pcUserParamMngr,std::map<std::string,std::string> &mConfig);
|
||||
Application(std::map<std::string,std::string> &mConfig);
|
||||
/// Destructor
|
||||
virtual ~Application();
|
||||
|
||||
|
|
|
@ -589,7 +589,7 @@ void BitmapFactoryInst::convert(const QImage& p, SoSFImage& img) const
|
|||
size[0] = p.width();
|
||||
size[1] = p.height();
|
||||
|
||||
int buffersize = p.numBytes();
|
||||
int buffersize = p.byteCount();
|
||||
int numcomponents = 0;
|
||||
QVector<QRgb> table = p.colorTable();
|
||||
if (!table.isEmpty()) {
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
# include <QEventLoop>
|
||||
# include <QFileDialog>
|
||||
# include <QMutex>
|
||||
# include <QMutexLocker>
|
||||
# include <QThread>
|
||||
# include <QTimer>
|
||||
# include <QMdiArea>
|
||||
|
@ -294,10 +295,10 @@ CmdTestProgress1::CmdTestProgress1()
|
|||
|
||||
void CmdTestProgress1::activated(int iMsg)
|
||||
{
|
||||
QMutex mutex;
|
||||
QMutexLocker ml(&mutex);
|
||||
try
|
||||
{
|
||||
QMutex mutex;
|
||||
mutex.lock();
|
||||
unsigned long steps = 1000;
|
||||
Base::SequencerLauncher seq("Starting progress bar", steps);
|
||||
|
||||
|
@ -306,8 +307,6 @@ void CmdTestProgress1::activated(int iMsg)
|
|||
seq.next(true);
|
||||
QWaitCondition().wait(&mutex, 30);
|
||||
}
|
||||
|
||||
mutex.unlock();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
@ -337,10 +336,11 @@ CmdTestProgress2::CmdTestProgress2()
|
|||
|
||||
void CmdTestProgress2::activated(int iMsg)
|
||||
{
|
||||
QMutex mutex;
|
||||
QMutexLocker ml(&mutex);
|
||||
|
||||
try
|
||||
{
|
||||
QMutex mutex;
|
||||
mutex.lock();
|
||||
unsigned long steps = 1000;
|
||||
Base::SequencerLauncher seq("Starting progress bar", steps);
|
||||
|
||||
|
@ -378,11 +378,12 @@ CmdTestProgress3::CmdTestProgress3()
|
|||
|
||||
void CmdTestProgress3::activated(int iMsg)
|
||||
{
|
||||
QMutex mutex;
|
||||
QMutexLocker ml(&mutex);
|
||||
|
||||
try
|
||||
{
|
||||
// level 1
|
||||
QMutex mutex;
|
||||
mutex.lock();
|
||||
unsigned long steps = 5;
|
||||
Base::SequencerLauncher seq1("Starting progress bar", steps);
|
||||
for (unsigned long i=0; i<steps;i++)
|
||||
|
@ -446,10 +447,11 @@ CmdTestProgress4::CmdTestProgress4()
|
|||
|
||||
void CmdTestProgress4::activated(int iMsg)
|
||||
{
|
||||
QMutex mutex;
|
||||
QMutexLocker ml(&mutex);
|
||||
|
||||
try
|
||||
{
|
||||
QMutex mutex;
|
||||
mutex.lock();
|
||||
unsigned long steps = 50;
|
||||
Base::SequencerLauncher* seq = new Base::SequencerLauncher("Starting progress bar", steps);
|
||||
|
||||
|
@ -508,10 +510,11 @@ public:
|
|||
}
|
||||
void run()
|
||||
{
|
||||
QMutex mutex;
|
||||
QMutexLocker ml(&mutex);
|
||||
|
||||
try
|
||||
{
|
||||
QMutex mutex;
|
||||
mutex.lock();
|
||||
Base::SequencerLauncher seq("Starting progress bar in thread", steps);
|
||||
|
||||
for (unsigned long i=0; i<this->steps;i++)
|
||||
|
@ -519,7 +522,6 @@ public:
|
|||
seq.next(true);
|
||||
QWaitCondition().wait(&mutex, 5);
|
||||
}
|
||||
mutex.unlock();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
@ -662,27 +664,23 @@ public:
|
|||
}
|
||||
virtual void Warning(const char * msg)
|
||||
{
|
||||
mutex.lock();
|
||||
QMutexLocker ml(&mutex);
|
||||
matchWrn += strcmp(msg, "Write a warning to the console output.\n");
|
||||
mutex.unlock();
|
||||
}
|
||||
virtual void Message(const char * msg)
|
||||
{
|
||||
mutex.lock();
|
||||
QMutexLocker ml(&mutex);
|
||||
matchMsg += strcmp(msg, "Write a message to the console output.\n");
|
||||
mutex.unlock();
|
||||
}
|
||||
virtual void Error(const char * msg)
|
||||
{
|
||||
mutex.lock();
|
||||
QMutexLocker ml(&mutex);
|
||||
matchErr += strcmp(msg, "Write an error to the console output.\n");
|
||||
mutex.unlock();
|
||||
}
|
||||
virtual void Log(const char * msg)
|
||||
{
|
||||
mutex.lock();
|
||||
QMutexLocker ml(&mutex);
|
||||
matchLog += strcmp(msg, "Write a log to the console output.\n");
|
||||
mutex.unlock();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -265,10 +265,9 @@ void DlgParameterImp::onChangeParameterSet(int index)
|
|||
hGrp = hGrp->GetGroup("ParameterEditor");
|
||||
QString path = QString::fromUtf8(hGrp->GetASCII("LastParameterGroup").c_str());
|
||||
QStringList paths = path.split(QLatin1String("."), QString::SkipEmptyParts);
|
||||
if (paths.empty())
|
||||
return;
|
||||
|
||||
QTreeWidgetItem* parent = 0;
|
||||
for (int index=0; index < paramGroup->topLevelItemCount(); index++) {
|
||||
for (int index=0; index < paramGroup->topLevelItemCount() && !paths.empty(); index++) {
|
||||
QTreeWidgetItem* child = paramGroup->topLevelItem(index);
|
||||
if (child->text(0) == paths.front()) {
|
||||
paths.pop_front();
|
||||
|
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 662 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 2.7 KiB |
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
|
@ -13,9 +14,10 @@
|
|||
height="64px"
|
||||
id="svg3140"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.46"
|
||||
sodipodi:docname="FreeCAD05.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="freecad.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs3142">
|
||||
<linearGradient
|
||||
|
@ -29,17 +31,6 @@
|
|||
offset="1"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3661"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.6186598,0.9666542,-1.0332462,0.6612786,-327.27568,-255.84136)"
|
||||
cx="282.64584"
|
||||
cy="29.149046"
|
||||
fx="282.64584"
|
||||
fy="29.149046"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
id="linearGradient3682">
|
||||
<stop
|
||||
|
@ -51,17 +42,6 @@
|
|||
offset="1"
|
||||
id="stop3686" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3682"
|
||||
id="radialGradient3817"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.1149219,0.2722306,-0.7507171,3.0745639,-471.08629,-148.32863)"
|
||||
cx="270.58316"
|
||||
cy="33.899986"
|
||||
fx="270.58316"
|
||||
fy="33.899986"
|
||||
r="19.571428" />
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 32 : 1"
|
||||
|
@ -69,6 +49,57 @@
|
|||
inkscape:vp_z="64 : 32 : 1"
|
||||
inkscape:persp3d-origin="32 : 21.333333 : 1"
|
||||
id="perspective3148" />
|
||||
<linearGradient
|
||||
id="linearGradient3864-9">
|
||||
<stop
|
||||
style="stop-color:#316cab;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3866-1" />
|
||||
<stop
|
||||
style="stop-color:#002ca8;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3868-1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
r="19.571428"
|
||||
fy="29.149046"
|
||||
fx="282.64584"
|
||||
cy="29.149046"
|
||||
cx="282.64584"
|
||||
gradientTransform="matrix(0.6186598,0.9666542,-1.0332462,0.6612786,-327.27568,-255.84136)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient3661-2"
|
||||
xlink:href="#linearGradient3864-9"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
id="linearGradient3682-0">
|
||||
<stop
|
||||
id="stop3684-0"
|
||||
offset="0"
|
||||
style="stop-color:#ff390f;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop3686-0"
|
||||
offset="1"
|
||||
style="stop-color:#ff1000;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
r="19.571428"
|
||||
fy="33.899986"
|
||||
fx="270.58316"
|
||||
cy="33.899986"
|
||||
cx="270.58316"
|
||||
gradientTransform="matrix(1.1149219,0.2722306,-0.7507171,3.0745639,-471.08629,-148.32863)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient3817-5"
|
||||
xlink:href="#linearGradient3682-0"
|
||||
inkscape:collect="always" />
|
||||
<inkscape:perspective
|
||||
id="perspective3148-5"
|
||||
inkscape:persp3d-origin="32 : 21.333333 : 1"
|
||||
inkscape:vp_z="64 : 32 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_x="0 : 32 : 1"
|
||||
sodipodi:type="inkscape:persp3d" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
|
@ -84,10 +115,11 @@
|
|||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="640"
|
||||
inkscape:window-height="684"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1053"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="93" />
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3145">
|
||||
<rdf:RDF>
|
||||
|
@ -104,19 +136,24 @@
|
|||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
id="g3813"
|
||||
transform="matrix(0.8506406,0,0,0.8506406,187.82699,-0.1960013)">
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccc"
|
||||
id="rect3663"
|
||||
d="M -216.13659,7.270763 L -216.13659,62.770763 L -203.76159,62.770763 L -203.76159,41.052013 L -195.01159,41.052013 L -195.01159,32.489513 L -203.76159,32.489513 L -203.76159,23.247634 L -182.20645,23.247634 L -182.20645,7.302013 L -216.13659,7.270763 z"
|
||||
style="opacity:1;fill:url(#radialGradient3817);fill-opacity:1;fill-rule:evenodd;stroke:#370700;stroke-width:1.91000152;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
|
||||
<path
|
||||
id="path3659"
|
||||
d="M -161.05088,23.811562 L -168.24914,27.941451 L -171.42783,26.838359 L -174.46057,19.087636 L -179.23123,19.338335 L -181.40725,27.353068 L -184.45272,28.811478 L -192.04863,25.488663 L -195.25694,29.05385 L -191.12704,36.252107 L -192.25562,39.421483 L -200.00635,42.454224 L -199.73017,47.234186 L -191.71543,49.410207 L -190.25702,52.455668 L -193.60531,60.042283 L -190.04013,63.250589 L -182.84188,59.120698 L -179.64701,60.258581 L -176.63975,68 L -171.83431,67.733117 L -169.68377,59.709083 L -166.6383,58.250671 L -159.02622,61.608278 L -155.81791,58.043091 L -159.9478,50.844835 L -158.83541,47.640667 L -151.09399,44.633407 L -151.33537,39.83727 L -159.35941,37.686734 L -160.81783,34.641273 L -157.48571,27.019867 L -161.05088,23.811562 z M -171.83168,35.615821 L -170.35403,36.473178 L -169.07381,37.633913 L -168.04887,39.019136 L -167.31158,40.559263 L -166.87809,42.219505 L -166.80627,43.920968 L -167.05202,45.621989 L -167.61286,47.236819 L -168.50501,48.730653 L -169.63095,49.99469 L -171.01618,51.019623 L -172.55631,51.756914 L -174.21654,52.190397 L -175.92731,52.287705 L -177.62834,52.041972 L -179.24316,51.48112 L -180.73699,50.588971 L -181.99174,49.43754 L -183.02596,48.077805 L -183.76327,46.537679 L -184.18744,44.851952 L -184.28475,43.141183 L -184.03902,41.440158 L -183.47816,39.825332 L -182.59532,38.356981 L -181.46006,37.067461 L -180.07484,36.042527 L -178.53472,35.305233 L -176.849,34.881059 L -175.14753,34.809236 L -173.44651,35.054967 L -171.83168,35.615821 z"
|
||||
style="opacity:1;fill:url(#radialGradient3661);fill-opacity:1;fill-rule:evenodd;stroke:#000137;stroke-width:1.91000152;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
|
||||
inkscape:label="Layer 1"
|
||||
id="layer1-4"
|
||||
transform="translate(-6e-6,-0.36363683)">
|
||||
<g
|
||||
transform="matrix(0.8506406,0,0,0.8506406,187.82699,-0.1960013)"
|
||||
id="g3813-3">
|
||||
<path
|
||||
style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient3817-5);fill-opacity:1;fill-rule:evenodd;stroke:#370700;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
|
||||
d="m -216.13659,7.270763 0,55.5 12.375,0 0,-21.71875 8.75,0 0,-8.5625 -8.75,0 0,-9.241879 21.55514,0 0,-15.945621 -33.93014,-0.03125 z"
|
||||
id="rect3663-8"
|
||||
sodipodi:nodetypes="ccccccccccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient3661-2);fill-opacity:1;fill-rule:evenodd;stroke:#000137;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
|
||||
d="m -161.05088,23.811562 -7.19826,4.129889 -3.17869,-1.103092 -3.03274,-7.750723 -4.77066,0.250699 -2.17602,8.014733 -3.04547,1.45841 -7.59591,-3.322815 -3.20831,3.565187 4.1299,7.198257 -1.12858,3.169376 -7.75073,3.032741 0.27618,4.779962 8.01474,2.176021 1.45841,3.045461 -3.34829,7.586615 3.56518,3.208306 7.19825,-4.129891 3.19487,1.137883 3.00726,7.741419 4.80544,-0.266883 2.15054,-8.024034 3.04547,-1.458412 7.61208,3.357607 3.20831,-3.565187 -4.12989,-7.198256 1.11239,-3.204168 7.74142,-3.00726 -0.24138,-4.796137 -8.02404,-2.150536 -1.45842,-3.045461 3.33212,-7.621406 -3.56517,-3.208305 z m -10.7808,11.804259 1.47765,0.857357 1.28022,1.160735 1.02494,1.385223 0.73729,1.540127 0.43349,1.660242 0.0718,1.701463 -0.24575,1.701021 -0.56084,1.61483 -0.89215,1.493834 -1.12594,1.264037 -1.38523,1.024933 -1.54013,0.737291 -1.66023,0.433483 -1.71077,0.09731 -1.70103,-0.245733 -1.61482,-0.560852 -1.49383,-0.892149 -1.25475,-1.151431 -1.03422,-1.359735 -0.73731,-1.540126 -0.42417,-1.685727 -0.0973,-1.710769 0.24573,-1.701025 0.56086,-1.614826 0.88284,-1.468351 1.13526,-1.28952 1.38522,-1.024934 1.54012,-0.737294 1.68572,-0.424174 1.70147,-0.07182 1.70102,0.245731 1.61483,0.560854 z"
|
||||
id="path3659-5"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
||||
|
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 6.6 KiB |
|
@ -1,362 +1,52 @@
|
|||
/* XPM */
|
||||
static char * freecad_xpm[] = {
|
||||
"32 32 327 2",
|
||||
" c None",
|
||||
". c #5D0900",
|
||||
"+ c #AF0D00",
|
||||
"@ c #AF1001",
|
||||
"# c #AF1601",
|
||||
"$ c #AF1A02",
|
||||
"% c #AF2003",
|
||||
"& c #AF2404",
|
||||
"* c #AF2904",
|
||||
"= c #AF2C05",
|
||||
"- c #AF2F05",
|
||||
"; c #AF3105",
|
||||
"> c #370700",
|
||||
", c #AD0C00",
|
||||
"' c #FF1100",
|
||||
") c #FF1A01",
|
||||
"! c #FF2203",
|
||||
"~ c #FF2B04",
|
||||
"{ c #FF3305",
|
||||
"] c #FF3B07",
|
||||
"^ c #FF4308",
|
||||
"/ c #FF4909",
|
||||
"( c #FF4E0A",
|
||||
"_ c #FF500A",
|
||||
": c #FF4F0A",
|
||||
"< c #FF4B09",
|
||||
"[ c #FF4608",
|
||||
"} c #470C01",
|
||||
"| c #FF1300",
|
||||
"1 c #FF1D02",
|
||||
"2 c #FF2603",
|
||||
"3 c #FF2E04",
|
||||
"4 c #FF3706",
|
||||
"5 c #FF3F07",
|
||||
"6 c #FF4708",
|
||||
"7 c #FF4D09",
|
||||
"8 c #FF520A",
|
||||
"9 c #FF530A",
|
||||
"0 c #FF1601",
|
||||
"a c #FF1F02",
|
||||
"b c #FF2904",
|
||||
"c c #FF3205",
|
||||
"d c #FF3A06",
|
||||
"e c #FF4A09",
|
||||
"f c #FF510A",
|
||||
"g c #FF560B",
|
||||
"h c #FF570B",
|
||||
"i c #FF540B",
|
||||
"j c #FF4709",
|
||||
"k c #FF1901",
|
||||
"l c #FF3505",
|
||||
"m c #FF3E07",
|
||||
"n c #FF550B",
|
||||
"o c #FF5A0C",
|
||||
"p c #AD0E00",
|
||||
"q c #FF1C01",
|
||||
"r c #FF2503",
|
||||
"s c #FF3806",
|
||||
"t c #FF4107",
|
||||
"u c #FF590B",
|
||||
"v c #FF5E0C",
|
||||
"w c #FF5D0C",
|
||||
"x c #01043C",
|
||||
"y c #0E2470",
|
||||
"z c #040C4A",
|
||||
"A c #AD0F00",
|
||||
"B c #FF1E02",
|
||||
"C c #FF2803",
|
||||
"D c #FF3105",
|
||||
"E c #EA3505",
|
||||
"F c #701802",
|
||||
"G c #7D1F03",
|
||||
"H c #7D2304",
|
||||
"I c #7D2504",
|
||||
"J c #7D2604",
|
||||
"K c #7D2103",
|
||||
"L c #7D1D02",
|
||||
"M c #310606",
|
||||
"N c #091452",
|
||||
"O c #2858B8",
|
||||
"P c #1E47A1",
|
||||
"Q c #040943",
|
||||
"R c #AD1101",
|
||||
"S c #FF2102",
|
||||
"T c #FF2A04",
|
||||
"U c #FF3405",
|
||||
"V c #DC3306",
|
||||
"W c #420B00",
|
||||
"X c #070739",
|
||||
"Y c #1D3881",
|
||||
"Z c #3366C2",
|
||||
"` c #2E60BD",
|
||||
" . c #08114E",
|
||||
".. c #01063F",
|
||||
"+. c #000541",
|
||||
"@. c #00053F",
|
||||
"#. c #AD1201",
|
||||
"$. c #FF2303",
|
||||
"%. c #FF2D04",
|
||||
"&. c #FF3606",
|
||||
"*. c #DC3506",
|
||||
"=. c #4E0F01",
|
||||
"-. c #030943",
|
||||
";. c #193380",
|
||||
">. c #0C1754",
|
||||
",. c #060D46",
|
||||
"'. c #03063D",
|
||||
"). c #3662B3",
|
||||
"!. c #3D73CB",
|
||||
"~. c #386BC6",
|
||||
"{. c #224596",
|
||||
"]. c #02053E",
|
||||
"^. c #01043D",
|
||||
"/. c #091B62",
|
||||
"(. c #0A3197",
|
||||
"_. c #012995",
|
||||
":. c #AD1301",
|
||||
"<. c #FF2F05",
|
||||
"[. c #DC3707",
|
||||
"}. c #0F2264",
|
||||
"|. c #386CC6",
|
||||
"1. c #4076CD",
|
||||
"2. c #3A68B8",
|
||||
"3. c #254186",
|
||||
"4. c #4476C5",
|
||||
"5. c #4C85D8",
|
||||
"6. c #477ED3",
|
||||
"7. c #2D5FBC",
|
||||
"8. c #204AA6",
|
||||
"9. c #1A47AC",
|
||||
"0. c #0F3AA2",
|
||||
"a. c #052B95",
|
||||
"b. c #00043F",
|
||||
"c. c #AD1501",
|
||||
"d. c #FF2703",
|
||||
"e. c #DC3807",
|
||||
"f. c #4F1101",
|
||||
"g. c #4F1201",
|
||||
"h. c #430D04",
|
||||
"i. c #070A41",
|
||||
"j. c #396ABE",
|
||||
"k. c #4981D5",
|
||||
"l. c #518BDC",
|
||||
"m. c #5793E1",
|
||||
"n. c #5A95E3",
|
||||
"o. c #5691E1",
|
||||
"p. c #5089DB",
|
||||
"q. c #3D72CA",
|
||||
"r. c #3365C1",
|
||||
"s. c #1E4BAF",
|
||||
"t. c #123EA5",
|
||||
"u. c #041B70",
|
||||
"v. c #FA4308",
|
||||
"w. c #E44509",
|
||||
"x. c #E44C0A",
|
||||
"y. c #E4540A",
|
||||
"z. c #923206",
|
||||
"A. c #190522",
|
||||
"B. c #172A6A",
|
||||
"C. c #4F88DA",
|
||||
"D. c #5995E3",
|
||||
"E. c #62A0EB",
|
||||
"F. c #65A3ED",
|
||||
"G. c #426DB2",
|
||||
"H. c #1C306E",
|
||||
"I. c #152562",
|
||||
"J. c #1F3A81",
|
||||
"K. c #3060B8",
|
||||
"L. c #2A5BBA",
|
||||
"M. c #1F4DB0",
|
||||
"N. c #143FA6",
|
||||
"O. c #01053F",
|
||||
"P. c #AD1601",
|
||||
"Q. c #FF3D07",
|
||||
"R. c #FF5F0C",
|
||||
"S. c #AD3D08",
|
||||
"T. c #02053C",
|
||||
"U. c #5089DA",
|
||||
"V. c #5D99E6",
|
||||
"W. c #68A6EF",
|
||||
"X. c #243975",
|
||||
"Y. c #091047",
|
||||
"Z. c #040A42",
|
||||
"`. c #21489F",
|
||||
" + c #1F4EB0",
|
||||
".+ c #041765",
|
||||
"++ c #000238",
|
||||
"@+ c #AD1702",
|
||||
"#+ c #FD4608",
|
||||
"$+ c #F24A09",
|
||||
"%+ c #F2510A",
|
||||
"&+ c #F2570B",
|
||||
"*+ c #892D0D",
|
||||
"=+ c #0C0836",
|
||||
"-+ c #152666",
|
||||
";+ c #5A96E4",
|
||||
">+ c #3C61A6",
|
||||
",+ c #080E44",
|
||||
"'+ c #040B46",
|
||||
")+ c #1E4AAD",
|
||||
"!+ c #072D94",
|
||||
"~+ c #00156B",
|
||||
"{+ c #000A4B",
|
||||
"]+ c #000440",
|
||||
"^+ c #00053E",
|
||||
"/+ c #AD1802",
|
||||
"(+ c #DC3B07",
|
||||
"_+ c #310B12",
|
||||
":+ c #0E0938",
|
||||
"<+ c #0D134B",
|
||||
"[+ c #234592",
|
||||
"}+ c #3F73C9",
|
||||
"|+ c #4B83D7",
|
||||
"1+ c #538DDE",
|
||||
"2+ c #0F1A53",
|
||||
"3+ c #030942",
|
||||
"4+ c #13358D",
|
||||
"5+ c #103BA3",
|
||||
"6+ c #052D99",
|
||||
"7+ c #002795",
|
||||
"8+ c #002692",
|
||||
"9+ c #00033D",
|
||||
"0+ c #020840",
|
||||
"a+ c #112C7C",
|
||||
"b+ c #2959B8",
|
||||
"c+ c #3265C1",
|
||||
"d+ c #3B70C9",
|
||||
"e+ c #437AD0",
|
||||
"f+ c #4A82D5",
|
||||
"g+ c #080E46",
|
||||
"h+ c #02063E",
|
||||
"i+ c #0E2B80",
|
||||
"j+ c #0B359F",
|
||||
"k+ c #012896",
|
||||
"l+ c #002289",
|
||||
"m+ c #000239",
|
||||
"n+ c #AD1902",
|
||||
"o+ c #02043E",
|
||||
"p+ c #0A1C63",
|
||||
"q+ c #224FAE",
|
||||
"r+ c #2C5DBB",
|
||||
"s+ c #3467C2",
|
||||
"t+ c #3A6FC8",
|
||||
"u+ c #3F75CC",
|
||||
"v+ c #0E1B58",
|
||||
"w+ c #030842",
|
||||
"x+ c #0D2F8C",
|
||||
"y+ c #072F9B",
|
||||
"z+ c #001A75",
|
||||
"A+ c #000A4C",
|
||||
"B+ c #000540",
|
||||
"C+ c #DC3A07",
|
||||
"D+ c #020842",
|
||||
"E+ c #071050",
|
||||
"F+ c #1A3886",
|
||||
"G+ c #3063BF",
|
||||
"H+ c #3468C3",
|
||||
"I+ c #274B9C",
|
||||
"J+ c #040941",
|
||||
"K+ c #030C4A",
|
||||
"L+ c #0A339C",
|
||||
"M+ c #002895",
|
||||
"N+ c #002083",
|
||||
"O+ c #00033B",
|
||||
"P+ c #214CA7",
|
||||
"Q+ c #295AB9",
|
||||
"R+ c #2B5CBA",
|
||||
"S+ c #16307A",
|
||||
"T+ c #020740",
|
||||
"U+ c #020A46",
|
||||
"V+ c #0A2E93",
|
||||
"W+ c #022A97",
|
||||
"X+ c #001569",
|
||||
"Y+ c #00023A",
|
||||
"Z+ c #FF3506",
|
||||
"`+ c #FF3C07",
|
||||
" @ c #01063E",
|
||||
".@ c #13348B",
|
||||
"+@ c #1E4CAF",
|
||||
"@@ c #1A409E",
|
||||
"#@ c #0D2575",
|
||||
"$@ c #0A1E68",
|
||||
"%@ c #0B277E",
|
||||
"&@ c #09319B",
|
||||
"*@ c #00248E",
|
||||
"=@ c #00043E",
|
||||
"-@ c #010844",
|
||||
";@ c #103BA2",
|
||||
">@ c #133EA6",
|
||||
",@ c #133FA6",
|
||||
"'@ c #123DA5",
|
||||
")@ c #062E9A",
|
||||
"!@ c #00156A",
|
||||
"~@ c #FF2C04",
|
||||
"{@ c #FF3906",
|
||||
"]@ c #4E0E01",
|
||||
"^@ c #01186D",
|
||||
"/@ c #052E9A",
|
||||
"(@ c #07309B",
|
||||
"_@ c #072C92",
|
||||
":@ c #062582",
|
||||
"<@ c #072F9A",
|
||||
"[@ c #032B98",
|
||||
"}@ c #001261",
|
||||
"|@ c #00105A",
|
||||
"1@ c #002288",
|
||||
"2@ c #00258F",
|
||||
"3@ c #000137",
|
||||
"4@ c #DC3105",
|
||||
"5@ c #00023B",
|
||||
"6@ c #001975",
|
||||
"7@ c #001466",
|
||||
"8@ c #00043D",
|
||||
"9@ c #002693",
|
||||
"0@ c #000746",
|
||||
"a@ c #000C4F",
|
||||
"b@ c #000645",
|
||||
"c@ c #510C00",
|
||||
"d@ c #510D01",
|
||||
"e@ c #430900",
|
||||
"f@ c #400900",
|
||||
"g@ c #001A76",
|
||||
"h@ c #000A4D",
|
||||
"i@ c #001D7C",
|
||||
"j@ c #00063F",
|
||||
"k@ c #00033C",
|
||||
"l@ c #000C51",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . + @ # $ % & * = - ; ; - = > ",
|
||||
" , ' ) ! ~ { ] ^ / ( _ : < [ } ",
|
||||
" , | 1 2 3 4 5 6 7 8 9 8 7 6 } ",
|
||||
" , 0 a b c d ^ e f g h i : j } ",
|
||||
" , k ! ~ l m [ ( n o o g : j } ",
|
||||
" p q r 3 s t e 8 u v w h _ j } x y z ",
|
||||
" A B C D E F G H I J I H K L M N O P Q ",
|
||||
" R S T U V W X Y Z ` . ..+.@. ",
|
||||
" #.$.%.&.*.=. -.;.>.,. '.).!.~.{.].^./.(._.+. ",
|
||||
" :.r <.s [.=. }.|.1.2.3.4.5.6.1.~.7.8.9.0.a.b. ",
|
||||
" c.d.D d e.> f.g.h.i.j.k.l.m.n.o.p.6.q.r.O s.t.u. ",
|
||||
" c.b c ] v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.K.L.M.N.O. ",
|
||||
" P.T { Q.[ : h R.S. T.U.V.W.X.Y. Z.`. +N..+++ ",
|
||||
" @+~ l m #+$+%+&+*+=+-+p.;+>+,+ '+)+t.!+~+{+]+^+ ",
|
||||
" /+%.&.m (+> _+:+<+[+}+|+1+2+ 3+4+5+6+7+7+8+9+ ",
|
||||
" /+%.&.5 (+=.0+a+b+c+d+e+f+g+ h+i+j+k+7+7+l+m+ ",
|
||||
" n+3 &.m (+=.o+p+q+r+s+t+u+v+ w+x+y+7+z+A+B+ ",
|
||||
" n+3 &.m C+=. D+D+E+F+G+H+I+J+ K+L+M+N+O+ ",
|
||||
" n+3 &.Q.e.=. ].P+Q+R+S+T+ 0+U+V+W+7+X+Y+ ",
|
||||
" n+3 Z+`+[.=. @.@+@ + +@@#@$@%@&@W+7+7+*@=@ ",
|
||||
" n+%.U d *.=. -@;@>@N.,@'@0.j+)@7+7+7+7+7+!@=@ ",
|
||||
" n+~@{ {@V ]@ ^@/@(@_@:@<@[@7+7+*@}@|@1@7+2@3@ ",
|
||||
" /+~ D 4 4@]@ 5@6@8+7@]+8@=@9@7+7+0@ +.a@b@ ",
|
||||
" > c@d@d@e@f@ @.5@ @.g@7+8++. ",
|
||||
" h@7+i@j@ ",
|
||||
" k@l@O+ ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
"32 32 17 1",
|
||||
" c None",
|
||||
". c #002CA9",
|
||||
"+ c #0231A9",
|
||||
"@ c #0036AB",
|
||||
"# c #FF0000",
|
||||
"$ c #0D3AA9",
|
||||
"% c #0141AB",
|
||||
"& c #383B8F",
|
||||
"* c #1648A9",
|
||||
"= c #FF1A00",
|
||||
"- c #1250AB",
|
||||
"; c #FF1E0A",
|
||||
"> c #1E57AB",
|
||||
", c #1A5DAC",
|
||||
"' c #FF2C0B",
|
||||
") c #2A64AC",
|
||||
"! c #3469AB",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ###===;;;''''; ",
|
||||
" ###==;;;'''''; ",
|
||||
" ##===;;''''''; ",
|
||||
" ##==;;;''''''' ",
|
||||
" ##==;;;''''''' ",
|
||||
" #===;;'''''''' %$ ",
|
||||
" #===;;'''''''; %%% ",
|
||||
" #==;; -**% +. ",
|
||||
" #==;; %*- ----*%%$+.. ",
|
||||
" #==;; *-->>,>>--*%$@+ ",
|
||||
" ===;;' ->,,),,>-*%%@+ ",
|
||||
" ==;;;'''' >>,)!),>-*%%@+ ",
|
||||
" ==;;;'''' >,)!! %%@+ ",
|
||||
" ==;;;'''' ->,) %@+... ",
|
||||
" ==;;; &**->,, $@..... ",
|
||||
" ==;;; %%*-->> @+..... ",
|
||||
" ==;;; $%%*--- @+... ",
|
||||
" ==;;; %*** @+.. ",
|
||||
" ==;;; %%%%% @+... ",
|
||||
" ==;;; $$%%$$@@+..... ",
|
||||
" ==;;; +@@@@@++....... ",
|
||||
" ==;;; ..++++......... ",
|
||||
" ===;; ... ..... .. ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" . ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "Command.h"
|
||||
#include "InputField.h"
|
||||
#include "BitmapFactory.h"
|
||||
#include "propertyeditor/PropertyItem.h"
|
||||
|
||||
using namespace Gui;
|
||||
using namespace App;
|
||||
|
|
|
@ -84,6 +84,10 @@ void MDIView::deleteSelf()
|
|||
parent->deleteLater();
|
||||
else
|
||||
this->deleteLater();
|
||||
|
||||
// detach from document
|
||||
if (_pcDocument)
|
||||
onClose();
|
||||
_pcDocument = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ void SequencerDialog::showRemainingTime()
|
|||
QTime time( 0,0, 0);
|
||||
time = time.addSecs( rest/1000 );
|
||||
QString remain = Gui::ProgressDialog::tr("Remaining: %1").arg(time.toString());
|
||||
QString status = QString::fromAscii("%1\t[%2]").arg(txt).arg(remain);
|
||||
QString status = QString::fromLatin1("%1\t[%2]").arg(txt).arg(remain);
|
||||
|
||||
if (thr != currentThread) {
|
||||
QMetaObject::invokeMethod(d->dlg, "setLabelText",
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "QuantitySpinBox.h"
|
||||
#include "QuantitySpinBox_p.h"
|
||||
#include "DlgExpressionInput.h"
|
||||
#include "propertyeditor/PropertyItem.h"
|
||||
#include "BitmapFactory.h"
|
||||
#include "Command.h"
|
||||
#include <Base/Tools.h>
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
\**************************************************************************/
|
||||
|
||||
#include <QMutexLocker>
|
||||
|
||||
#include "SignalThread.h"
|
||||
|
||||
using namespace SIM::Coin3D::Quarter;
|
||||
|
@ -47,25 +49,23 @@ void
|
|||
SignalThread::trigger(void)
|
||||
{
|
||||
// lock first to make sure the QThread is actually waiting for a signal
|
||||
this->mutex.lock();
|
||||
QMutexLocker ml(&this->mutex);
|
||||
this->waitcond.wakeOne();
|
||||
this->mutex.unlock();
|
||||
}
|
||||
|
||||
void
|
||||
SignalThread::stopThread(void)
|
||||
{
|
||||
this->mutex.lock();
|
||||
QMutexLocker ml(&this->mutex);
|
||||
this->isstopped = true;
|
||||
this->waitcond.wakeOne();
|
||||
this->mutex.unlock();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SignalThread::run(void)
|
||||
{
|
||||
this->mutex.lock();
|
||||
QMutexLocker ml(&this->mutex);
|
||||
while (!this->isstopped) {
|
||||
// just wait, and trigger every time we receive a signal
|
||||
this->waitcond.wait(&this->mutex);
|
||||
|
@ -73,5 +73,4 @@ SignalThread::run(void)
|
|||
emit triggerSignal();
|
||||
}
|
||||
}
|
||||
this->mutex.unlock();
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ public:
|
|||
|
||||
splash->showMessage(msg.replace(QLatin1String("\n"), QString()), alignment, textColor);
|
||||
QMutex mutex;
|
||||
mutex.lock();
|
||||
QMutexLocker ml(&mutex);
|
||||
QWaitCondition().wait(&mutex, 50);
|
||||
}
|
||||
|
||||
|
|
|
@ -266,6 +266,16 @@ void ViewProvider::setDisplayMaskMode( const char* type )
|
|||
setModeSwitch();
|
||||
}
|
||||
|
||||
SoNode* ViewProvider::getDisplayMaskMode(const char* type) const
|
||||
{
|
||||
std::map<std::string, int>::const_iterator it = _sDisplayMaskModes.find( type );
|
||||
if (it != _sDisplayMaskModes.end()) {
|
||||
return pcModeSwitch->getChild(it->second);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::vector<std::string> ViewProvider::getDisplayMaskModes() const
|
||||
{
|
||||
std::vector<std::string> types;
|
||||
|
|
|
@ -308,6 +308,8 @@ protected:
|
|||
void addDisplayMaskMode( SoNode *node, const char* type );
|
||||
/// Activates the display mask mode \a type
|
||||
void setDisplayMaskMode( const char* type );
|
||||
/// Get the node to the display mask mode \a type
|
||||
SoNode* getDisplayMaskMode(const char* type) const;
|
||||
/// Returns a list of added display mask modes
|
||||
std::vector<std::string> getDisplayMaskModes() const;
|
||||
void setDefaultMode(int);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#define IISICONLABEL_H
|
||||
|
||||
#include <QtGui>
|
||||
#include <QWidget>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
|
|
|
@ -9,6 +9,11 @@
|
|||
#define IISTASKBOX_H
|
||||
|
||||
#include <QtGui>
|
||||
#include <QWidget>
|
||||
#include <QFrame>
|
||||
#include <QBoxLayout>
|
||||
#include <QPaintEvent>
|
||||
#include <QPixmap>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
#define IISTASKGROUP_H
|
||||
|
||||
#include <QtGui>
|
||||
#include <QWidget>
|
||||
#include <QFrame>
|
||||
#include <QBoxLayout>
|
||||
#include <QPaintEvent>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
|
|
|
@ -5,6 +5,12 @@
|
|||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QSizePolicy>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPainter>
|
||||
#include <QTimer>
|
||||
|
||||
#include "iistaskheader.h"
|
||||
#include "iistaskpanelscheme.h"
|
||||
#include "iisiconlabel.h"
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
#define IISTASKHEADER_H
|
||||
|
||||
#include <QtGui>
|
||||
#include <QFrame>
|
||||
#include <QLabel>
|
||||
#include <QEvent>
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#include <QSpacerItem>
|
||||
#include <QWidget>
|
||||
#include <QPaintEvent>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
#define IISTASKPANELSCHEME_H
|
||||
|
||||
#include <QtGui>
|
||||
#include <QColor>
|
||||
#include <QPen>
|
||||
#include <QBrush>
|
||||
#include <QSize>
|
||||
|
||||
#include "iistaskpanel_global.h"
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ void PropertyItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
|
||||
QItemDelegate::paint(painter, option, index);
|
||||
|
||||
QColor color = static_cast<QRgb>(QApplication::style()->styleHint(QStyle::SH_Table_GridLineColor, &option));
|
||||
QColor color = static_cast<QRgb>(QApplication::style()->styleHint(QStyle::SH_Table_GridLineColor, &opt, qobject_cast<QWidget*>(parent())));
|
||||
painter->setPen(QPen(color));
|
||||
if (index.column() == 1 || !(property && property->isSeparator())) {
|
||||
int right = (option.direction == Qt::LeftToRight) ? option.rect.right() : option.rect.left();
|
||||
|
|
|
@ -1208,7 +1208,13 @@ class _CommandComponent:
|
|||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
def makeIfcSpreadsheet(obj=None):
|
||||
def makeIfcSpreadsheet(archobj=None):
|
||||
ifc_container = None
|
||||
for obj in FreeCAD.ActiveDocument.Objects :
|
||||
if obj.Name == "IfcPropertiesContainer" :
|
||||
ifc_container = obj
|
||||
if not ifc_container :
|
||||
ifc_container = FreeCAD.ActiveDocument.addObject('App::DocumentObjectGroup','IfcPropertiesContainer')
|
||||
import Spreadsheet
|
||||
ifc_spreadsheet = FreeCAD.ActiveDocument.addObject('Spreadsheet::Sheet','IfcProperties')
|
||||
ifc_spreadsheet.set('A1', translate("Arch","Category"))
|
||||
|
@ -1216,14 +1222,15 @@ def makeIfcSpreadsheet(obj=None):
|
|||
ifc_spreadsheet.set('C1', translate("Arch","Type"))
|
||||
ifc_spreadsheet.set('D1', translate("Arch","Value"))
|
||||
ifc_spreadsheet.set('E1', translate("Arch","Unit"))
|
||||
if obj :
|
||||
if hasattr(obj,"IfcProperties"):
|
||||
obj.IfcProperties = ifc_spreadsheet
|
||||
ifc_container.addObject(ifc_spreadsheet)
|
||||
if archobj :
|
||||
if hasattr(obj,"IfcProperties") :
|
||||
archobj.IfcProperties = ifc_spreadsheet
|
||||
return ifc_spreadsheet
|
||||
else :
|
||||
FreeCAD.Console.PrintWarning(translate("Arch", "The object have not IfcProperties attribute. Cancel spreadsheet creation for object : ") + obj.Label)
|
||||
FreeCAD.Console.PrintWarning(translate("Arch", "The object have not IfcProperties attribute. Cancel spreadsheet creation for object : ") + archobj.Label)
|
||||
FreeCAD.ActiveDocument.removeObject(ifc_spreadsheet)
|
||||
else:
|
||||
else :
|
||||
return ifc_spreadsheet
|
||||
|
||||
class _CommandIfcSpreadsheet:
|
||||
|
|
|
@ -1368,15 +1368,15 @@ class DraftToolBar:
|
|||
self.isRelative.setChecked(not self.isRelative.isChecked())
|
||||
self.relativeMode = self.isRelative.isChecked()
|
||||
spec = True
|
||||
elif txt.endswith("i"):
|
||||
elif txt.endswith("I"):
|
||||
if self.hasFill.isVisible():
|
||||
self.hasFill.setChecked(not self.hasFill.isChecked())
|
||||
spec = True
|
||||
elif txt.endswith("f"):
|
||||
elif txt.endswith("F"):
|
||||
if self.finishButton.isVisible():
|
||||
self.finish()
|
||||
spec = True
|
||||
elif txt.endswith("t"):
|
||||
elif txt.endswith("T"):
|
||||
self.toggleContinue()
|
||||
spec = True
|
||||
elif txt.endswith("w"):
|
||||
|
@ -1415,7 +1415,8 @@ class DraftToolBar:
|
|||
self.closeLine()
|
||||
elif self.isCopy.isVisible():
|
||||
self.isCopy.setChecked(not self.isCopy.isChecked())
|
||||
elif txt.endswith("n"):
|
||||
spec = True
|
||||
elif txt.endswith("N"):
|
||||
if self.continueCmd.isVisible():
|
||||
self.continueCmd.setChecked(not self.continueCmd.isChecked())
|
||||
spec = True
|
||||
|
|
|
@ -592,16 +592,24 @@ void MeshObject::getPointsFromSelection(std::vector<unsigned long>& inds) const
|
|||
MeshCore::MeshAlgorithm(this->_kernel).GetPointsFlag(inds, MeshCore::MeshPoint::SELECTED);
|
||||
}
|
||||
|
||||
unsigned long MeshObject::countSelectedFacets() const
|
||||
{
|
||||
return MeshCore::MeshAlgorithm(this->_kernel).CountFacetFlag(MeshCore::MeshFacet::SELECTED);
|
||||
}
|
||||
|
||||
bool MeshObject::hasSelectedFacets() const
|
||||
{
|
||||
unsigned long ct = MeshCore::MeshAlgorithm(this->_kernel).CountFacetFlag(MeshCore::MeshFacet::SELECTED);
|
||||
return ct > 0;
|
||||
return (countSelectedFacets() > 0);
|
||||
}
|
||||
|
||||
unsigned long MeshObject::countSelectedPoints() const
|
||||
{
|
||||
return MeshCore::MeshAlgorithm(this->_kernel).CountPointFlag(MeshCore::MeshPoint::SELECTED);
|
||||
}
|
||||
|
||||
bool MeshObject::hasSelectedPoints() const
|
||||
{
|
||||
unsigned long ct = MeshCore::MeshAlgorithm(this->_kernel).CountPointFlag(MeshCore::MeshPoint::SELECTED);
|
||||
return ct > 0;
|
||||
return (countSelectedPoints() > 0);
|
||||
}
|
||||
|
||||
std::vector<unsigned long> MeshObject::getPointsFromFacets(const std::vector<unsigned long>& facets) const
|
||||
|
|
|
@ -220,7 +220,9 @@ public:
|
|||
void addPointsToSelection(const std::vector<unsigned long>&) const;
|
||||
void removeFacetsFromSelection(const std::vector<unsigned long>&) const;
|
||||
void removePointsFromSelection(const std::vector<unsigned long>&) const;
|
||||
unsigned long countSelectedFacets() const;
|
||||
bool hasSelectedFacets() const;
|
||||
unsigned long countSelectedPoints() const;
|
||||
bool hasSelectedPoints() const;
|
||||
void getFacetsFromSelection(std::vector<unsigned long>&) const;
|
||||
void getPointsFromSelection(std::vector<unsigned long>&) const;
|
||||
|
|
|
@ -170,6 +170,8 @@ void MeshSelection::prepareBrushSelection(bool add,SoEventCallbackCB *cb)
|
|||
if (viewer) {
|
||||
stopInteractiveCallback(viewer);
|
||||
startInteractiveCallback(viewer, cb);
|
||||
viewer->navigationStyle()->stopSelection();
|
||||
|
||||
// set cross cursor
|
||||
Gui::BrushSelection* brush = new Gui::BrushSelection();
|
||||
brush->setClosed(true);
|
||||
|
|
|
@ -1697,6 +1697,13 @@ void ViewProviderMesh::deselectFacet(unsigned long facet)
|
|||
}
|
||||
}
|
||||
|
||||
bool ViewProviderMesh::isFacetSelected(unsigned long facet)
|
||||
{
|
||||
const Mesh::MeshObject& rMesh = static_cast<Mesh::Feature*>(pcObject)->Mesh.getValue();
|
||||
const MeshCore::MeshFacetArray& faces = rMesh.getKernel().GetFacets();
|
||||
return faces[facet].IsFlag(MeshCore::MeshFacet::SELECTED);
|
||||
}
|
||||
|
||||
void ViewProviderMesh::selectComponent(unsigned long uFacet)
|
||||
{
|
||||
std::vector<unsigned long> selection;
|
||||
|
@ -1766,6 +1773,24 @@ void ViewProviderMesh::removeSelection(const std::vector<unsigned long>& indices
|
|||
unhighlightSelection();
|
||||
}
|
||||
|
||||
void ViewProviderMesh::invertSelection()
|
||||
{
|
||||
const Mesh::MeshObject& rMesh = static_cast<Mesh::Feature*>(pcObject)->Mesh.getValue();
|
||||
const MeshCore::MeshFacetArray& faces = rMesh.getKernel().GetFacets();
|
||||
unsigned long num_notsel = std::count_if(faces.begin(), faces.end(),
|
||||
std::bind2nd(MeshCore::MeshIsNotFlag<MeshCore::MeshFacet>(),
|
||||
MeshCore::MeshFacet::SELECTED));
|
||||
std::vector<unsigned long> notselect;
|
||||
notselect.reserve(num_notsel);
|
||||
MeshCore::MeshFacetArray::_TConstIterator beg = faces.begin();
|
||||
MeshCore::MeshFacetArray::_TConstIterator end = faces.end();
|
||||
for (MeshCore::MeshFacetArray::_TConstIterator jt = beg; jt != end; ++jt) {
|
||||
if (!jt->IsFlag(MeshCore::MeshFacet::SELECTED))
|
||||
notselect.push_back(jt-beg);
|
||||
}
|
||||
setSelection(notselect);
|
||||
}
|
||||
|
||||
void ViewProviderMesh::clearSelection()
|
||||
{
|
||||
const Mesh::MeshObject& rMesh = static_cast<Mesh::Feature*>(pcObject)->Mesh.getValue();
|
||||
|
|
|
@ -138,6 +138,7 @@ public:
|
|||
/** @name Editing */
|
||||
//@{
|
||||
bool doubleClicked(void){ return false; }
|
||||
bool isFacetSelected(unsigned long facet);
|
||||
void selectComponent(unsigned long facet);
|
||||
void deselectComponent(unsigned long facet);
|
||||
void selectFacet(unsigned long facet);
|
||||
|
@ -145,6 +146,7 @@ public:
|
|||
void setSelection(const std::vector<unsigned long>&);
|
||||
void addSelection(const std::vector<unsigned long>&);
|
||||
void removeSelection(const std::vector<unsigned long>&);
|
||||
void invertSelection();
|
||||
void clearSelection();
|
||||
void deleteSelection();
|
||||
void getFacetsFromPolygon(const std::vector<SbVec2f>& picked,
|
||||
|
|
|
@ -293,7 +293,7 @@ void TaskPadParameters::onModeChanged(int index)
|
|||
case 0:
|
||||
pcPad->Type.setValue("Length");
|
||||
// Avoid error message
|
||||
if (ui->lengthEdit->value() < Precision::Confusion())
|
||||
if (ui->lengthEdit->value() < Base::Quantity(Precision::Confusion(), Base::Unit::Length))
|
||||
ui->lengthEdit->setValue(5.0);
|
||||
break;
|
||||
case 1: pcPad->Type.setValue("UpToLast"); break;
|
||||
|
|
|
@ -190,22 +190,21 @@ unsigned int PropertyGreyValueList::getMemSize (void) const
|
|||
|
||||
void PropertyGreyValueList::removeIndices( const std::vector<unsigned long>& uIndices )
|
||||
{
|
||||
#if 0
|
||||
// We need a sorted array
|
||||
std::vector<unsigned long> uSortedInds = uIndices;
|
||||
std::sort(uSortedInds.begin(), uSortedInds.end());
|
||||
|
||||
const std::vector<double>& rValueList = getValues();
|
||||
const std::vector<float>& rValueList = getValues();
|
||||
|
||||
assert( uSortedInds.size() <= rValueList.size() );
|
||||
if ( uSortedInds.size() > rValueList.size() )
|
||||
return;
|
||||
|
||||
std::vector<double> remainValue;
|
||||
std::vector<float> remainValue;
|
||||
remainValue.reserve(rValueList.size() - uSortedInds.size());
|
||||
|
||||
std::vector<unsigned long>::iterator pos = uSortedInds.begin();
|
||||
for ( std::vector<double>::const_iterator it = rValueList.begin(); it != rValueList.end(); ++it ) {
|
||||
for ( std::vector<float>::const_iterator it = rValueList.begin(); it != rValueList.end(); ++it ) {
|
||||
unsigned long index = it - rValueList.begin();
|
||||
if (pos == uSortedInds.end())
|
||||
remainValue.push_back( *it );
|
||||
|
@ -216,7 +215,6 @@ void PropertyGreyValueList::removeIndices( const std::vector<unsigned long>& uIn
|
|||
}
|
||||
|
||||
setValues(remainValue);
|
||||
#endif
|
||||
}
|
||||
|
||||
PropertyNormalList::PropertyNormalList()
|
||||
|
|
|
@ -428,6 +428,15 @@ void ViewProviderScattered::updateData(const App::Property* prop)
|
|||
// The number of points might have changed, so force also a resize of the Inventor internals
|
||||
setActiveMode();
|
||||
}
|
||||
else if (prop->getTypeId() == Points::PropertyNormalList::getClassTypeId()) {
|
||||
setActiveMode();
|
||||
}
|
||||
else if (prop->getTypeId() == Points::PropertyGreyValueList::getClassTypeId()) {
|
||||
setActiveMode();
|
||||
}
|
||||
else if (prop->getTypeId() == App::PropertyColorList::getClassTypeId()) {
|
||||
setActiveMode();
|
||||
}
|
||||
}
|
||||
|
||||
void ViewProviderScattered::cut(const std::vector<SbVec2f>& picked, Gui::View3DInventorViewer &Viewer)
|
||||
|
@ -446,24 +455,63 @@ void ViewProviderScattered::cut(const std::vector<SbVec2f>& picked, Gui::View3DI
|
|||
SbViewVolume vol = pCam->getViewVolume();
|
||||
|
||||
// search for all points inside/outside the polygon
|
||||
Points::PointKernel newKernel;
|
||||
for (Points::PointKernel::const_iterator jt = points.begin(); jt != points.end(); ++jt) {
|
||||
std::vector<unsigned long> removeIndices;
|
||||
removeIndices.reserve(points.size());
|
||||
|
||||
unsigned long index = 0;
|
||||
for (Points::PointKernel::const_iterator jt = points.begin(); jt != points.end(); ++jt, ++index) {
|
||||
SbVec3f pt(jt->x,jt->y,jt->z);
|
||||
|
||||
// project from 3d to 2d
|
||||
vol.projectToScreen(pt, pt);
|
||||
if (!cPoly.Contains(Base::Vector2D(pt[0],pt[1])))
|
||||
newKernel.push_back(*jt);
|
||||
if (cPoly.Contains(Base::Vector2D(pt[0],pt[1])))
|
||||
removeIndices.push_back(index);
|
||||
}
|
||||
|
||||
if (newKernel.size() == points.size())
|
||||
if (removeIndices.empty())
|
||||
return; // nothing needs to be done
|
||||
|
||||
//Remove the points from the cloud and open a transaction object for the undo/redo stuff
|
||||
Gui::Application::Instance->activeDocument()->openCommand("Cut points");
|
||||
|
||||
// sets the points outside the polygon to update the Inventor node
|
||||
fea->Points.setValue(newKernel);
|
||||
fea->Points.removeIndices(removeIndices);
|
||||
|
||||
std::map<std::string,App::Property*> Map;
|
||||
pcObject->getPropertyMap(Map);
|
||||
|
||||
for (std::map<std::string,App::Property*>::iterator it = Map.begin(); it != Map.end(); ++it) {
|
||||
Base::Type type = it->second->getTypeId();
|
||||
if (type == Points::PropertyNormalList::getClassTypeId()) {
|
||||
static_cast<Points::PropertyNormalList*>(it->second)->removeIndices(removeIndices);
|
||||
}
|
||||
else if (type == Points::PropertyGreyValueList::getClassTypeId()) {
|
||||
static_cast<Points::PropertyGreyValueList*>(it->second)->removeIndices(removeIndices);
|
||||
}
|
||||
else if (type == App::PropertyColorList::getClassTypeId()) {
|
||||
//static_cast<App::PropertyColorList*>(it->second)->removeIndices(removeIndices);
|
||||
const std::vector<App::Color>& colors = static_cast<App::PropertyColorList*>(it->second)->getValues();
|
||||
|
||||
if (removeIndices.size() > colors.size())
|
||||
break;
|
||||
|
||||
std::vector<App::Color> remainValue;
|
||||
remainValue.reserve(colors.size() - removeIndices.size());
|
||||
|
||||
std::vector<unsigned long>::iterator pos = removeIndices.begin();
|
||||
for (std::vector<App::Color>::const_iterator jt = colors.begin(); jt != colors.end(); ++jt) {
|
||||
unsigned long index = jt - colors.begin();
|
||||
if (pos == removeIndices.end())
|
||||
remainValue.push_back( *jt );
|
||||
else if (index != *pos)
|
||||
remainValue.push_back( *jt );
|
||||
else
|
||||
++pos;
|
||||
}
|
||||
|
||||
static_cast<App::PropertyColorList*>(it->second)->setValues(remainValue);
|
||||
}
|
||||
}
|
||||
|
||||
// unset the modified flag because we don't need the features' execute() to be called
|
||||
Gui::Application::Instance->activeDocument()->commitCommand();
|
||||
|
|
|
@ -53,7 +53,7 @@ void DocumentThread::run()
|
|||
{
|
||||
App::Document* doc = App::GetApplication().getActiveDocument();
|
||||
DocumentProtector dp(doc);
|
||||
dp.addObject("Mesh::Ellipsoid", (const char*)objectName().toAscii());
|
||||
dp.addObject("Mesh::Ellipsoid", (const char*)objectName().toLatin1());
|
||||
dp.recompute();
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ void CmdSandboxDocumentThread::activated(int iMsg)
|
|||
App::GetApplication().newDocument("Thread");
|
||||
for (int i=0; i<5; i++) {
|
||||
Sandbox::DocumentThread* dt = new Sandbox::DocumentThread();
|
||||
dt->setObjectName(QString::fromAscii("MyMesh_%1").arg(i));
|
||||
dt->setObjectName(QString::fromLatin1("MyMesh_%1").arg(i));
|
||||
QObject::connect(dt, SIGNAL(finished()), dt, SLOT(deleteLater()));
|
||||
dt->start();
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ void CmdSandboxDocThreadWithSeq::activated(int iMsg)
|
|||
{
|
||||
App::GetApplication().newDocument("Thread");
|
||||
Sandbox::DocumentThread* dt = new Sandbox::DocumentThread();
|
||||
dt->setObjectName(QString::fromAscii("MyMesh"));
|
||||
dt->setObjectName(QString::fromLatin1("MyMesh"));
|
||||
QObject::connect(dt, SIGNAL(finished()), dt, SLOT(deleteLater()));
|
||||
dt->start();
|
||||
#ifdef FC_DEBUG
|
||||
|
@ -217,7 +217,7 @@ void CmdSandboxDocThreadBusy::activated(int iMsg)
|
|||
{
|
||||
App::GetApplication().newDocument("Thread");
|
||||
Sandbox::DocumentThread* dt = new Sandbox::DocumentThread();
|
||||
dt->setObjectName(QString::fromAscii("MyMesh"));
|
||||
dt->setObjectName(QString::fromLatin1("MyMesh"));
|
||||
QObject::connect(dt, SIGNAL(finished()), dt, SLOT(deleteLater()));
|
||||
dt->start();
|
||||
#ifdef FC_DEBUG
|
||||
|
@ -410,7 +410,7 @@ void CmdSandboxPythonThread::activated(int iMsg)
|
|||
App::GetApplication().newDocument("Thread");
|
||||
for (int i=0; i<5; i++) {
|
||||
Sandbox::PythonThread* pt = new Sandbox::PythonThread();
|
||||
pt->setObjectName(QString::fromAscii("MyMesh_%1").arg(i));
|
||||
pt->setObjectName(QString::fromLatin1("MyMesh_%1").arg(i));
|
||||
QObject::connect(pt, SIGNAL(finished()), pt, SLOT(deleteLater()));
|
||||
pt->start();
|
||||
}
|
||||
|
@ -462,7 +462,7 @@ void CmdSandboxDocThreadWithDialog::activated(int iMsg)
|
|||
{
|
||||
App::GetApplication().newDocument("Thread");
|
||||
Sandbox::DocumentThread* dt = new Sandbox::DocumentThread();
|
||||
dt->setObjectName(QString::fromAscii("MyMesh"));
|
||||
dt->setObjectName(QString::fromLatin1("MyMesh"));
|
||||
QObject::connect(dt, SIGNAL(finished()), dt, SLOT(deleteLater()));
|
||||
dt->start();
|
||||
//QFileDialog::getOpenFileName();
|
||||
|
@ -489,7 +489,7 @@ void CmdSandboxDocThreadWithFileDlg::activated(int iMsg)
|
|||
{
|
||||
App::GetApplication().newDocument("Thread");
|
||||
Sandbox::DocumentThread* dt = new Sandbox::DocumentThread();
|
||||
dt->setObjectName(QString::fromAscii("MyMesh"));
|
||||
dt->setObjectName(QString::fromLatin1("MyMesh"));
|
||||
QObject::connect(dt, SIGNAL(finished()), dt, SLOT(deleteLater()));
|
||||
dt->start();
|
||||
QFileDialog::getOpenFileName();
|
||||
|
@ -1014,9 +1014,9 @@ public:
|
|||
painter.drawPath(path);
|
||||
painter.setPen(Qt::white);
|
||||
painter.drawText(25, 40, 70, 20, Qt::AlignHCenter|Qt::AlignVCenter,
|
||||
QString::fromAscii("Distance: 2.784mm"));
|
||||
QString::fromLatin1("Distance: 2.784mm"));
|
||||
//QPainterPath text;
|
||||
//text.addText(25,55,QFont(), QString::fromAscii("Distance"));
|
||||
//text.addText(25,55,QFont(), QString::fromLatin1("Distance"));
|
||||
//painter.setBrush(QBrush(Qt::white, Qt::SolidPattern));
|
||||
//painter.drawPath(text);
|
||||
}
|
||||
|
@ -1054,7 +1054,7 @@ CmdTestImageNode::CmdTestImageNode()
|
|||
|
||||
void CmdTestImageNode::activated(int iMsg)
|
||||
{
|
||||
QString text = QString::fromAscii("Distance: 2.7jgiorjgor84mm");
|
||||
QString text = QString::fromLatin1("Distance: 2.7jgiorjgor84mm");
|
||||
QFont font;
|
||||
QFontMetrics fm(font);
|
||||
int w = fm.width(text);
|
||||
|
@ -1168,10 +1168,10 @@ void CmdTestRedirectPaint::activated(int iMsg)
|
|||
QCalendarWidget* cal = new QCalendarWidget();
|
||||
QLabel* label = new QLabel();
|
||||
QPainter::setRedirected(cal,label);
|
||||
cal->setWindowTitle(QString::fromAscii("QCalendarWidget"));
|
||||
cal->setWindowTitle(QString::fromLatin1("QCalendarWidget"));
|
||||
cal->show();
|
||||
label->show();
|
||||
label->setWindowTitle(QString::fromAscii("QLabel"));
|
||||
label->setWindowTitle(QString::fromLatin1("QLabel"));
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1193,7 +1193,7 @@ void CmdTestCryptographicHash::activated(int iMsg)
|
|||
{
|
||||
QByteArray data = "FreeCAD";
|
||||
QByteArray hash = QCryptographicHash::hash(data, QCryptographicHash::Md5);
|
||||
QMessageBox::information(0,QLatin1String("Hash of: FreeCAD"),QString::fromAscii(hash));
|
||||
QMessageBox::information(0,QLatin1String("Hash of: FreeCAD"),QString::fromLatin1(hash));
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1353,13 +1353,13 @@ void CmdMengerSponge::activated(int iMsg)
|
|||
{
|
||||
bool ok;
|
||||
int level = QInputDialog::getInteger(Gui::getMainWindow(),
|
||||
QString::fromAscii("Menger sponge"),
|
||||
QString::fromAscii("Recursion depth:"),
|
||||
QString::fromLatin1("Menger sponge"),
|
||||
QString::fromLatin1("Recursion depth:"),
|
||||
3, 1, 5, 1, &ok);
|
||||
if (!ok) return;
|
||||
int ret = QMessageBox::question(Gui::getMainWindow(),
|
||||
QString::fromAscii("Parallel"),
|
||||
QString::fromAscii("Do you want to run this in a thread pool?"),
|
||||
QString::fromLatin1("Parallel"),
|
||||
QString::fromLatin1("Do you want to run this in a thread pool?"),
|
||||
QMessageBox::Yes|QMessageBox::No);
|
||||
bool parallel=(ret == QMessageBox::Yes);
|
||||
float x0=0,y0=0,z0=0;
|
||||
|
@ -1405,7 +1405,7 @@ CmdTestGraphicsView::CmdTestGraphicsView()
|
|||
void CmdTestGraphicsView::activated(int iMsg)
|
||||
{
|
||||
Gui::GraphicsView3D* view3D = new Gui::GraphicsView3D(getActiveGuiDocument(), Gui::getMainWindow());
|
||||
view3D->setWindowTitle(QString::fromAscii("Graphics scene"));
|
||||
view3D->setWindowTitle(QString::fromLatin1("Graphics scene"));
|
||||
view3D->setWindowIcon(QApplication::windowIcon());
|
||||
view3D->resize(400, 300);
|
||||
Gui::getMainWindow()->addWindow(view3D);
|
||||
|
|
|
@ -265,7 +265,7 @@ void GraphicsScene::drawBackground(QPainter *painter, const QRectF &)
|
|||
|
||||
painter->save();
|
||||
painter->fillRect(40,40,40,60,Qt::lightGray);
|
||||
painter->drawText(50,50, QString::fromAscii("Done with QPainter"));
|
||||
painter->drawText(50,50, QString::fromLatin1("Done with QPainter"));
|
||||
painter->restore();
|
||||
|
||||
QTimer::singleShot(20, this, SLOT(update()));
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
{
|
||||
QPainter p(&img);
|
||||
p.setPen(Qt::white);
|
||||
p.drawText(200,200,QString::fromAscii("Render to QImage"));
|
||||
p.drawText(200,200,QString::fromLatin1("Render to QImage"));
|
||||
}
|
||||
|
||||
img = QGLWidget::convertToGLFormat(img);
|
||||
|
@ -70,7 +70,7 @@ public:
|
|||
{
|
||||
QPainter p(fbo);
|
||||
p.setPen(Qt::white);
|
||||
p.drawText(200,200,QString::fromAscii("Render to QGLFramebufferObject"));
|
||||
p.drawText(200,200,QString::fromLatin1("Render to QGLFramebufferObject"));
|
||||
p.end();
|
||||
//img = fbo->toImage();
|
||||
//img = QGLWidget::convertToGLFormat(img);
|
||||
|
@ -498,7 +498,7 @@ void DrawingPlane::terminate()
|
|||
SoGLRenderAction a(SbViewportRegion(128,128));
|
||||
a.apply(_pcView3D->getSoRenderManager()->getSceneGraph());
|
||||
fbo->release();
|
||||
fbo->toImage().save(QString::fromAscii("C:/Temp/DrawingPlane.png"));
|
||||
fbo->toImage().save(QString::fromLatin1("C:/Temp/DrawingPlane.png"));
|
||||
delete fbo;
|
||||
}
|
||||
|
||||
|
|
|
@ -388,62 +388,62 @@ TaskPanelView::TaskPanelView(QWidget *parent)
|
|||
tabWidget->addTab(page1, QLatin1String("Action Box"));
|
||||
|
||||
// setup ActionBox 1
|
||||
ui->ActionBox1->setIcon(QPixmap(QString::fromAscii(":/icons/document-open.svg")));
|
||||
ui->ActionBox1->header()->setText(QString::fromAscii("Header of the group"));
|
||||
ui->ActionBox1->setIcon(QPixmap(QString::fromLatin1(":/icons/document-open.svg")));
|
||||
ui->ActionBox1->header()->setText(QString::fromLatin1("Header of the group"));
|
||||
connect(ui->ActionBox1->header(), SIGNAL(clicked()), action, SIGNAL(triggered()));
|
||||
|
||||
QSint::ActionLabel *a1 = ui->ActionBox1->createItem(QString::fromAscii("This action has no icon"));
|
||||
QSint::ActionLabel *a1 = ui->ActionBox1->createItem(QString::fromLatin1("This action has no icon"));
|
||||
connect(a1, SIGNAL(clicked()), action, SIGNAL(triggered()));
|
||||
QSint::ActionLabel *a2 = ui->ActionBox1->createItem(QPixmap(QString::fromAscii(":/icons/document-print.svg")),
|
||||
QString::fromAscii("This action has icon"));
|
||||
QSint::ActionLabel *a2 = ui->ActionBox1->createItem(QPixmap(QString::fromLatin1(":/icons/document-print.svg")),
|
||||
QString::fromLatin1("This action has icon"));
|
||||
connect(a2, SIGNAL(clicked()), action, SIGNAL(triggered()));
|
||||
|
||||
QLayout *hbl1 = ui->ActionBox1->createHBoxLayout();
|
||||
QSint::ActionLabel *a3 = ui->ActionBox1->createItem(QString::fromAscii("1st action in row"), hbl1);
|
||||
QSint::ActionLabel *a3 = ui->ActionBox1->createItem(QString::fromLatin1("1st action in row"), hbl1);
|
||||
connect(a3, SIGNAL(clicked()), action, SIGNAL(triggered()));
|
||||
QSint::ActionLabel *a4 = ui->ActionBox1->createItem(QString::fromAscii("2nd action in row"), hbl1);
|
||||
QSint::ActionLabel *a4 = ui->ActionBox1->createItem(QString::fromLatin1("2nd action in row"), hbl1);
|
||||
connect(a4, SIGNAL(clicked()), action, SIGNAL(triggered()));
|
||||
|
||||
// setup ActionBox 2
|
||||
ui->ActionBox2->setIcon(QPixmap(QString::fromAscii(":/icons/document-save.png")));
|
||||
ui->ActionBox2->header()->setText(QString::fromAscii("Checkable actions allowed"));
|
||||
ui->ActionBox2->setIcon(QPixmap(QString::fromLatin1(":/icons/document-save.png")));
|
||||
ui->ActionBox2->header()->setText(QString::fromLatin1("Checkable actions allowed"));
|
||||
connect(ui->ActionBox2->header(), SIGNAL(clicked()), action, SIGNAL(triggered()));
|
||||
|
||||
QSint::ActionLabel *b1 = ui->ActionBox2->createItem(QString::fromAscii("Action 1 (Exclusive)"));
|
||||
QSint::ActionLabel *b1 = ui->ActionBox2->createItem(QString::fromLatin1("Action 1 (Exclusive)"));
|
||||
b1->setCheckable(true);
|
||||
b1->setAutoExclusive(true);
|
||||
b1->setChecked(true);
|
||||
QSint::ActionLabel *b2 = ui->ActionBox2->createItem(QString::fromAscii("Action 2 (Exclusive)"));
|
||||
QSint::ActionLabel *b2 = ui->ActionBox2->createItem(QString::fromLatin1("Action 2 (Exclusive)"));
|
||||
b2->setCheckable(true);
|
||||
b2->setAutoExclusive(true);
|
||||
QSint::ActionLabel *b3 = ui->ActionBox2->createItem(QString::fromAscii("Action 3 (Exclusive)"));
|
||||
QSint::ActionLabel *b3 = ui->ActionBox2->createItem(QString::fromLatin1("Action 3 (Exclusive)"));
|
||||
b3->setCheckable(true);
|
||||
b3->setAutoExclusive(true);
|
||||
|
||||
QSint::ActionLabel *b4 = ui->ActionBox2->createItem(QString::fromAscii("Non-exclusive but still checkable"));
|
||||
QSint::ActionLabel *b4 = ui->ActionBox2->createItem(QString::fromLatin1("Non-exclusive but still checkable"));
|
||||
b4->setCheckable(true);
|
||||
|
||||
// setup ActionBox 3
|
||||
ui->ActionBox3->setIcon(QPixmap(QString::fromAscii(":/icons/document-print.png")));
|
||||
ui->ActionBox3->header()->setText(QString::fromAscii("Also, widgets allowed as well"));
|
||||
ui->ActionBox3->setIcon(QPixmap(QString::fromLatin1(":/icons/document-print.png")));
|
||||
ui->ActionBox3->header()->setText(QString::fromLatin1("Also, widgets allowed as well"));
|
||||
|
||||
ui->ActionBox3->addWidget(new QPushButton(QString::fromAscii("PushButton"), this));
|
||||
ui->ActionBox3->addWidget(new QCheckBox(QString::fromAscii("CheckBox"), this));
|
||||
ui->ActionBox3->addWidget(new QPushButton(QString::fromLatin1("PushButton"), this));
|
||||
ui->ActionBox3->addWidget(new QCheckBox(QString::fromLatin1("CheckBox"), this));
|
||||
QLayout *hbl3 = ui->ActionBox3->createHBoxLayout();
|
||||
ui->ActionBox3->addWidget(new QRadioButton(QString::fromAscii("RadioButton 1"), this), hbl3);
|
||||
ui->ActionBox3->addWidget(new QRadioButton(QString::fromAscii("RadioButton 2"), this), hbl3);
|
||||
ui->ActionBox3->addWidget(new QRadioButton(QString::fromLatin1("RadioButton 1"), this), hbl3);
|
||||
ui->ActionBox3->addWidget(new QRadioButton(QString::fromLatin1("RadioButton 2"), this), hbl3);
|
||||
|
||||
// setup ActionBox 4
|
||||
ui->ActionBox4->setIcon(QPixmap(QString::fromAscii(":/icons/document-open.png")));
|
||||
ui->ActionBox4->header()->setText(QString::fromAscii("ActionBox with different scheme"));
|
||||
ui->ActionBox4->setIcon(QPixmap(QString::fromLatin1(":/icons/document-open.png")));
|
||||
ui->ActionBox4->header()->setText(QString::fromLatin1("ActionBox with different scheme"));
|
||||
|
||||
ui->ActionBox4->createItem(QString::fromAscii("This action has no icon"));
|
||||
ui->ActionBox4->createItem(QPixmap(QString::fromAscii(":/icons/document-print.png")),
|
||||
QString::fromAscii("This action has icon"));
|
||||
ui->ActionBox4->createItem(QString::fromLatin1("This action has no icon"));
|
||||
ui->ActionBox4->createItem(QPixmap(QString::fromLatin1(":/icons/document-print.png")),
|
||||
QString::fromLatin1("This action has icon"));
|
||||
QLayout *hbl4 = ui->ActionBox4->createHBoxLayout();
|
||||
ui->ActionBox4->createItem(QString::fromAscii("1st action in row"), hbl4);
|
||||
ui->ActionBox4->createItem(QString::fromAscii("2nd action in row"), hbl4);
|
||||
ui->ActionBox4->createItem(QString::fromAscii("3rd action in row"), hbl4);
|
||||
ui->ActionBox4->createItem(QString::fromLatin1("1st action in row"), hbl4);
|
||||
ui->ActionBox4->createItem(QString::fromLatin1("2nd action in row"), hbl4);
|
||||
ui->ActionBox4->createItem(QString::fromLatin1("3rd action in row"), hbl4);
|
||||
|
||||
const char* ActionBoxNewStyle =
|
||||
"QSint--ActionBox {"
|
||||
|
@ -490,17 +490,17 @@ TaskPanelView::TaskPanelView(QWidget *parent)
|
|||
"}"
|
||||
;
|
||||
|
||||
ui->ActionBox4->setStyleSheet(QString::fromAscii(ActionBoxNewStyle));
|
||||
ui->ActionBox4->setStyleSheet(QString::fromLatin1(ActionBoxNewStyle));
|
||||
|
||||
// setup ActionBox 5
|
||||
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||
ui->ActionBox5->setIcon(QPixmap(QString::fromAscii(":/icons/document-save.png")));
|
||||
ui->ActionBox5->header()->setText(QString::fromAscii("TaskGroup with different scheme"));
|
||||
ui->ActionBox5->setIcon(QPixmap(QString::fromLatin1(":/icons/document-save.png")));
|
||||
ui->ActionBox5->header()->setText(QString::fromLatin1("TaskGroup with different scheme"));
|
||||
|
||||
rcCmdMgr.addTo("Std_New", ui->ActionBox5);
|
||||
rcCmdMgr.addTo("Std_Open", ui->ActionBox5);
|
||||
rcCmdMgr.addTo("Std_Save", ui->ActionBox5);
|
||||
ui->ActionBox5->setStyleSheet(QString::fromAscii(ActionBoxNewStyle));
|
||||
ui->ActionBox5->setStyleSheet(QString::fromLatin1(ActionBoxNewStyle));
|
||||
}
|
||||
{
|
||||
Ui_TaskGroup* ui(new Ui_TaskGroup);
|
||||
|
@ -512,22 +512,22 @@ TaskPanelView::TaskPanelView(QWidget *parent)
|
|||
|
||||
// create ActionGroups on ActionPanel
|
||||
QIcon save = QIcon::fromTheme(QString::fromLatin1("document-save"));
|
||||
QSint::ActionGroup *group1 = ui->ActionPanel->createGroup(save.pixmap(24,24), QString::fromAscii("Expandable Group"));
|
||||
QSint::ActionGroup *group1 = ui->ActionPanel->createGroup(save.pixmap(24,24), QString::fromLatin1("Expandable Group"));
|
||||
group1->addAction(ui->actionNew);
|
||||
group1->addAction(ui->actionLoad);
|
||||
group1->addWidget(new QPushButton(QString::fromAscii("Just a button"), this));
|
||||
group1->addWidget(new QPushButton(QString::fromLatin1("Just a button"), this));
|
||||
group1->addAction(ui->actionSave);
|
||||
group1->addAction(ui->actionPrint);
|
||||
group1->addWidget(new QPushButton(QString::fromAscii("Just another button"), this));
|
||||
group1->addWidget(new QPushButton(QString::fromLatin1("Just another button"), this));
|
||||
|
||||
QIcon redo = QIcon::fromTheme(QString::fromLatin1("edit-redo"));
|
||||
QSint::ActionGroup *group2 = ui->ActionPanel->createGroup(redo.pixmap(24,24), QString::fromAscii("Non-Expandable Group"), false);
|
||||
QSint::ActionGroup *group2 = ui->ActionPanel->createGroup(redo.pixmap(24,24), QString::fromLatin1("Non-Expandable Group"), false);
|
||||
group2->addAction(ui->actionNew);
|
||||
group2->addAction(ui->actionLoad);
|
||||
group2->addAction(ui->actionSave);
|
||||
group2->addAction(ui->actionPrint);
|
||||
|
||||
ui->ActionPanel->addWidget(new QLabel(QString::fromAscii("Action Group without header"), this));
|
||||
ui->ActionPanel->addWidget(new QLabel(QString::fromLatin1("Action Group without header"), this));
|
||||
|
||||
QSint::ActionGroup *group3 = ui->ActionPanel->createGroup();
|
||||
group3->addAction(ui->actionNew);
|
||||
|
@ -585,7 +585,7 @@ TaskPanelView::TaskPanelView(QWidget *parent)
|
|||
QGridLayout* gridLayout = new QGridLayout(this);
|
||||
iisTaskPanel *taskPanel = new iisTaskPanel(this);
|
||||
iisTaskBox *tb1 = new iisTaskBox(
|
||||
QPixmap(QString::fromAscii(":/icons/document-save.svg")),QLatin1String("Expandable Group"),true, this);
|
||||
QPixmap(QString::fromLatin1(":/icons/document-save.svg")),QLatin1String("Expandable Group"),true, this);
|
||||
taskPanel->addWidget(tb1);
|
||||
gridLayout->addWidget(taskPanel, 0, 0, 2, 1);
|
||||
|
||||
|
@ -678,7 +678,7 @@ TaskPanelView::~TaskPanelView()
|
|||
|
||||
void TaskPanelView::executeAction()
|
||||
{
|
||||
QMessageBox::about(0, QString::fromAscii("Action clicked"), QString::fromAscii("Do something here :)"));
|
||||
QMessageBox::about(0, QString::fromLatin1("Action clicked"), QString::fromLatin1("Do something here :)"));
|
||||
}
|
||||
|
||||
void TaskPanelView::on_rbDefaultScheme_toggled(bool b)
|
||||
|
|
|
@ -51,7 +51,7 @@ Workbench::Workbench()
|
|||
{
|
||||
// Tree view
|
||||
Gui::DockWindow* tree = new Gui::DockWindow(0, Gui::getMainWindow());
|
||||
tree->setWindowTitle(QString::fromAscii("Tree view"));
|
||||
tree->setWindowTitle(QString::fromLatin1("Tree view"));
|
||||
Gui::TreeView* treeWidget = new Gui::TreeView(tree);
|
||||
treeWidget->setRootIsDecorated(false);
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/TreeView");
|
||||
|
@ -63,7 +63,7 @@ Workbench::Workbench()
|
|||
pLayout->addWidget(treeWidget, 0, 0);
|
||||
|
||||
tree->setObjectName
|
||||
(QString::fromAscii(QT_TRANSLATE_NOOP("QDockWidget","Tree view (MVC)")));
|
||||
(QString::fromLatin1(QT_TRANSLATE_NOOP("QDockWidget","Tree view (MVC)")));
|
||||
tree->setMinimumWidth(210);
|
||||
Gui::DockWindowManager* pDockMgr = Gui::DockWindowManager::instance();
|
||||
pDockMgr->registerDockWindow("Std_TreeViewMVC", tree);
|
||||
|
|
|
@ -83,7 +83,7 @@ bool CImageConvApp::Save(const QString& fn)
|
|||
{
|
||||
if (!fn.isEmpty())
|
||||
{
|
||||
return m_clPixmap.save(fn, ext.toUpper().toAscii());
|
||||
return m_clPixmap.save(fn, ext.toUpper().toLatin1());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ bool CImageConvApp::ConvertToXPM(bool bAppendToFile)
|
|||
cout << "Try converting to XPM..." << endl;
|
||||
if (list.count() == 0)
|
||||
{
|
||||
cout << "Cannot find " << (const char*)m_Dir.nameFilters().join(" ").toAscii() << endl;
|
||||
cout << "Cannot find " << (const char*)m_Dir.nameFilters().join(" ").toLatin1() << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ bool CImageConvApp::ConvertToXPM(bool bAppendToFile)
|
|||
if (m_Output == *it)
|
||||
continue; // if the file is the output file itself
|
||||
|
||||
cout << "Converting " << (const char*)(*it).toAscii() << " ...";
|
||||
cout << "Converting " << (const char*)(*it).toLatin1() << " ...";
|
||||
|
||||
if (Load(*it) == true)
|
||||
{
|
||||
|
@ -250,21 +250,21 @@ bool CImageConvApp::AppendToFile(const QString& file)
|
|||
|
||||
void CImageConvApp::Error()
|
||||
{
|
||||
cerr << "Usage: " << (const char*)m_Executable.toAscii() << " [OPTION(S)] -i input file(s) {-o output file}" << endl;
|
||||
cerr << "Try '" << (const char*)m_Executable.toAscii() << " --help' for more information." << endl;
|
||||
cerr << "Usage: " << (const char*)m_Executable.toLatin1() << " [OPTION(S)] -i input file(s) {-o output file}" << endl;
|
||||
cerr << "Try '" << (const char*)m_Executable.toLatin1() << " --help' for more information." << endl;
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void CImageConvApp::Version()
|
||||
{
|
||||
cerr << (const char*)m_Executable.toAscii() << " 1.0.0 " << endl;
|
||||
cerr << (const char*)m_Executable.toLatin1() << " 1.0.0 " << endl;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void CImageConvApp::Usage()
|
||||
{
|
||||
cerr << "Usage: " << (const char*)m_Executable.toAscii() << " [OPTION(S)] -i input file(s) {-o output file}\n" << endl;
|
||||
cerr << "Usage: " << (const char*)m_Executable.toLatin1() << " [OPTION(S)] -i input file(s) {-o output file}\n" << endl;
|
||||
cerr << "Options:" << endl;
|
||||
|
||||
cerr << " -i \tSpecify the input file(s).\n"
|
||||
|
@ -297,7 +297,7 @@ void CImageConvApp::Usage()
|
|||
|
||||
cerr << "This program supports the following image formats:\n"
|
||||
" BMP, GIF, JPEG, MNG, PNG, PNM, XBM and XPM\n\n"
|
||||
<< (const char*)m_Executable.toAscii() << " uses Qt Version " << qVersion() << "\n"
|
||||
<< (const char*)m_Executable.toLatin1() << " uses Qt Version " << qVersion() << "\n"
|
||||
"Qt can be downloaded at http://www.trolltech.com." << endl;
|
||||
|
||||
exit(0);
|
||||
|
|
|
@ -136,7 +136,7 @@ int main( int argc, char **argv )
|
|||
}
|
||||
catch(const CICException& e)
|
||||
{
|
||||
cerr << (const char*)e.what().toAscii() << endl;
|
||||
cerr << (const char*)e.what().toLatin1() << endl;
|
||||
CImageConvApp::Error();
|
||||
}
|
||||
catch(...)
|
||||
|
|
|
@ -111,13 +111,13 @@ bool QSvgIOHandlerPrivate::load(QIODevice *device)
|
|||
loaded = true;
|
||||
}
|
||||
#else
|
||||
webView.setContent(device->readAll(), QString::fromAscii("image/svg+xml"));
|
||||
QString node = QString::fromAscii("document.rootElement.nodeName");
|
||||
webView.setContent(device->readAll(), QString::fromLatin1("image/svg+xml"));
|
||||
QString node = QString::fromLatin1("document.rootElement.nodeName");
|
||||
QString root = webView.page()->mainFrame()->evaluateJavaScript(node).toString();
|
||||
|
||||
if (!root.isEmpty() && root.compare(QLatin1String("svg"), Qt::CaseInsensitive) == 0) {
|
||||
QString w = QString::fromAscii("document.rootElement.width.baseVal.value");
|
||||
QString h = QString::fromAscii("document.rootElement.height.baseVal.value");
|
||||
QString w = QString::fromLatin1("document.rootElement.width.baseVal.value");
|
||||
QString h = QString::fromLatin1("document.rootElement.height.baseVal.value");
|
||||
double ww = webView.page()->mainFrame()->evaluateJavaScript(w).toDouble();
|
||||
double hh = webView.page()->mainFrame()->evaluateJavaScript(h).toDouble();
|
||||
|
||||
|
|