QString::toAscii() is obsolete in Qt5. Replace it with toLatin1().
This change is Qt4/Qt5 neutral.
This commit is contained in:
parent
e55ba2d24d
commit
d5c074f80d
|
@ -82,7 +82,7 @@ Branding::XmlConfig Branding::getUserDefines() const
|
||||||
if (!root.isNull()) {
|
if (!root.isNull()) {
|
||||||
child = root.firstChildElement();
|
child = root.firstChildElement();
|
||||||
while (!child.isNull()) {
|
while (!child.isNull()) {
|
||||||
std::string name = (const char*)child.localName().toAscii();
|
std::string name = (const char*)child.localName().toLatin1();
|
||||||
std::string value = (const char*)child.text().toUtf8();
|
std::string value = (const char*)child.text().toUtf8();
|
||||||
if (std::find(filter.begin(), filter.end(), name) != filter.end())
|
if (std::find(filter.begin(), filter.end(), name) != filter.end())
|
||||||
cfg[name] = value;
|
cfg[name] = value;
|
||||||
|
|
|
@ -68,7 +68,7 @@ std::string Uuid::createUuid(void)
|
||||||
QString uuid = QUuid::createUuid().toString();
|
QString uuid = QUuid::createUuid().toString();
|
||||||
uuid = uuid.mid(1);
|
uuid = uuid.mid(1);
|
||||||
uuid.chop(1);
|
uuid.chop(1);
|
||||||
Uuid = (const char*)uuid.toAscii();
|
Uuid = (const char*)uuid.toLatin1();
|
||||||
return Uuid;
|
return Uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ void Uuid::setValue(const char* sString)
|
||||||
QString id = uuid.toString();
|
QString id = uuid.toString();
|
||||||
id = id.mid(1);
|
id = id.mid(1);
|
||||||
id.chop(1);
|
id.chop(1);
|
||||||
_uuid = (const char*)id.toAscii();
|
_uuid = (const char*)id.toLatin1();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -719,7 +719,7 @@ void RecentFilesAction::activateFile(int id)
|
||||||
// invokes appendFile()
|
// invokes appendFile()
|
||||||
SelectModule::Dict dict = SelectModule::importHandler(filename);
|
SelectModule::Dict dict = SelectModule::importHandler(filename);
|
||||||
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
||||||
Application::Instance->open(it.key().toUtf8(), it.value().toAscii());
|
Application::Instance->open(it.key().toUtf8(), it.value().toLatin1());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -773,7 +773,7 @@ void RecentFilesAction::save()
|
||||||
QString value = recentFiles[index]->toolTip();
|
QString value = recentFiles[index]->toolTip();
|
||||||
if (value.isEmpty())
|
if (value.isEmpty())
|
||||||
break;
|
break;
|
||||||
hGrp->SetASCII(key.toAscii(), value.toUtf8());
|
hGrp->SetASCII(key.toLatin1(), value.toUtf8());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -336,7 +336,7 @@ Application::Application(bool GUIenabled)
|
||||||
ParameterGrp::handle hPGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp");
|
ParameterGrp::handle hPGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp");
|
||||||
hPGrp = hPGrp->GetGroup("Preferences")->GetGroup("General");
|
hPGrp = hPGrp->GetGroup("Preferences")->GetGroup("General");
|
||||||
QString lang = QLocale::languageToString(QLocale::system().language());
|
QString lang = QLocale::languageToString(QLocale::system().language());
|
||||||
Translator::instance()->activateLanguage(hPGrp->GetASCII("Language", (const char*)lang.toAscii()).c_str());
|
Translator::instance()->activateLanguage(hPGrp->GetASCII("Language", (const char*)lang.toLatin1()).c_str());
|
||||||
GetWidgetFactorySupplier();
|
GetWidgetFactorySupplier();
|
||||||
|
|
||||||
ParameterGrp::handle hUnits = App::GetApplication().GetParameterGroupByPath
|
ParameterGrp::handle hUnits = App::GetApplication().GetParameterGroupByPath
|
||||||
|
@ -1105,7 +1105,7 @@ bool Application::activateWorkbench(const char* name)
|
||||||
pos = rx.indexIn(msg);
|
pos = rx.indexIn(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
Base::Console().Error("%s\n", (const char*)msg.toAscii());
|
Base::Console().Error("%s\n", (const char*)msg.toLatin1());
|
||||||
Base::Console().Log("%s\n", e.getStackTrace().c_str());
|
Base::Console().Log("%s\n", e.getStackTrace().c_str());
|
||||||
if (!d->startingUp) {
|
if (!d->startingUp) {
|
||||||
wc.restoreCursor();
|
wc.restoreCursor();
|
||||||
|
@ -1122,7 +1122,7 @@ QPixmap Application::workbenchIcon(const QString& wb) const
|
||||||
{
|
{
|
||||||
Base::PyGILStateLocker lock;
|
Base::PyGILStateLocker lock;
|
||||||
// get the python workbench object from the dictionary
|
// get the python workbench object from the dictionary
|
||||||
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toAscii());
|
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toLatin1());
|
||||||
// test if the workbench exists
|
// test if the workbench exists
|
||||||
if (pcWorkbench) {
|
if (pcWorkbench) {
|
||||||
// make a unique icon name
|
// make a unique icon name
|
||||||
|
@ -1196,7 +1196,7 @@ QString Application::workbenchToolTip(const QString& wb) const
|
||||||
{
|
{
|
||||||
// get the python workbench object from the dictionary
|
// get the python workbench object from the dictionary
|
||||||
Base::PyGILStateLocker lock;
|
Base::PyGILStateLocker lock;
|
||||||
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toAscii());
|
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toLatin1());
|
||||||
// test if the workbench exists
|
// test if the workbench exists
|
||||||
if (pcWorkbench) {
|
if (pcWorkbench) {
|
||||||
// get its ToolTip member if possible
|
// get its ToolTip member if possible
|
||||||
|
@ -1220,7 +1220,7 @@ QString Application::workbenchMenuText(const QString& wb) const
|
||||||
{
|
{
|
||||||
// get the python workbench object from the dictionary
|
// get the python workbench object from the dictionary
|
||||||
Base::PyGILStateLocker lock;
|
Base::PyGILStateLocker lock;
|
||||||
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toAscii());
|
PyObject* pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, wb.toLatin1());
|
||||||
// test if the workbench exists
|
// test if the workbench exists
|
||||||
if (pcWorkbench) {
|
if (pcWorkbench) {
|
||||||
// get its ToolTip member if possible
|
// get its ToolTip member if possible
|
||||||
|
|
|
@ -182,7 +182,7 @@ QString CallTipsList::extractContext(const QString& line) const
|
||||||
int index = len-1;
|
int index = len-1;
|
||||||
for (int i=0; i<len; i++) {
|
for (int i=0; i<len; i++) {
|
||||||
int pos = len-1-i;
|
int pos = len-1-i;
|
||||||
const char ch = line.at(pos).toAscii();
|
const char ch = line.at(pos).toLatin1();
|
||||||
if ((ch >= 48 && ch <= 57) || // Numbers
|
if ((ch >= 48 && ch <= 57) || // Numbers
|
||||||
(ch >= 65 && ch <= 90) || // Uppercase letters
|
(ch >= 65 && ch <= 90) || // Uppercase letters
|
||||||
(ch >= 97 && ch <= 122) || // Lowercase letters
|
(ch >= 97 && ch <= 122) || // Lowercase letters
|
||||||
|
@ -208,13 +208,13 @@ QMap<QString, CallTip> CallTipsList::extractTips(const QString& context) const
|
||||||
Py::Dict dict = module.getDict();
|
Py::Dict dict = module.getDict();
|
||||||
QString modname = items.front();
|
QString modname = items.front();
|
||||||
items.pop_front();
|
items.pop_front();
|
||||||
if (!dict.hasKey(std::string(modname.toAscii())))
|
if (!dict.hasKey(std::string(modname.toLatin1())))
|
||||||
return tips; // unknown object
|
return tips; // unknown object
|
||||||
|
|
||||||
// get the Python object we need
|
// get the Python object we need
|
||||||
Py::Object obj = dict.getItem(std::string(modname.toAscii()));
|
Py::Object obj = dict.getItem(std::string(modname.toLatin1()));
|
||||||
while (!items.isEmpty()) {
|
while (!items.isEmpty()) {
|
||||||
QByteArray name = items.front().toAscii();
|
QByteArray name = items.front().toLatin1();
|
||||||
std::string attr = name.constData();
|
std::string attr = name.constData();
|
||||||
items.pop_front();
|
items.pop_front();
|
||||||
if (obj.hasAttr(attr))
|
if (obj.hasAttr(attr))
|
||||||
|
|
|
@ -623,7 +623,7 @@ const char* Command::keySequenceToAccel(int sk) const
|
||||||
QKeySequence::StandardKey type = (QKeySequence::StandardKey)sk;
|
QKeySequence::StandardKey type = (QKeySequence::StandardKey)sk;
|
||||||
QKeySequence ks(type);
|
QKeySequence ks(type);
|
||||||
QString qs = ks.toString();
|
QString qs = ks.toString();
|
||||||
QByteArray data = qs.toAscii();
|
QByteArray data = qs.toLatin1();
|
||||||
#if defined (_MSC_VER)
|
#if defined (_MSC_VER)
|
||||||
return _strdup((const char*)data);
|
return _strdup((const char*)data);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -145,7 +145,7 @@ void StdCmdOpen::activated(int iMsg)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
||||||
getGuiApplication()->open(it.key().toUtf8(), it.value().toAscii());
|
getGuiApplication()->open(it.key().toUtf8(), it.value().toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,7 @@ void StdCmdImport::activated(int iMsg)
|
||||||
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
||||||
getGuiApplication()->importFrom(it.key().toUtf8(),
|
getGuiApplication()->importFrom(it.key().toUtf8(),
|
||||||
getActiveGuiDocument()->getDocument()->getName(),
|
getActiveGuiDocument()->getDocument()->getName(),
|
||||||
it.value().toAscii());
|
it.value().toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (emptyDoc) {
|
if (emptyDoc) {
|
||||||
|
@ -288,7 +288,7 @@ void StdCmdExport::activated(int iMsg)
|
||||||
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
||||||
getGuiApplication()->exportTo(it.key().toUtf8(),
|
getGuiApplication()->exportTo(it.key().toUtf8(),
|
||||||
getActiveGuiDocument()->getDocument()->getName(),
|
getActiveGuiDocument()->getDocument()->getName(),
|
||||||
it.value().toAscii());
|
it.value().toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ void StdCmdWorkbench::activated(int i)
|
||||||
try {
|
try {
|
||||||
Workbench* w = WorkbenchManager::instance()->active();
|
Workbench* w = WorkbenchManager::instance()->active();
|
||||||
QList<QAction*> items = static_cast<WorkbenchGroup*>(_pcAction)->actions();
|
QList<QAction*> items = static_cast<WorkbenchGroup*>(_pcAction)->actions();
|
||||||
std::string switch_to = (const char*)items[i]->objectName().toAscii();
|
std::string switch_to = (const char*)items[i]->objectName().toLatin1();
|
||||||
if (w) {
|
if (w) {
|
||||||
std::string current_w = w->name();
|
std::string current_w = w->name();
|
||||||
if (switch_to == current_w)
|
if (switch_to == current_w)
|
||||||
|
|
|
@ -287,7 +287,7 @@ void StdCmdFreezeViews::activated(int iMsg)
|
||||||
QList<QAction*> acts = pcAction->actions();
|
QList<QAction*> acts = pcAction->actions();
|
||||||
QString data = acts[iMsg]->toolTip();
|
QString data = acts[iMsg]->toolTip();
|
||||||
QString send = QString::fromAscii("SetCamera %1").arg(data);
|
QString send = QString::fromAscii("SetCamera %1").arg(data);
|
||||||
getGuiApplication()->sendMsgToActiveView(send.toAscii());
|
getGuiApplication()->sendMsgToActiveView(send.toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ void StdCmdFreezeViews::onSaveViews()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
str << " <Camera settings=\"" << viewPos.toAscii().constData() << "\"/>" << endl;
|
str << " <Camera settings=\"" << viewPos.toLatin1().constData() << "\"/>" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
str << " </Views>" << endl;
|
str << " </Views>" << endl;
|
||||||
|
@ -364,7 +364,7 @@ void StdCmdFreezeViews::onRestoreViews()
|
||||||
if (!xmlDocument.setContent(&file, true, &errorStr, &errorLine, &errorColumn)) {
|
if (!xmlDocument.setContent(&file, true, &errorStr, &errorLine, &errorColumn)) {
|
||||||
std::cerr << "Parse error in XML content at line " << errorLine
|
std::cerr << "Parse error in XML content at line " << errorLine
|
||||||
<< ", column " << errorColumn << ": "
|
<< ", column " << errorColumn << ": "
|
||||||
<< (const char*)errorStr.toAscii() << std::endl;
|
<< (const char*)errorStr.toLatin1() << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1520,7 +1520,7 @@ void StdViewScreenShot::activated(int iMsg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hExt->SetASCII("OffscreenImageFormat", (const char*)format.toAscii());
|
hExt->SetASCII("OffscreenImageFormat", (const char*)format.toLatin1());
|
||||||
|
|
||||||
// which background chosen
|
// which background chosen
|
||||||
const char* background;
|
const char* background;
|
||||||
|
|
|
@ -226,7 +226,7 @@ void DlgCustomActionsImp::on_buttonAddAction_clicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
// search for the command in the manager
|
// search for the command in the manager
|
||||||
QByteArray actionName = newActionName().toAscii();
|
QByteArray actionName = newActionName().toLatin1();
|
||||||
CommandManager& rclMan = Application::Instance->commandManager();
|
CommandManager& rclMan = Application::Instance->commandManager();
|
||||||
MacroCommand* macro = new MacroCommand(actionName);
|
MacroCommand* macro = new MacroCommand(actionName);
|
||||||
rclMan.addCommand( macro );
|
rclMan.addCommand( macro );
|
||||||
|
@ -260,12 +260,12 @@ void DlgCustomActionsImp::on_buttonAddAction_clicked()
|
||||||
actionStatus->clear();
|
actionStatus->clear();
|
||||||
|
|
||||||
if (!m_sPixmap.isEmpty())
|
if (!m_sPixmap.isEmpty())
|
||||||
macro->setPixmap(m_sPixmap.toAscii());
|
macro->setPixmap(m_sPixmap.toLatin1());
|
||||||
pixmapLabel->clear();
|
pixmapLabel->clear();
|
||||||
m_sPixmap = QString::null;
|
m_sPixmap = QString::null;
|
||||||
|
|
||||||
if (!actionAccel->text().isEmpty()) {
|
if (!actionAccel->text().isEmpty()) {
|
||||||
macro->setAccel(actionAccel->text().toAscii());
|
macro->setAccel(actionAccel->text().toLatin1());
|
||||||
}
|
}
|
||||||
actionAccel->clear();
|
actionAccel->clear();
|
||||||
|
|
||||||
|
@ -315,12 +315,12 @@ void DlgCustomActionsImp::on_buttonReplaceAction_clicked()
|
||||||
actionStatus->clear();
|
actionStatus->clear();
|
||||||
|
|
||||||
if (!m_sPixmap.isEmpty())
|
if (!m_sPixmap.isEmpty())
|
||||||
macro->setPixmap(m_sPixmap.toAscii());
|
macro->setPixmap(m_sPixmap.toLatin1());
|
||||||
pixmapLabel->clear();
|
pixmapLabel->clear();
|
||||||
m_sPixmap = QString::null;
|
m_sPixmap = QString::null;
|
||||||
|
|
||||||
if (!actionAccel->text().isEmpty()) {
|
if (!actionAccel->text().isEmpty()) {
|
||||||
macro->setAccel(actionAccel->text().toAscii());
|
macro->setAccel(actionAccel->text().toLatin1());
|
||||||
}
|
}
|
||||||
actionAccel->clear();
|
actionAccel->clear();
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ void DlgCustomCommandsImp::onGroupActivated(QTreeWidgetItem* item)
|
||||||
commandTreeWidget->clear();
|
commandTreeWidget->clear();
|
||||||
|
|
||||||
CommandManager & cCmdMgr = Application::Instance->commandManager();
|
CommandManager & cCmdMgr = Application::Instance->commandManager();
|
||||||
std::vector<Command*> aCmds = cCmdMgr.getGroupCommands(group.toAscii());
|
std::vector<Command*> aCmds = cCmdMgr.getGroupCommands(group.toLatin1());
|
||||||
if (group == QLatin1String("Macros")) {
|
if (group == QLatin1String("Macros")) {
|
||||||
for (std::vector<Command*>::iterator it = aCmds.begin(); it != aCmds.end(); ++it) {
|
for (std::vector<Command*>::iterator it = aCmds.begin(); it != aCmds.end(); ++it) {
|
||||||
QTreeWidgetItem* item = new QTreeWidgetItem(commandTreeWidget);
|
QTreeWidgetItem* item = new QTreeWidgetItem(commandTreeWidget);
|
||||||
|
|
|
@ -116,7 +116,7 @@ void ButtonModel::insertButtonRows(int number)
|
||||||
{
|
{
|
||||||
QString groupName;
|
QString groupName;
|
||||||
groupName.setNum(index);
|
groupName.setNum(index);
|
||||||
Base::Reference<ParameterGrp> newGroup = spaceballButtonGroup()->GetGroup(groupName.toAscii());//builds the group.
|
Base::Reference<ParameterGrp> newGroup = spaceballButtonGroup()->GetGroup(groupName.toLatin1());//builds the group.
|
||||||
newGroup->SetASCII("Command", "");
|
newGroup->SetASCII("Command", "");
|
||||||
}
|
}
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
@ -126,14 +126,14 @@ void ButtonModel::insertButtonRows(int number)
|
||||||
void ButtonModel::setCommand(int row, QString command)
|
void ButtonModel::setCommand(int row, QString command)
|
||||||
{
|
{
|
||||||
GroupVector groupVector = spaceballButtonGroup()->GetGroups();
|
GroupVector groupVector = spaceballButtonGroup()->GetGroups();
|
||||||
groupVector.at(row)->SetASCII("Command", command.toAscii());
|
groupVector.at(row)->SetASCII("Command", command.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ButtonModel::goButtonPress(int number)
|
void ButtonModel::goButtonPress(int number)
|
||||||
{
|
{
|
||||||
QString numberString;
|
QString numberString;
|
||||||
numberString.setNum(number);
|
numberString.setNum(number);
|
||||||
if (!spaceballButtonGroup()->HasGroup(numberString.toAscii()))
|
if (!spaceballButtonGroup()->HasGroup(numberString.toLatin1()))
|
||||||
insertButtonRows(number);
|
insertButtonRows(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,7 +439,7 @@ void CommandModel::groupCommands(const QString& groupName)
|
||||||
CommandNode *parentNode = new CommandNode(CommandNode::GroupType);
|
CommandNode *parentNode = new CommandNode(CommandNode::GroupType);
|
||||||
parentNode->parent = rootNode;
|
parentNode->parent = rootNode;
|
||||||
rootNode->children.push_back(parentNode);
|
rootNode->children.push_back(parentNode);
|
||||||
std::vector <Command*> commands = Application::Instance->commandManager().getGroupCommands(groupName.toAscii());
|
std::vector <Command*> commands = Application::Instance->commandManager().getGroupCommands(groupName.toLatin1());
|
||||||
for (std::vector <Command*>::iterator it = commands.begin(); it != commands.end(); ++it)
|
for (std::vector <Command*>::iterator it = commands.begin(); it != commands.end(); ++it)
|
||||||
{
|
{
|
||||||
CommandNode *childNode = new CommandNode(CommandNode::CommandType);
|
CommandNode *childNode = new CommandNode(CommandNode::CommandType);
|
||||||
|
|
|
@ -274,14 +274,14 @@ void DlgDisplayPropertiesImp::on_changeMode_activated(const QString& s)
|
||||||
App::Property* prop = (*It)->getPropertyByName("DisplayMode");
|
App::Property* prop = (*It)->getPropertyByName("DisplayMode");
|
||||||
if (prop && prop->getTypeId() == App::PropertyEnumeration::getClassTypeId()) {
|
if (prop && prop->getTypeId() == App::PropertyEnumeration::getClassTypeId()) {
|
||||||
App::PropertyEnumeration* Display = (App::PropertyEnumeration*)prop;
|
App::PropertyEnumeration* Display = (App::PropertyEnumeration*)prop;
|
||||||
Display->setValue((const char*)s.toAscii());
|
Display->setValue((const char*)s.toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DlgDisplayPropertiesImp::on_changePlot_activated(const QString&s)
|
void DlgDisplayPropertiesImp::on_changePlot_activated(const QString&s)
|
||||||
{
|
{
|
||||||
Base::Console().Log("Plot = %s\n",(const char*)s.toAscii());
|
Base::Console().Log("Plot = %s\n",(const char*)s.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -125,7 +125,7 @@ DlgSettingsEditorImp::DlgSettingsEditorImp( QWidget* parent )
|
||||||
this->displayItems->header()->hide();
|
this->displayItems->header()->hide();
|
||||||
for (QVector<QPair<QString, unsigned long> >::ConstIterator it = d->colormap.begin(); it != d->colormap.end(); ++it) {
|
for (QVector<QPair<QString, unsigned long> >::ConstIterator it = d->colormap.begin(); it != d->colormap.end(); ++it) {
|
||||||
QTreeWidgetItem* item = new QTreeWidgetItem(this->displayItems);
|
QTreeWidgetItem* item = new QTreeWidgetItem(this->displayItems);
|
||||||
item->setText(0, tr((*it).first.toAscii()));
|
item->setText(0, tr((*it).first.toLatin1()));
|
||||||
}
|
}
|
||||||
pythonSyntax = new PythonSyntaxHighlighter(textEdit1);
|
pythonSyntax = new PythonSyntaxHighlighter(textEdit1);
|
||||||
pythonSyntax->setDocument(textEdit1->document());
|
pythonSyntax->setDocument(textEdit1->document());
|
||||||
|
@ -173,10 +173,10 @@ void DlgSettingsEditorImp::saveSettings()
|
||||||
// Saves the color map
|
// Saves the color map
|
||||||
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("Editor");
|
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("Editor");
|
||||||
for (QVector<QPair<QString, unsigned long> >::ConstIterator it = d->colormap.begin(); it != d->colormap.end(); ++it)
|
for (QVector<QPair<QString, unsigned long> >::ConstIterator it = d->colormap.begin(); it != d->colormap.end(); ++it)
|
||||||
hGrp->SetUnsigned((*it).first.toAscii(), (*it).second);
|
hGrp->SetUnsigned((*it).first.toLatin1(), (*it).second);
|
||||||
|
|
||||||
hGrp->SetInt( "FontSize", fontSize->value() );
|
hGrp->SetInt( "FontSize", fontSize->value() );
|
||||||
hGrp->SetASCII( "Font", fontFamily->currentText().toAscii() );
|
hGrp->SetASCII( "Font", fontFamily->currentText().toLatin1() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void DlgSettingsEditorImp::loadSettings()
|
void DlgSettingsEditorImp::loadSettings()
|
||||||
|
@ -203,7 +203,7 @@ void DlgSettingsEditorImp::loadSettings()
|
||||||
// Restores the color map
|
// Restores the color map
|
||||||
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("Editor");
|
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("Editor");
|
||||||
for (QVector<QPair<QString, unsigned long> >::Iterator it = d->colormap.begin(); it != d->colormap.end(); ++it){
|
for (QVector<QPair<QString, unsigned long> >::Iterator it = d->colormap.begin(); it != d->colormap.end(); ++it){
|
||||||
unsigned long col = hGrp->GetUnsigned((*it).first.toAscii(), (*it).second);
|
unsigned long col = hGrp->GetUnsigned((*it).first.toLatin1(), (*it).second);
|
||||||
(*it).second = col;
|
(*it).second = col;
|
||||||
QColor color;
|
QColor color;
|
||||||
color.setRgb((col >> 24) & 0xff, (col >> 16) & 0xff, (col >> 8) & 0xff);
|
color.setRgb((col >> 24) & 0xff, (col >> 16) & 0xff, (col >> 8) & 0xff);
|
||||||
|
@ -234,7 +234,7 @@ void DlgSettingsEditorImp::changeEvent(QEvent *e)
|
||||||
if (e->type() == QEvent::LanguageChange) {
|
if (e->type() == QEvent::LanguageChange) {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (QVector<QPair<QString, unsigned long> >::ConstIterator it = d->colormap.begin(); it != d->colormap.end(); ++it)
|
for (QVector<QPair<QString, unsigned long> >::ConstIterator it = d->colormap.begin(); it != d->colormap.end(); ++it)
|
||||||
this->displayItems->topLevelItem(index++)->setText(0, tr((*it).first.toAscii()));
|
this->displayItems->topLevelItem(index++)->setText(0, tr((*it).first.toLatin1()));
|
||||||
this->retranslateUi(this);
|
this->retranslateUi(this);
|
||||||
} else {
|
} else {
|
||||||
QWidget::changeEvent(e);
|
QWidget::changeEvent(e);
|
||||||
|
|
|
@ -121,7 +121,7 @@ void DlgGeneralImp::saveSettings()
|
||||||
QVariant data = AutoloadModuleCombo->itemData(index);
|
QVariant data = AutoloadModuleCombo->itemData(index);
|
||||||
QString startWbName = data.toString();
|
QString startWbName = data.toString();
|
||||||
App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/General")->
|
App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/General")->
|
||||||
SetASCII("AutoloadModule", startWbName.toAscii());
|
SetASCII("AutoloadModule", startWbName.toLatin1());
|
||||||
|
|
||||||
AutoloadTabCombo->onSave();
|
AutoloadTabCombo->onSave();
|
||||||
RecentFiles->onSave();
|
RecentFiles->onSave();
|
||||||
|
@ -133,7 +133,7 @@ void DlgGeneralImp::saveSettings()
|
||||||
setRecentFileSize();
|
setRecentFileSize();
|
||||||
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("General");
|
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("General");
|
||||||
QString lang = QLocale::languageToString(QLocale::system().language());
|
QString lang = QLocale::languageToString(QLocale::system().language());
|
||||||
QByteArray language = hGrp->GetASCII("Language", (const char*)lang.toAscii()).c_str();
|
QByteArray language = hGrp->GetASCII("Language", (const char*)lang.toLatin1()).c_str();
|
||||||
QByteArray current = Languages->itemData(Languages->currentIndex()).toByteArray();
|
QByteArray current = Languages->itemData(Languages->currentIndex()).toByteArray();
|
||||||
if (current != language)
|
if (current != language)
|
||||||
{
|
{
|
||||||
|
@ -216,7 +216,7 @@ void DlgGeneralImp::loadSettings()
|
||||||
// search for the language files
|
// search for the language files
|
||||||
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("General");
|
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("General");
|
||||||
QString lang = QLocale::languageToString(QLocale::system().language());
|
QString lang = QLocale::languageToString(QLocale::system().language());
|
||||||
QByteArray language = hGrp->GetASCII("Language", (const char*)lang.toAscii()).c_str();
|
QByteArray language = hGrp->GetASCII("Language", (const char*)lang.toLatin1()).c_str();
|
||||||
int index = 1;
|
int index = 1;
|
||||||
Languages->addItem(QString::fromAscii("English"), QByteArray("English"));
|
Languages->addItem(QString::fromAscii("English"), QByteArray("English"));
|
||||||
TStringMap list = Translator::instance()->supportedLocales();
|
TStringMap list = Translator::instance()->supportedLocales();
|
||||||
|
|
|
@ -177,7 +177,7 @@ void DlgCustomKeyboardImp::on_categoryBox_activated(int index)
|
||||||
editShortcut->clear();
|
editShortcut->clear();
|
||||||
|
|
||||||
CommandManager & cCmdMgr = Application::Instance->commandManager();
|
CommandManager & cCmdMgr = Application::Instance->commandManager();
|
||||||
std::vector<Command*> aCmds = cCmdMgr.getGroupCommands( group.toAscii() );
|
std::vector<Command*> aCmds = cCmdMgr.getGroupCommands( group.toLatin1() );
|
||||||
|
|
||||||
if (group == QLatin1String("Macros")) {
|
if (group == QLatin1String("Macros")) {
|
||||||
for (std::vector<Command*>::iterator it = aCmds.begin(); it != aCmds.end(); ++it) {
|
for (std::vector<Command*>::iterator it = aCmds.begin(); it != aCmds.end(); ++it) {
|
||||||
|
|
|
@ -313,7 +313,7 @@ bool validateInput(QWidget* parent, const QString& input)
|
||||||
if (input.isEmpty())
|
if (input.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
for (int i=0; i<input.size(); i++) {
|
for (int i=0; i<input.size(); i++) {
|
||||||
const char c = input.at(i).toAscii();
|
const char c = input.at(i).toLatin1();
|
||||||
if ((c < '0' || c > '9') && // Numbers
|
if ((c < '0' || c > '9') && // Numbers
|
||||||
(c < 'A' || c > 'Z') && // Uppercase letters
|
(c < 'A' || c > 'Z') && // Uppercase letters
|
||||||
(c < 'a' || c > 'z') && // Lowercase letters
|
(c < 'a' || c > 'z') && // Lowercase letters
|
||||||
|
@ -393,7 +393,7 @@ void ParameterGroup::onDeleteSelectedItem()
|
||||||
int index = parent->indexOfChild(sel);
|
int index = parent->indexOfChild(sel);
|
||||||
parent->takeChild(index);
|
parent->takeChild(index);
|
||||||
ParameterGroupItem* para = static_cast<ParameterGroupItem*>(parent);
|
ParameterGroupItem* para = static_cast<ParameterGroupItem*>(parent);
|
||||||
para->_hcGrp->RemoveGrp(sel->text(0).toAscii());
|
para->_hcGrp->RemoveGrp(sel->text(0).toLatin1());
|
||||||
delete sel;
|
delete sel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -425,14 +425,14 @@ void ParameterGroup::onCreateSubgroup()
|
||||||
ParameterGroupItem* para = static_cast<ParameterGroupItem*>(item);
|
ParameterGroupItem* para = static_cast<ParameterGroupItem*>(item);
|
||||||
Base::Reference<ParameterGrp> hGrp = para->_hcGrp;
|
Base::Reference<ParameterGrp> hGrp = para->_hcGrp;
|
||||||
|
|
||||||
if ( hGrp->HasGroup( name.toAscii() ) )
|
if ( hGrp->HasGroup( name.toLatin1() ) )
|
||||||
{
|
{
|
||||||
QMessageBox::critical( this, tr("Existing sub-group"),
|
QMessageBox::critical( this, tr("Existing sub-group"),
|
||||||
tr("The sub-group '%1' already exists.").arg( name ) );
|
tr("The sub-group '%1' already exists.").arg( name ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hGrp = hGrp->GetGroup( name.toAscii() );
|
hGrp = hGrp->GetGroup( name.toLatin1() );
|
||||||
(void)new ParameterGroupItem(para,hGrp);
|
(void)new ParameterGroupItem(para,hGrp);
|
||||||
expandItem(para);
|
expandItem(para);
|
||||||
}
|
}
|
||||||
|
@ -822,7 +822,7 @@ void ParameterGroupItem::setData ( int column, int role, const QVariant & value
|
||||||
QObject::tr("The group '%1' cannot be renamed.").arg( oldName ) );
|
QObject::tr("The group '%1' cannot be renamed.").arg( oldName ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( item->_hcGrp->HasGroup( newName.toAscii() ) )
|
if ( item->_hcGrp->HasGroup( newName.toLatin1() ) )
|
||||||
{
|
{
|
||||||
QMessageBox::critical( treeWidget(), QObject::tr("Existing group"),
|
QMessageBox::critical( treeWidget(), QObject::tr("Existing group"),
|
||||||
QObject::tr("The group '%1' already exists.").arg( newName ) );
|
QObject::tr("The group '%1' already exists.").arg( newName ) );
|
||||||
|
@ -831,10 +831,10 @@ void ParameterGroupItem::setData ( int column, int role, const QVariant & value
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// rename the group by adding a new group, copy the content and remove the old group
|
// rename the group by adding a new group, copy the content and remove the old group
|
||||||
Base::Reference<ParameterGrp> hOldGrp = item->_hcGrp->GetGroup( oldName.toAscii() );
|
Base::Reference<ParameterGrp> hOldGrp = item->_hcGrp->GetGroup( oldName.toLatin1() );
|
||||||
Base::Reference<ParameterGrp> hNewGrp = item->_hcGrp->GetGroup( newName.toAscii() );
|
Base::Reference<ParameterGrp> hNewGrp = item->_hcGrp->GetGroup( newName.toLatin1() );
|
||||||
hOldGrp->copyTo( hNewGrp );
|
hOldGrp->copyTo( hNewGrp );
|
||||||
item->_hcGrp->RemoveGrp( oldName.toAscii() );
|
item->_hcGrp->RemoveGrp( oldName.toLatin1() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -907,25 +907,25 @@ void ParameterText::changeValue()
|
||||||
if ( ok )
|
if ( ok )
|
||||||
{
|
{
|
||||||
setText( 2, txt );
|
setText( 2, txt );
|
||||||
_hcGrp->SetASCII(text(0).toAscii(), txt.toUtf8());
|
_hcGrp->SetASCII(text(0).toLatin1(), txt.toUtf8());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterText::removeFromGroup ()
|
void ParameterText::removeFromGroup ()
|
||||||
{
|
{
|
||||||
_hcGrp->RemoveASCII(text(0).toAscii());
|
_hcGrp->RemoveASCII(text(0).toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterText::replace( const QString& oldName, const QString& newName )
|
void ParameterText::replace( const QString& oldName, const QString& newName )
|
||||||
{
|
{
|
||||||
std::string val = _hcGrp->GetASCII(oldName.toAscii());
|
std::string val = _hcGrp->GetASCII(oldName.toLatin1());
|
||||||
_hcGrp->RemoveASCII(oldName.toAscii());
|
_hcGrp->RemoveASCII(oldName.toLatin1());
|
||||||
_hcGrp->SetASCII(newName.toAscii(), val.c_str());
|
_hcGrp->SetASCII(newName.toLatin1(), val.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterText::appendToGroup()
|
void ParameterText::appendToGroup()
|
||||||
{
|
{
|
||||||
_hcGrp->SetASCII(text(0).toAscii(), text(2).toUtf8());
|
_hcGrp->SetASCII(text(0).toLatin1(), text(2).toUtf8());
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
@ -951,25 +951,25 @@ void ParameterInt::changeValue()
|
||||||
if ( ok )
|
if ( ok )
|
||||||
{
|
{
|
||||||
setText(2, QString::fromAscii("%1").arg(num));
|
setText(2, QString::fromAscii("%1").arg(num));
|
||||||
_hcGrp->SetInt(text(0).toAscii(), (long)num);
|
_hcGrp->SetInt(text(0).toLatin1(), (long)num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterInt::removeFromGroup ()
|
void ParameterInt::removeFromGroup ()
|
||||||
{
|
{
|
||||||
_hcGrp->RemoveInt(text(0).toAscii());
|
_hcGrp->RemoveInt(text(0).toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterInt::replace( const QString& oldName, const QString& newName )
|
void ParameterInt::replace( const QString& oldName, const QString& newName )
|
||||||
{
|
{
|
||||||
long val = _hcGrp->GetInt(oldName.toAscii());
|
long val = _hcGrp->GetInt(oldName.toLatin1());
|
||||||
_hcGrp->RemoveInt(oldName.toAscii());
|
_hcGrp->RemoveInt(oldName.toLatin1());
|
||||||
_hcGrp->SetInt(newName.toAscii(), val);
|
_hcGrp->SetInt(newName.toLatin1(), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterInt::appendToGroup()
|
void ParameterInt::appendToGroup()
|
||||||
{
|
{
|
||||||
_hcGrp->SetInt(text(0).toAscii(), text(2).toLong());
|
_hcGrp->SetInt(text(0).toLatin1(), text(2).toLong());
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
@ -1003,26 +1003,26 @@ void ParameterUInt::changeValue()
|
||||||
if ( ok )
|
if ( ok )
|
||||||
{
|
{
|
||||||
setText(2, QString::fromAscii("%1").arg(num));
|
setText(2, QString::fromAscii("%1").arg(num));
|
||||||
_hcGrp->SetUnsigned(text(0).toAscii(), (unsigned long)num);
|
_hcGrp->SetUnsigned(text(0).toLatin1(), (unsigned long)num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterUInt::removeFromGroup ()
|
void ParameterUInt::removeFromGroup ()
|
||||||
{
|
{
|
||||||
_hcGrp->RemoveUnsigned(text(0).toAscii());
|
_hcGrp->RemoveUnsigned(text(0).toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterUInt::replace( const QString& oldName, const QString& newName )
|
void ParameterUInt::replace( const QString& oldName, const QString& newName )
|
||||||
{
|
{
|
||||||
unsigned long val = _hcGrp->GetUnsigned(oldName.toAscii());
|
unsigned long val = _hcGrp->GetUnsigned(oldName.toLatin1());
|
||||||
_hcGrp->RemoveUnsigned(oldName.toAscii());
|
_hcGrp->RemoveUnsigned(oldName.toLatin1());
|
||||||
_hcGrp->SetUnsigned(newName.toAscii(), val);
|
_hcGrp->SetUnsigned(newName.toLatin1(), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterUInt::appendToGroup()
|
void ParameterUInt::appendToGroup()
|
||||||
{
|
{
|
||||||
_hcGrp->SetUnsigned(text(0).toAscii(), text(2).toULong());
|
_hcGrp->SetUnsigned(text(0).toLatin1(), text(2).toULong());
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
@ -1048,25 +1048,25 @@ void ParameterFloat::changeValue()
|
||||||
if ( ok )
|
if ( ok )
|
||||||
{
|
{
|
||||||
setText(2, QString::fromAscii("%1").arg(num));
|
setText(2, QString::fromAscii("%1").arg(num));
|
||||||
_hcGrp->SetFloat(text(0).toAscii(), num);
|
_hcGrp->SetFloat(text(0).toLatin1(), num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterFloat::removeFromGroup ()
|
void ParameterFloat::removeFromGroup ()
|
||||||
{
|
{
|
||||||
_hcGrp->RemoveFloat(text(0).toAscii());
|
_hcGrp->RemoveFloat(text(0).toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterFloat::replace( const QString& oldName, const QString& newName )
|
void ParameterFloat::replace( const QString& oldName, const QString& newName )
|
||||||
{
|
{
|
||||||
double val = _hcGrp->GetFloat(oldName.toAscii());
|
double val = _hcGrp->GetFloat(oldName.toLatin1());
|
||||||
_hcGrp->RemoveFloat(oldName.toAscii());
|
_hcGrp->RemoveFloat(oldName.toLatin1());
|
||||||
_hcGrp->SetFloat(newName.toAscii(), val);
|
_hcGrp->SetFloat(newName.toLatin1(), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterFloat::appendToGroup()
|
void ParameterFloat::appendToGroup()
|
||||||
{
|
{
|
||||||
_hcGrp->SetFloat(text(0).toAscii(), text(2).toDouble());
|
_hcGrp->SetFloat(text(0).toLatin1(), text(2).toDouble());
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
@ -1096,26 +1096,26 @@ void ParameterBool::changeValue()
|
||||||
if ( ok )
|
if ( ok )
|
||||||
{
|
{
|
||||||
setText( 2, txt );
|
setText( 2, txt );
|
||||||
_hcGrp->SetBool(text(0).toAscii(), (txt == list[0] ? true : false) );
|
_hcGrp->SetBool(text(0).toLatin1(), (txt == list[0] ? true : false) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterBool::removeFromGroup ()
|
void ParameterBool::removeFromGroup ()
|
||||||
{
|
{
|
||||||
_hcGrp->RemoveBool(text(0).toAscii());
|
_hcGrp->RemoveBool(text(0).toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterBool::replace( const QString& oldName, const QString& newName )
|
void ParameterBool::replace( const QString& oldName, const QString& newName )
|
||||||
{
|
{
|
||||||
bool val = _hcGrp->GetBool(oldName.toAscii());
|
bool val = _hcGrp->GetBool(oldName.toLatin1());
|
||||||
_hcGrp->RemoveBool(oldName.toAscii());
|
_hcGrp->RemoveBool(oldName.toLatin1());
|
||||||
_hcGrp->SetBool(newName.toAscii(), val);
|
_hcGrp->SetBool(newName.toLatin1(), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParameterBool::appendToGroup()
|
void ParameterBool::appendToGroup()
|
||||||
{
|
{
|
||||||
bool val = (text(2) == QLatin1String("true") ? true : false);
|
bool val = (text(2) == QLatin1String("true") ? true : false);
|
||||||
_hcGrp->SetBool(text(0).toAscii(), val);
|
_hcGrp->SetBool(text(0).toLatin1(), val);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_DlgParameterImp.cpp"
|
#include "moc_DlgParameterImp.cpp"
|
||||||
|
|
|
@ -104,7 +104,7 @@ void DlgTipOfTheDayImp::onResponseHeaderReceived(const QHttpResponseHeader & res
|
||||||
{
|
{
|
||||||
if (responseHeader.statusCode() != 200) {
|
if (responseHeader.statusCode() != 200) {
|
||||||
QString msg = tr("Download failed: %1\n").arg(responseHeader.reasonPhrase());
|
QString msg = tr("Download failed: %1\n").arg(responseHeader.reasonPhrase());
|
||||||
Base::Console().Log(msg.toAscii());
|
Base::Console().Log(msg.toLatin1());
|
||||||
_http->abort();
|
_http->abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ void DlgTipOfTheDayImp::onStateChanged (int state)
|
||||||
break;
|
break;
|
||||||
case QHttp::Closing:
|
case QHttp::Closing:
|
||||||
case QHttp::Unconnected:
|
case QHttp::Unconnected:
|
||||||
Base::Console().Log("%s\n",(const char*)_http->errorString().toAscii());
|
Base::Console().Log("%s\n",(const char*)_http->errorString().toLatin1());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -185,7 +185,7 @@ void DlgCustomToolbars::hideEvent(QHideEvent * event)
|
||||||
{
|
{
|
||||||
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
||||||
QString workbench = data.toString();
|
QString workbench = data.toString();
|
||||||
exportCustomToolbars(workbench.toAscii());
|
exportCustomToolbars(workbench.toLatin1());
|
||||||
|
|
||||||
CustomizeActionPage::hideEvent(event);
|
CustomizeActionPage::hideEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,7 @@ void DlgCustomToolbars::on_categoryBox_activated(int index)
|
||||||
commandTreeWidget->clear();
|
commandTreeWidget->clear();
|
||||||
|
|
||||||
CommandManager & cCmdMgr = Application::Instance->commandManager();
|
CommandManager & cCmdMgr = Application::Instance->commandManager();
|
||||||
std::vector<Command*> aCmds = cCmdMgr.getGroupCommands(group.toAscii());
|
std::vector<Command*> aCmds = cCmdMgr.getGroupCommands(group.toLatin1());
|
||||||
|
|
||||||
// Create a separator item
|
// Create a separator item
|
||||||
QTreeWidgetItem* sepitem = new QTreeWidgetItem(commandTreeWidget);
|
QTreeWidgetItem* sepitem = new QTreeWidgetItem(commandTreeWidget);
|
||||||
|
@ -235,7 +235,7 @@ void DlgCustomToolbars::on_workbenchBox_activated(int index)
|
||||||
QString workbench = data.toString();
|
QString workbench = data.toString();
|
||||||
toolbarTreeWidget->clear();
|
toolbarTreeWidget->clear();
|
||||||
|
|
||||||
QByteArray workbenchname = workbench.toAscii();
|
QByteArray workbenchname = workbench.toLatin1();
|
||||||
importCustomToolbars(workbenchname);
|
importCustomToolbars(workbenchname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ void DlgCustomToolbars::exportCustomToolbars(const QByteArray& workbench)
|
||||||
QTreeWidgetItem* toplevel = toolbarTreeWidget->topLevelItem(i);
|
QTreeWidgetItem* toplevel = toolbarTreeWidget->topLevelItem(i);
|
||||||
QString groupName = QString::fromAscii("Custom_%1").arg(i+1);
|
QString groupName = QString::fromAscii("Custom_%1").arg(i+1);
|
||||||
QByteArray toolbarName = toplevel->text(0).toUtf8();
|
QByteArray toolbarName = toplevel->text(0).toUtf8();
|
||||||
ParameterGrp::handle hToolGrp = hGrp->GetGroup(groupName.toAscii());
|
ParameterGrp::handle hToolGrp = hGrp->GetGroup(groupName.toLatin1());
|
||||||
hToolGrp->SetASCII("Name", toolbarName.constData());
|
hToolGrp->SetASCII("Name", toolbarName.constData());
|
||||||
hToolGrp->SetBool("Active", toplevel->checkState(0) == Qt::Checked);
|
hToolGrp->SetBool("Active", toplevel->checkState(0) == Qt::Checked);
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ void DlgCustomToolbars::on_moveActionRightButton_clicked()
|
||||||
|
|
||||||
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
||||||
QString workbench = data.toString();
|
QString workbench = data.toString();
|
||||||
exportCustomToolbars(workbench.toAscii());
|
exportCustomToolbars(workbench.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Removes an action */
|
/** Removes an action */
|
||||||
|
@ -386,7 +386,7 @@ void DlgCustomToolbars::on_moveActionLeftButton_clicked()
|
||||||
|
|
||||||
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
||||||
QString workbench = data.toString();
|
QString workbench = data.toString();
|
||||||
exportCustomToolbars(workbench.toAscii());
|
exportCustomToolbars(workbench.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Moves up an action */
|
/** Moves up an action */
|
||||||
|
@ -424,7 +424,7 @@ void DlgCustomToolbars::on_moveActionUpButton_clicked()
|
||||||
|
|
||||||
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
||||||
QString workbench = data.toString();
|
QString workbench = data.toString();
|
||||||
exportCustomToolbars(workbench.toAscii());
|
exportCustomToolbars(workbench.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Moves down an action */
|
/** Moves down an action */
|
||||||
|
@ -462,7 +462,7 @@ void DlgCustomToolbars::on_moveActionDownButton_clicked()
|
||||||
|
|
||||||
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
||||||
QString workbench = data.toString();
|
QString workbench = data.toString();
|
||||||
exportCustomToolbars(workbench.toAscii());
|
exportCustomToolbars(workbench.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DlgCustomToolbars::on_newButton_clicked()
|
void DlgCustomToolbars::on_newButton_clicked()
|
||||||
|
@ -488,7 +488,7 @@ void DlgCustomToolbars::on_newButton_clicked()
|
||||||
|
|
||||||
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
||||||
QString workbench = data.toString();
|
QString workbench = data.toString();
|
||||||
exportCustomToolbars(workbench.toAscii());
|
exportCustomToolbars(workbench.toLatin1());
|
||||||
addCustomToolbar(text);
|
addCustomToolbar(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -505,7 +505,7 @@ void DlgCustomToolbars::on_deleteButton_clicked()
|
||||||
|
|
||||||
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
||||||
QString workbench = data.toString();
|
QString workbench = data.toString();
|
||||||
exportCustomToolbars(workbench.toAscii());
|
exportCustomToolbars(workbench.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DlgCustomToolbars::on_renameButton_clicked()
|
void DlgCustomToolbars::on_renameButton_clicked()
|
||||||
|
@ -537,7 +537,7 @@ void DlgCustomToolbars::on_renameButton_clicked()
|
||||||
if (renamed) {
|
if (renamed) {
|
||||||
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
QVariant data = workbenchBox->itemData(workbenchBox->currentIndex(), Qt::UserRole);
|
||||||
QString workbench = data.toString();
|
QString workbench = data.toString();
|
||||||
exportCustomToolbars(workbench.toAscii());
|
exportCustomToolbars(workbench.toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -245,14 +245,14 @@ void DlgWorkbenchesImp::save_workbenches()
|
||||||
enabled_wbs.append(name + QString::fromAscii(","));
|
enabled_wbs.append(name + QString::fromAscii(","));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hGrp->SetASCII("Enabled", enabled_wbs.toAscii());
|
hGrp->SetASCII("Enabled", enabled_wbs.toLatin1());
|
||||||
|
|
||||||
for (int i = 0; i < lw_disabled_workbenches->count(); i++) {
|
for (int i = 0; i < lw_disabled_workbenches->count(); i++) {
|
||||||
QVariant item_data = lw_disabled_workbenches->item(i)->data(Qt::UserRole);
|
QVariant item_data = lw_disabled_workbenches->item(i)->data(Qt::UserRole);
|
||||||
QString name = item_data.toString();
|
QString name = item_data.toString();
|
||||||
disabled_wbs.append(name + QString::fromAscii(","));
|
disabled_wbs.append(name + QString::fromAscii(","));
|
||||||
}
|
}
|
||||||
hGrp->SetASCII("Disabled", disabled_wbs.toAscii());
|
hGrp->SetASCII("Disabled", disabled_wbs.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_DlgWorkbenchesImp.cpp"
|
#include "moc_DlgWorkbenchesImp.cpp"
|
||||||
|
|
|
@ -243,7 +243,7 @@ void DockWindowManager::removeDockWindow(QWidget* widget)
|
||||||
void DockWindowManager::retranslate()
|
void DockWindowManager::retranslate()
|
||||||
{
|
{
|
||||||
for (QList<QDockWidget*>::Iterator it = d->_dockedWindows.begin(); it != d->_dockedWindows.end(); ++it) {
|
for (QList<QDockWidget*>::Iterator it = d->_dockedWindows.begin(); it != d->_dockedWindows.end(); ++it) {
|
||||||
(*it)->setWindowTitle(QDockWidget::tr((*it)->objectName().toAscii()));
|
(*it)->setWindowTitle(QDockWidget::tr((*it)->objectName().toLatin1()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ void DockWindowManager::setup(DockWindowItems* items)
|
||||||
QList<QDockWidget*> areas[4];
|
QList<QDockWidget*> areas[4];
|
||||||
for (QList<DockWindowItem>::ConstIterator it = dws.begin(); it != dws.end(); ++it) {
|
for (QList<DockWindowItem>::ConstIterator it = dws.begin(); it != dws.end(); ++it) {
|
||||||
QDockWidget* dw = findDockWidget(docked, it->name);
|
QDockWidget* dw = findDockWidget(docked, it->name);
|
||||||
QByteArray dockName = it->name.toAscii();
|
QByteArray dockName = it->name.toLatin1();
|
||||||
bool visible = hPref->GetBool(dockName.constData(), it->visibility);
|
bool visible = hPref->GetBool(dockName.constData(), it->visibility);
|
||||||
|
|
||||||
if (!dw) {
|
if (!dw) {
|
||||||
|
|
|
@ -891,7 +891,7 @@ void Document::SaveDocFile (Base::Writer &writer) const
|
||||||
|
|
||||||
writer.incInd(); // indentation for camera settings
|
writer.incInd(); // indentation for camera settings
|
||||||
writer.Stream() << writer.ind() << "<Camera settings=\""
|
writer.Stream() << writer.ind() << "<Camera settings=\""
|
||||||
<< (const char*)viewPos.toAscii() <<"\"/>" << std::endl;
|
<< (const char*)viewPos.toLatin1() <<"\"/>" << std::endl;
|
||||||
writer.decInd(); // indentation for camera settings
|
writer.decInd(); // indentation for camera settings
|
||||||
writer.Stream() << "</Document>" << std::endl;
|
writer.Stream() << "</Document>" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,12 +367,12 @@ void DownloadItem::open()
|
||||||
if (doc) {
|
if (doc) {
|
||||||
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
||||||
Gui::Application::Instance->importFrom(it.key().toUtf8(),
|
Gui::Application::Instance->importFrom(it.key().toUtf8(),
|
||||||
doc->getDocument()->getName(), it.value().toAscii());
|
doc->getDocument()->getName(), it.value().toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
||||||
Gui::Application::Instance->open(it.key().toUtf8(), it.value().toAscii());
|
Gui::Application::Instance->open(it.key().toUtf8(), it.value().toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -799,11 +799,11 @@ SelectModule::Dict SelectModule::exportHandler(const QStringList& fileNames, con
|
||||||
for (QStringList::const_iterator it = fileNames.begin(); it != fileNames.end(); ++it) {
|
for (QStringList::const_iterator it = fileNames.begin(); it != fileNames.end(); ++it) {
|
||||||
QFileInfo fi(*it);
|
QFileInfo fi(*it);
|
||||||
QString ext = fi.completeSuffix().toLower();
|
QString ext = fi.completeSuffix().toLower();
|
||||||
std::map<std::string, std::string> filters = App::GetApplication().getExportFilters(ext.toAscii());
|
std::map<std::string, std::string> filters = App::GetApplication().getExportFilters(ext.toLatin1());
|
||||||
|
|
||||||
if (filters.empty()) {
|
if (filters.empty()) {
|
||||||
ext = fi.suffix().toLower();
|
ext = fi.suffix().toLower();
|
||||||
filters = App::GetApplication().getExportFilters(ext.toAscii());
|
filters = App::GetApplication().getExportFilters(ext.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
fileExtension[ext].push_back(*it);
|
fileExtension[ext].push_back(*it);
|
||||||
|
@ -861,11 +861,11 @@ SelectModule::Dict SelectModule::importHandler(const QStringList& fileNames, con
|
||||||
for (QStringList::const_iterator it = fileNames.begin(); it != fileNames.end(); ++it) {
|
for (QStringList::const_iterator it = fileNames.begin(); it != fileNames.end(); ++it) {
|
||||||
QFileInfo fi(*it);
|
QFileInfo fi(*it);
|
||||||
QString ext = fi.completeSuffix().toLower();
|
QString ext = fi.completeSuffix().toLower();
|
||||||
std::map<std::string, std::string> filters = App::GetApplication().getImportFilters(ext.toAscii());
|
std::map<std::string, std::string> filters = App::GetApplication().getImportFilters(ext.toLatin1());
|
||||||
|
|
||||||
if (filters.empty()) {
|
if (filters.empty()) {
|
||||||
ext = fi.suffix().toLower();
|
ext = fi.suffix().toLower();
|
||||||
filters = App::GetApplication().getImportFilters(ext.toAscii());
|
filters = App::GetApplication().getImportFilters(ext.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
fileExtension[ext].push_back(*it);
|
fileExtension[ext].push_back(*it);
|
||||||
|
|
|
@ -469,7 +469,7 @@ void TextBrowser::dropEvent(QDropEvent * e)
|
||||||
dataStream >> action;
|
dataStream >> action;
|
||||||
|
|
||||||
CommandManager& rclMan = Application::Instance->commandManager();
|
CommandManager& rclMan = Application::Instance->commandManager();
|
||||||
Command* pCmd = rclMan.getCommandByName(action.toAscii());
|
Command* pCmd = rclMan.getCommandByName(action.toLatin1());
|
||||||
if ( pCmd ) {
|
if ( pCmd ) {
|
||||||
QString info = pCmd->getAction()->whatsThis();
|
QString info = pCmd->getAction()->whatsThis();
|
||||||
if ( !info.isEmpty() ) {
|
if ( !info.isEmpty() ) {
|
||||||
|
|
|
@ -1444,10 +1444,10 @@ void MainWindow::loadUrls(App::Document* doc, const QList<QUrl>& url)
|
||||||
if (info.isSymLink())
|
if (info.isSymLink())
|
||||||
info.setFile(info.readLink());
|
info.setFile(info.readLink());
|
||||||
std::vector<std::string> module = App::GetApplication()
|
std::vector<std::string> module = App::GetApplication()
|
||||||
.getImportModules(info.completeSuffix().toAscii());
|
.getImportModules(info.completeSuffix().toLatin1());
|
||||||
if (module.empty()) {
|
if (module.empty()) {
|
||||||
module = App::GetApplication()
|
module = App::GetApplication()
|
||||||
.getImportModules(info.suffix().toAscii());
|
.getImportModules(info.suffix().toLatin1());
|
||||||
}
|
}
|
||||||
if (!module.empty()) {
|
if (!module.empty()) {
|
||||||
// ok, we support files with this extension
|
// ok, we support files with this extension
|
||||||
|
@ -1483,7 +1483,7 @@ void MainWindow::loadUrls(App::Document* doc, const QList<QUrl>& url)
|
||||||
// load the files with the associated modules
|
// load the files with the associated modules
|
||||||
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
for (SelectModule::Dict::iterator it = dict.begin(); it != dict.end(); ++it) {
|
||||||
// if the passed document name doesn't exist the module should create it, if needed
|
// if the passed document name doesn't exist the module should create it, if needed
|
||||||
Application::Instance->importFrom(it.key().toUtf8(), docName, it.value().toAscii());
|
Application::Instance->importFrom(it.key().toUtf8(), docName, it.value().toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1576,7 +1576,7 @@ void MainWindow::customEvent(QEvent* e)
|
||||||
if (d) {
|
if (d) {
|
||||||
ViewProviderExtern *view = new ViewProviderExtern();
|
ViewProviderExtern *view = new ViewProviderExtern();
|
||||||
try {
|
try {
|
||||||
view->setModeByString("1",msg.toAscii().constData());
|
view->setModeByString("1",msg.toLatin1().constData());
|
||||||
d->setAnnotationViewProvider("Vdbg",view);
|
d->setAnnotationViewProvider("Vdbg",view);
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
|
|
|
@ -118,7 +118,7 @@ void NetworkRetriever::testFailure()
|
||||||
if ( wget->state() == QProcess::Running )
|
if ( wget->state() == QProcess::Running )
|
||||||
{
|
{
|
||||||
d->fail = false;
|
d->fail = false;
|
||||||
Base::Console().Message( tr("Download started...\n").toAscii() );
|
Base::Console().Message( tr("Download started...\n").toLatin1() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ bool NetworkRetriever::startDownload( const QString& startUrl )
|
||||||
{
|
{
|
||||||
if ( dir.mkdir( d->dir ) == false)
|
if ( dir.mkdir( d->dir ) == false)
|
||||||
{
|
{
|
||||||
Base::Console().Error("Directory '%s' could not be created.", (const char*)d->dir.toAscii());
|
Base::Console().Error("Directory '%s' could not be created.", (const char*)d->dir.toLatin1());
|
||||||
return true; // please, no error message
|
return true; // please, no error message
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -489,7 +489,7 @@ void StdCmdDownloadOnlineHelp::activated(int iMsg)
|
||||||
QString path = QString::fromUtf8(App::GetApplication().getHomePath());
|
QString path = QString::fromUtf8(App::GetApplication().getHomePath());
|
||||||
path += QString::fromAscii("/doc/");
|
path += QString::fromAscii("/doc/");
|
||||||
ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/OnlineHelp");
|
ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/OnlineHelp");
|
||||||
path = QString::fromUtf8(hURLGrp->GetASCII( "DownloadLocation", path.toAscii() ).c_str());
|
path = QString::fromUtf8(hURLGrp->GetASCII( "DownloadLocation", path.toLatin1() ).c_str());
|
||||||
|
|
||||||
while (loop > 0) {
|
while (loop > 0) {
|
||||||
loop--;
|
loop--;
|
||||||
|
|
|
@ -146,7 +146,7 @@ QByteArray OnlineDocumentation::loadResource(const QString& filename) const
|
||||||
std::string path = App::GetApplication().getHomePath();
|
std::string path = App::GetApplication().getHomePath();
|
||||||
path += "/doc/docs.zip";
|
path += "/doc/docs.zip";
|
||||||
zipios::ZipFile zip(path);
|
zipios::ZipFile zip(path);
|
||||||
zipios::ConstEntryPointer entry = zip.getEntry((const char*)fn.toAscii());
|
zipios::ConstEntryPointer entry = zip.getEntry((const char*)fn.toLatin1());
|
||||||
std::istream* str = zip.getInputStream(entry);
|
std::istream* str = zip.getInputStream(entry);
|
||||||
|
|
||||||
// set size of the array so that no re-allocation is needed when reading from the stream
|
// set size of the array so that no re-allocation is needed when reading from the stream
|
||||||
|
|
|
@ -230,7 +230,7 @@ void Placement::applyPlacement(const QString& data, bool incremental)
|
||||||
.arg(data);
|
.arg(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
Application::Instance->runPythonCode((const char*)cmd.toAscii());
|
Application::Instance->runPythonCode((const char*)cmd.toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -319,8 +319,8 @@ bool InteractiveInterpreter::push(const char* line)
|
||||||
d->buffer.append(QString::fromAscii(line));
|
d->buffer.append(QString::fromAscii(line));
|
||||||
QString source = d->buffer.join(QLatin1String("\n"));
|
QString source = d->buffer.join(QLatin1String("\n"));
|
||||||
try {
|
try {
|
||||||
// Source is already UTF-8, so we can use toAscii()
|
// Source is already UTF-8, so we can use toLatin1()
|
||||||
bool more = runSource(source.toAscii());
|
bool more = runSource(source.toLatin1());
|
||||||
if (!more)
|
if (!more)
|
||||||
d->buffer.clear();
|
d->buffer.clear();
|
||||||
return more;
|
return more;
|
||||||
|
|
|
@ -344,5 +344,5 @@ Py::Object PythonStdin::repr()
|
||||||
|
|
||||||
Py::Object PythonStdin::readline(const Py::Tuple& args)
|
Py::Object PythonStdin::readline(const Py::Tuple& args)
|
||||||
{
|
{
|
||||||
return Py::String( (const char *)pyConsole->readline().toAscii() );
|
return Py::String( (const char *)pyConsole->readline().toLatin1() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ KeyboardP::keyEvent(QKeyEvent * qevent)
|
||||||
|
|
||||||
//Need to use a temporary to avoid reference becoming deleted before
|
//Need to use a temporary to avoid reference becoming deleted before
|
||||||
//we get a hold of it.
|
//we get a hold of it.
|
||||||
QByteArray tmp = qevent->text().toAscii();
|
QByteArray tmp = qevent->text().toLatin1();
|
||||||
const char * printable = tmp.constData();
|
const char * printable = tmp.constData();
|
||||||
this->keyboard->setPrintableCharacter(*printable);
|
this->keyboard->setPrintableCharacter(*printable);
|
||||||
this->keyboard->setKey(sokey);
|
this->keyboard->setKey(sokey);
|
||||||
|
|
|
@ -195,9 +195,9 @@ void SelectionView::select(QListWidgetItem* item)
|
||||||
elements[1] = elements[1].split(QString::fromAscii(" "))[0];
|
elements[1] = elements[1].split(QString::fromAscii(" "))[0];
|
||||||
//Gui::Selection().clearSelection();
|
//Gui::Selection().clearSelection();
|
||||||
Gui::Command::runCommand(Gui::Command::Gui,"Gui.Selection.clearSelection()");
|
Gui::Command::runCommand(Gui::Command::Gui,"Gui.Selection.clearSelection()");
|
||||||
//Gui::Selection().addSelection(elements[0].toAscii(),elements[1].toAscii(),0);
|
//Gui::Selection().addSelection(elements[0].toLatin1(),elements[1].toLatin1(),0);
|
||||||
QString cmd = QString::fromAscii("Gui.Selection.addSelection(App.getDocument(\"%1\").getObject(\"%2\"))").arg(elements[0]).arg(elements[1]);
|
QString cmd = QString::fromAscii("Gui.Selection.addSelection(App.getDocument(\"%1\").getObject(\"%2\"))").arg(elements[0]).arg(elements[1]);
|
||||||
Gui::Command::runCommand(Gui::Command::Gui,cmd.toAscii());
|
Gui::Command::runCommand(Gui::Command::Gui,cmd.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectionView::deselect(void)
|
void SelectionView::deselect(void)
|
||||||
|
@ -208,9 +208,9 @@ void SelectionView::deselect(void)
|
||||||
QStringList elements = item->text().split(QString::fromAscii("."));
|
QStringList elements = item->text().split(QString::fromAscii("."));
|
||||||
// remove possible space from object name followed by label
|
// remove possible space from object name followed by label
|
||||||
elements[1] = elements[1].split(QString::fromAscii(" "))[0];
|
elements[1] = elements[1].split(QString::fromAscii(" "))[0];
|
||||||
//Gui::Selection().rmvSelection(elements[0].toAscii(),elements[1].toAscii(),0);
|
//Gui::Selection().rmvSelection(elements[0].toLatin1(),elements[1].toLatin1(),0);
|
||||||
QString cmd = QString::fromAscii("Gui.Selection.removeSelection(App.getDocument(\"%1\").getObject(\"%2\"))").arg(elements[0]).arg(elements[1]);
|
QString cmd = QString::fromAscii("Gui.Selection.removeSelection(App.getDocument(\"%1\").getObject(\"%2\"))").arg(elements[0]).arg(elements[1]);
|
||||||
Gui::Command::runCommand(Gui::Command::Gui,cmd.toAscii());
|
Gui::Command::runCommand(Gui::Command::Gui,cmd.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectionView::zoom(void)
|
void SelectionView::zoom(void)
|
||||||
|
@ -235,14 +235,14 @@ void SelectionView::toPython(void)
|
||||||
elements[1] = elements[1].split(QString::fromAscii(" "))[0];
|
elements[1] = elements[1].split(QString::fromAscii(" "))[0];
|
||||||
|
|
||||||
QString cmd = QString::fromAscii("obj = App.getDocument(\"%1\").getObject(\"%2\")").arg(elements[0]).arg(elements[1]);
|
QString cmd = QString::fromAscii("obj = App.getDocument(\"%1\").getObject(\"%2\")").arg(elements[0]).arg(elements[1]);
|
||||||
Gui::Command::runCommand(Gui::Command::Gui,cmd.toAscii());
|
Gui::Command::runCommand(Gui::Command::Gui,cmd.toLatin1());
|
||||||
if (elements.length() > 2) {
|
if (elements.length() > 2) {
|
||||||
elements[2] = elements[2].split(QString::fromAscii(" "))[0];
|
elements[2] = elements[2].split(QString::fromAscii(" "))[0];
|
||||||
if ( elements[2].contains(QString::fromAscii("Face")) || elements[2].contains(QString::fromAscii("Edge")) ) {
|
if ( elements[2].contains(QString::fromAscii("Face")) || elements[2].contains(QString::fromAscii("Edge")) ) {
|
||||||
cmd = QString::fromAscii("shp = App.getDocument(\"%1\").getObject(\"%2\").Shape").arg(elements[0]).arg(elements[1]);
|
cmd = QString::fromAscii("shp = App.getDocument(\"%1\").getObject(\"%2\").Shape").arg(elements[0]).arg(elements[1]);
|
||||||
Gui::Command::runCommand(Gui::Command::Gui,cmd.toAscii());
|
Gui::Command::runCommand(Gui::Command::Gui,cmd.toLatin1());
|
||||||
cmd = QString::fromAscii("elt = App.getDocument(\"%1\").getObject(\"%2\").Shape.%3").arg(elements[0]).arg(elements[1]).arg(elements[2]);
|
cmd = QString::fromAscii("elt = App.getDocument(\"%1\").getObject(\"%2\").Shape.%3").arg(elements[0]).arg(elements[1]).arg(elements[2]);
|
||||||
Gui::Command::runCommand(Gui::Command::Gui,cmd.toAscii());
|
Gui::Command::runCommand(Gui::Command::Gui,cmd.toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -286,7 +286,7 @@ std::string SoFCOffscreenRenderer::createMIBA(const SbMatrix& mat) const
|
||||||
com << " </View>\n" ;
|
com << " </View>\n" ;
|
||||||
com << " <Source>\n" ;
|
com << " <Source>\n" ;
|
||||||
com << " <Creator>Unknown</Creator>\n" ;
|
com << " <Creator>Unknown</Creator>\n" ;
|
||||||
com << " <CreationDate>" << QDateTime::currentDateTime().toString().toAscii().constData() << "</CreationDate>\n" ;
|
com << " <CreationDate>" << QDateTime::currentDateTime().toString().toLatin1().constData() << "</CreationDate>\n" ;
|
||||||
com << " <CreatingSystem>" << App::GetApplication().getExecutableName() << " " << major << "." << minor << "</CreatingSystem>\n" ;
|
com << " <CreatingSystem>" << App::GetApplication().getExecutableName() << " " << major << "." << minor << "</CreatingSystem>\n" ;
|
||||||
com << " <PartNumber>Unknown</PartNumber>\n";
|
com << " <PartNumber>Unknown</PartNumber>\n";
|
||||||
com << " <Revision>1.0</Revision>\n";
|
com << " <Revision>1.0</Revision>\n";
|
||||||
|
|
|
@ -142,14 +142,14 @@ void TaskAppearance::on_changeMode_activated(const QString& s)
|
||||||
App::Property* prop = (*It)->getPropertyByName("DisplayMode");
|
App::Property* prop = (*It)->getPropertyByName("DisplayMode");
|
||||||
if (prop && prop->getTypeId() == App::PropertyEnumeration::getClassTypeId()) {
|
if (prop && prop->getTypeId() == App::PropertyEnumeration::getClassTypeId()) {
|
||||||
App::PropertyEnumeration* Display = (App::PropertyEnumeration*)prop;
|
App::PropertyEnumeration* Display = (App::PropertyEnumeration*)prop;
|
||||||
Display->setValue((const char*)s.toAscii());
|
Display->setValue((const char*)s.toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskAppearance::on_changePlot_activated(const QString&s)
|
void TaskAppearance::on_changePlot_activated(const QString&s)
|
||||||
{
|
{
|
||||||
Base::Console().Log("Plot = %s\n",(const char*)s.toAscii());
|
Base::Console().Log("Plot = %s\n",(const char*)s.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -263,7 +263,7 @@ ViewProviderAnnotationLabel::ViewProviderAnnotationLabel()
|
||||||
Justification.setEnums(JustificationEnums);
|
Justification.setEnums(JustificationEnums);
|
||||||
QFont fn;
|
QFont fn;
|
||||||
ADD_PROPERTY(FontSize,(fn.pointSize()));
|
ADD_PROPERTY(FontSize,(fn.pointSize()));
|
||||||
ADD_PROPERTY(FontName,((const char*)fn.family().toAscii()));
|
ADD_PROPERTY(FontName,((const char*)fn.family().toLatin1()));
|
||||||
ADD_PROPERTY(Frame,(true));
|
ADD_PROPERTY(Frame,(true));
|
||||||
|
|
||||||
pColor = new SoBaseColor();
|
pColor = new SoBaseColor();
|
||||||
|
|
|
@ -549,8 +549,8 @@ QWidget* UiLoader::createWidget(const QString & className, QWidget * parent,
|
||||||
if (this->cw.contains(className))
|
if (this->cw.contains(className))
|
||||||
return QUiLoader::createWidget(className, parent, name);
|
return QUiLoader::createWidget(className, parent, name);
|
||||||
QWidget* w = 0;
|
QWidget* w = 0;
|
||||||
if (WidgetFactory().CanProduce((const char*)className.toAscii()))
|
if (WidgetFactory().CanProduce((const char*)className.toLatin1()))
|
||||||
w = WidgetFactory().createWidget((const char*)className.toAscii(), parent);
|
w = WidgetFactory().createWidget((const char*)className.toLatin1(), parent);
|
||||||
if (w) w->setObjectName(name);
|
if (w) w->setObjectName(name);
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
@ -1055,7 +1055,7 @@ bool PyResource::connect(const char* sender, const char* signal, PyObject* cb)
|
||||||
if (objS) {
|
if (objS) {
|
||||||
SignalConnect* sc = new SignalConnect(this, cb);
|
SignalConnect* sc = new SignalConnect(this, cb);
|
||||||
mySingals.push_back(sc);
|
mySingals.push_back(sc);
|
||||||
return QObject::connect(objS, sigStr.toAscii(), sc, SLOT ( onExecute() ) );
|
return QObject::connect(objS, sigStr.toLatin1(), sc, SLOT ( onExecute() ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
qWarning( "'%s' does not exist.\n", sender );
|
qWarning( "'%s' does not exist.\n", sender );
|
||||||
|
@ -1165,14 +1165,14 @@ PyObject *PyResource::value(PyObject *args)
|
||||||
int nSize = str.count();
|
int nSize = str.count();
|
||||||
PyObject* slist = PyList_New(nSize);
|
PyObject* slist = PyList_New(nSize);
|
||||||
for (int i=0; i<nSize;++i) {
|
for (int i=0; i<nSize;++i) {
|
||||||
PyObject* item = PyString_FromString(str[i].toAscii());
|
PyObject* item = PyString_FromString(str[i].toLatin1());
|
||||||
PyList_SetItem(slist, i, item);
|
PyList_SetItem(slist, i, item);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case QVariant::ByteArray:
|
case QVariant::ByteArray:
|
||||||
break;
|
break;
|
||||||
case QVariant::String:
|
case QVariant::String:
|
||||||
pItem = PyString_FromString(v.toString().toAscii());
|
pItem = PyString_FromString(v.toString().toLatin1());
|
||||||
break;
|
break;
|
||||||
case QVariant::Double:
|
case QVariant::Double:
|
||||||
pItem = PyFloat_FromDouble(v.toDouble());
|
pItem = PyFloat_FromDouble(v.toDouble());
|
||||||
|
|
|
@ -740,7 +740,7 @@ void UrlLabel::mouseReleaseEvent (QMouseEvent *)
|
||||||
PyObject* dict = PyModule_GetDict(module);
|
PyObject* dict = PyModule_GetDict(module);
|
||||||
PyObject* func = PyDict_GetItemString(dict, "open");
|
PyObject* func = PyDict_GetItemString(dict, "open");
|
||||||
if (func) {
|
if (func) {
|
||||||
PyObject* args = Py_BuildValue("(s)", (const char*)this->_url.toAscii());
|
PyObject* args = Py_BuildValue("(s)", (const char*)this->_url.toLatin1());
|
||||||
PyObject* result = PyEval_CallObject(func,args);
|
PyObject* result = PyEval_CallObject(func,args);
|
||||||
// decrement the args and module reference
|
// decrement the args and module reference
|
||||||
Py_XDECREF(result);
|
Py_XDECREF(result);
|
||||||
|
|
|
@ -2428,8 +2428,8 @@ LinkSelection::~LinkSelection()
|
||||||
void LinkSelection::select()
|
void LinkSelection::select()
|
||||||
{
|
{
|
||||||
Gui::Selection().clearSelection();
|
Gui::Selection().clearSelection();
|
||||||
Gui::Selection().addSelection((const char*)link[0].toAscii(),
|
Gui::Selection().addSelection((const char*)link[0].toLatin1(),
|
||||||
(const char*)link[1].toAscii());
|
(const char*)link[1].toLatin1());
|
||||||
this->deleteLater();
|
this->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ Gui::Action * CmdDrawingNewPage::createAction(void)
|
||||||
if (file.open(QFile::ReadOnly)) {
|
if (file.open(QFile::ReadOnly)) {
|
||||||
QString s = QString::fromAscii("style=\"font-size:22px\">%1%2</tspan></text>").arg(paper).arg(id);
|
QString s = QString::fromAscii("style=\"font-size:22px\">%1%2</tspan></text>").arg(paper).arg(id);
|
||||||
QByteArray data = file.readAll();
|
QByteArray data = file.readAll();
|
||||||
data.replace("style=\"font-size:22px\">A0</tspan></text>", s.toAscii());
|
data.replace("style=\"font-size:22px\">A0</tspan></text>", s.toLatin1());
|
||||||
a->setIcon(Gui::BitmapFactory().pixmapFromSvg(data, QSize(64,64)));
|
a->setIcon(Gui::BitmapFactory().pixmapFromSvg(data, QSize(64,64)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -221,15 +221,15 @@ void VisualInspection::accept()
|
||||||
if (sel->checkState(0) == Qt::Checked) {
|
if (sel->checkState(0) == Qt::Checked) {
|
||||||
QString actualName = sel->data(0, Qt::UserRole).toString();
|
QString actualName = sel->data(0, Qt::UserRole).toString();
|
||||||
Gui::Application::Instance->runCommand(
|
Gui::Application::Instance->runCommand(
|
||||||
true, "App_activeDocument___InspectionGroup.newObject(\"Inspection::Feature\",\"%s_Inspect\")", (const char*)actualName.toAscii());
|
true, "App_activeDocument___InspectionGroup.newObject(\"Inspection::Feature\",\"%s_Inspect\")", (const char*)actualName.toLatin1());
|
||||||
Gui::Application::Instance->runCommand(
|
Gui::Application::Instance->runCommand(
|
||||||
true, "App.ActiveDocument.ActiveObject.Actual=App.ActiveDocument.%s\n"
|
true, "App.ActiveDocument.ActiveObject.Actual=App.ActiveDocument.%s\n"
|
||||||
"App_activeDocument___activeObject___Nominals=list()\n"
|
"App_activeDocument___activeObject___Nominals=list()\n"
|
||||||
"App.ActiveDocument.ActiveObject.SearchRadius=%.3f\n"
|
"App.ActiveDocument.ActiveObject.SearchRadius=%.3f\n"
|
||||||
"App.ActiveDocument.ActiveObject.Thickness=%.3f\n", (const char*)actualName.toAscii(), searchRadius, thickness);
|
"App.ActiveDocument.ActiveObject.Thickness=%.3f\n", (const char*)actualName.toLatin1(), searchRadius, thickness);
|
||||||
for (QStringList::Iterator it = nominalNames.begin(); it != nominalNames.end(); ++it) {
|
for (QStringList::Iterator it = nominalNames.begin(); it != nominalNames.end(); ++it) {
|
||||||
Gui::Application::Instance->runCommand(
|
Gui::Application::Instance->runCommand(
|
||||||
true, "App_activeDocument___activeObject___Nominals.append(App.ActiveDocument.%s)\n", (const char*)(*it).toAscii());
|
true, "App_activeDocument___activeObject___Nominals.append(App.ActiveDocument.%s)\n", (const char*)(*it).toLatin1());
|
||||||
}
|
}
|
||||||
Gui::Application::Instance->runCommand(
|
Gui::Application::Instance->runCommand(
|
||||||
true, "App.ActiveDocument.ActiveObject.Nominals=App_activeDocument___activeObject___Nominals\n"
|
true, "App.ActiveDocument.ActiveObject.Nominals=App_activeDocument___activeObject___Nominals\n"
|
||||||
|
@ -249,7 +249,7 @@ void VisualInspection::accept()
|
||||||
if (sel->checkState(0) == Qt::Checked) {
|
if (sel->checkState(0) == Qt::Checked) {
|
||||||
Gui::Application::Instance->runCommand(
|
Gui::Application::Instance->runCommand(
|
||||||
true, "Gui.ActiveDocument.getObject(\"%s\").Visibility=False"
|
true, "Gui.ActiveDocument.getObject(\"%s\").Visibility=False"
|
||||||
, (const char*)sel->data(0, Qt::UserRole).toString().toAscii());
|
, (const char*)sel->data(0, Qt::UserRole).toString().toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ void VisualInspection::accept()
|
||||||
if (sel->checkState(0) == Qt::Checked) {
|
if (sel->checkState(0) == Qt::Checked) {
|
||||||
Gui::Application::Instance->runCommand(
|
Gui::Application::Instance->runCommand(
|
||||||
true, "Gui.ActiveDocument.getObject(\"%s\").Visibility=False"
|
true, "Gui.ActiveDocument.getObject(\"%s\").Visibility=False"
|
||||||
, (const char*)sel->data(0, Qt::UserRole).toString().toAscii());
|
, (const char*)sel->data(0, Qt::UserRole).toString().toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -468,7 +468,7 @@ void CmdMeshExport::activated(int iMsg)
|
||||||
QObject::tr("Export mesh"), dir, filter.join(QLatin1String(";;")), &format);
|
QObject::tr("Export mesh"), dir, filter.join(QLatin1String(";;")), &format);
|
||||||
if (!fn.isEmpty()) {
|
if (!fn.isEmpty()) {
|
||||||
QFileInfo fi(fn);
|
QFileInfo fi(fn);
|
||||||
QByteArray extension = fi.suffix().toAscii();
|
QByteArray extension = fi.suffix().toLatin1();
|
||||||
for (QList<QPair<QString, QByteArray> >::iterator it = ext.begin(); it != ext.end(); ++it) {
|
for (QList<QPair<QString, QByteArray> >::iterator it = ext.begin(); it != ext.end(); ++it) {
|
||||||
if (it->first == format) {
|
if (it->first == format) {
|
||||||
extension = it->second;
|
extension = it->second;
|
||||||
|
|
|
@ -202,7 +202,7 @@ void MeshGui::DlgRegularSolidImp::on_createSolidButton_clicked()
|
||||||
// Execute the Python block
|
// Execute the Python block
|
||||||
QString solid = tr("Create %1").arg(comboBox1->currentText());
|
QString solid = tr("Create %1").arg(comboBox1->currentText());
|
||||||
Gui::Application::Instance->activeDocument()->openCommand(solid.toUtf8());
|
Gui::Application::Instance->activeDocument()->openCommand(solid.toUtf8());
|
||||||
Gui::Command::doCommand(Gui::Command::Doc, (const char*)cmd.toAscii());
|
Gui::Command::doCommand(Gui::Command::Doc, (const char*)cmd.toLatin1());
|
||||||
Gui::Application::Instance->activeDocument()->commitCommand();
|
Gui::Application::Instance->activeDocument()->commitCommand();
|
||||||
Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().recompute()");
|
Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().recompute()");
|
||||||
Gui::Command::doCommand(Gui::Command::Gui, "Gui.SendMsgToActiveView(\"ViewFit\")");
|
Gui::Command::doCommand(Gui::Command::Gui, "Gui.SendMsgToActiveView(\"ViewFit\")");
|
||||||
|
|
|
@ -450,7 +450,7 @@ public:
|
||||||
QStringList lines = s.split(QLatin1String("\n"));
|
QStringList lines = s.split(QLatin1String("\n"));
|
||||||
std::vector<std::string> text;
|
std::vector<std::string> text;
|
||||||
for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
|
for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
|
||||||
text.push_back((const char*)it->toAscii());
|
text.push_back((const char*)it->toLatin1());
|
||||||
anno->LabelText.setValues(text);
|
anno->LabelText.setValues(text);
|
||||||
std::stringstream str;
|
std::stringstream str;
|
||||||
str << "Curvature info (" << group->Group.getSize() << ")";
|
str << "Curvature info (" << group->Group.getSize() << ")";
|
||||||
|
|
|
@ -223,7 +223,7 @@ bool Tessellation::accept()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
App::Document* activeDoc = App::GetApplication().getDocument((const char*)this->document.toAscii());
|
App::Document* activeDoc = App::GetApplication().getDocument((const char*)this->document.toLatin1());
|
||||||
if (!activeDoc) {
|
if (!activeDoc) {
|
||||||
QMessageBox::critical(this, windowTitle(),
|
QMessageBox::critical(this, windowTitle(),
|
||||||
tr("No such document '%1'.").arg(this->document));
|
tr("No such document '%1'.").arg(this->document));
|
||||||
|
|
|
@ -820,8 +820,8 @@ void CmdPartImportCurveNet::activated(int iMsg)
|
||||||
if (!fn.isEmpty()) {
|
if (!fn.isEmpty()) {
|
||||||
QFileInfo fi; fi.setFile(fn);
|
QFileInfo fi; fi.setFile(fn);
|
||||||
openCommand("Part Import Curve Net");
|
openCommand("Part Import Curve Net");
|
||||||
doCommand(Doc,"f = App.activeDocument().addObject(\"Part::CurveNet\",\"%s\")", (const char*)fi.baseName().toAscii());
|
doCommand(Doc,"f = App.activeDocument().addObject(\"Part::CurveNet\",\"%s\")", (const char*)fi.baseName().toLatin1());
|
||||||
doCommand(Doc,"f.FileName = \"%s\"",(const char*)fn.toAscii());
|
doCommand(Doc,"f.FileName = \"%s\"",(const char*)fn.toLatin1());
|
||||||
commitCommand();
|
commitCommand();
|
||||||
updateActive();
|
updateActive();
|
||||||
}
|
}
|
||||||
|
@ -896,7 +896,7 @@ void CmdPartMakeSolid::activated(int iMsg)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!str.isEmpty())
|
if (!str.isEmpty())
|
||||||
doCommand(Doc, (const char*)str.toAscii());
|
doCommand(Doc, (const char*)str.toLatin1());
|
||||||
}
|
}
|
||||||
catch (const Base::Exception& e) {
|
catch (const Base::Exception& e) {
|
||||||
Base::Console().Error("Cannot convert %s because %s.\n",
|
Base::Console().Error("Cannot convert %s because %s.\n",
|
||||||
|
@ -950,7 +950,7 @@ void CmdPartReverseShape::activated(int iMsg)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!str.isEmpty())
|
if (!str.isEmpty())
|
||||||
doCommand(Doc, (const char*)str.toAscii());
|
doCommand(Doc, (const char*)str.toLatin1());
|
||||||
}
|
}
|
||||||
catch (const Base::Exception& e) {
|
catch (const Base::Exception& e) {
|
||||||
Base::Console().Error("Cannot convert %s because %s.\n",
|
Base::Console().Error("Cannot convert %s because %s.\n",
|
||||||
|
|
|
@ -244,13 +244,13 @@ void CrossSections::apply()
|
||||||
"wires=list()\n"
|
"wires=list()\n"
|
||||||
"shape=FreeCAD.getDocument(\"%1\").%2.Shape\n")
|
"shape=FreeCAD.getDocument(\"%1\").%2.Shape\n")
|
||||||
.arg(QLatin1String(doc->getName()))
|
.arg(QLatin1String(doc->getName()))
|
||||||
.arg(QLatin1String((*it)->getNameInDocument())).toAscii());
|
.arg(QLatin1String((*it)->getNameInDocument())).toLatin1());
|
||||||
|
|
||||||
for (std::vector<double>::iterator jt = d.begin(); jt != d.end(); ++jt) {
|
for (std::vector<double>::iterator jt = d.begin(); jt != d.end(); ++jt) {
|
||||||
app->runPythonCode(QString::fromAscii(
|
app->runPythonCode(QString::fromAscii(
|
||||||
"for i in shape.slice(Base.Vector(%1,%2,%3),%4):\n"
|
"for i in shape.slice(Base.Vector(%1,%2,%3),%4):\n"
|
||||||
" wires.append(i)\n"
|
" wires.append(i)\n"
|
||||||
).arg(a).arg(b).arg(c).arg(*jt).toAscii());
|
).arg(a).arg(b).arg(c).arg(*jt).toLatin1());
|
||||||
seq.next();
|
seq.next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ void CrossSections::apply()
|
||||||
"slice.purgeTouched()\n"
|
"slice.purgeTouched()\n"
|
||||||
"del slice,comp,wires,shape")
|
"del slice,comp,wires,shape")
|
||||||
.arg(QLatin1String(doc->getName()))
|
.arg(QLatin1String(doc->getName()))
|
||||||
.arg(QLatin1String(s.c_str())).toAscii());
|
.arg(QLatin1String(s.c_str())).toLatin1());
|
||||||
|
|
||||||
seq.next();
|
seq.next();
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ void DlgExtrusion::apply()
|
||||||
bool makeSolid = ui->makeSolid->isChecked();
|
bool makeSolid = ui->makeSolid->isChecked();
|
||||||
|
|
||||||
// inspect geometry
|
// inspect geometry
|
||||||
App::DocumentObject* obj = activeDoc->getObject((const char*)shape.toAscii());
|
App::DocumentObject* obj = activeDoc->getObject((const char*)shape.toLatin1());
|
||||||
if (!obj || !obj->isDerivedFrom(Part::Feature::getClassTypeId())) continue;
|
if (!obj || !obj->isDerivedFrom(Part::Feature::getClassTypeId())) continue;
|
||||||
Part::Feature* fea = static_cast<Part::Feature*>(obj);
|
Part::Feature* fea = static_cast<Part::Feature*>(obj);
|
||||||
const TopoDS_Shape& data = fea->Shape.getValue();
|
const TopoDS_Shape& data = fea->Shape.getValue();
|
||||||
|
@ -227,9 +227,9 @@ void DlgExtrusion::apply()
|
||||||
.arg(makeSolid ? QLatin1String("True") : QLatin1String("False"))
|
.arg(makeSolid ? QLatin1String("True") : QLatin1String("False"))
|
||||||
.arg(angle)
|
.arg(angle)
|
||||||
.arg(label);
|
.arg(label);
|
||||||
Gui::Application::Instance->runPythonCode((const char*)code.toAscii());
|
Gui::Application::Instance->runPythonCode((const char*)code.toLatin1());
|
||||||
QByteArray to = name.toAscii();
|
QByteArray to = name.toLatin1();
|
||||||
QByteArray from = shape.toAscii();
|
QByteArray from = shape.toLatin1();
|
||||||
Gui::Command::copyVisual(to, "ShapeColor", from);
|
Gui::Command::copyVisual(to, "ShapeColor", from);
|
||||||
Gui::Command::copyVisual(to, "LineColor", from);
|
Gui::Command::copyVisual(to, "LineColor", from);
|
||||||
Gui::Command::copyVisual(to, "PointColor", from);
|
Gui::Command::copyVisual(to, "PointColor", from);
|
||||||
|
|
|
@ -413,7 +413,7 @@ void DlgFilletEdges::onSelectEdgesOfFace(const QString& subelement, int type)
|
||||||
Gui::SelectionChanges::MsgType msgType = Gui::SelectionChanges::MsgType(type);
|
Gui::SelectionChanges::MsgType msgType = Gui::SelectionChanges::MsgType(type);
|
||||||
if (msgType == Gui::SelectionChanges::AddSelection) {
|
if (msgType == Gui::SelectionChanges::AddSelection) {
|
||||||
Gui::Selection().addSelection(d->object->getDocument()->getName(),
|
Gui::Selection().addSelection(d->object->getDocument()->getName(),
|
||||||
d->object->getNameInDocument(), (const char*)name.toAscii());
|
d->object->getNameInDocument(), (const char*)name.toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -483,13 +483,13 @@ void DlgFilletEdges::toggleCheckState(const QModelIndex& index)
|
||||||
App::Document* doc = d->object->getDocument();
|
App::Document* doc = d->object->getDocument();
|
||||||
Gui::Selection().addSelection(doc->getName(),
|
Gui::Selection().addSelection(doc->getName(),
|
||||||
d->object->getNameInDocument(),
|
d->object->getNameInDocument(),
|
||||||
(const char*)name.toAscii());
|
(const char*)name.toLatin1());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
App::Document* doc = d->object->getDocument();
|
App::Document* doc = d->object->getDocument();
|
||||||
Gui::Selection().rmvSelection(doc->getName(),
|
Gui::Selection().rmvSelection(doc->getName(),
|
||||||
d->object->getNameInDocument(),
|
d->object->getNameInDocument(),
|
||||||
(const char*)name.toAscii());
|
(const char*)name.toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
this->blockConnection(block);
|
this->blockConnection(block);
|
||||||
|
@ -870,7 +870,7 @@ bool DlgFilletEdges::accept()
|
||||||
"del __fillets__\n"
|
"del __fillets__\n"
|
||||||
"FreeCADGui.ActiveDocument.%2.Visibility = False\n")
|
"FreeCADGui.ActiveDocument.%2.Visibility = False\n")
|
||||||
.arg(name).arg(shape);
|
.arg(name).arg(shape);
|
||||||
Gui::Application::Instance->runPythonCode((const char*)code.toAscii());
|
Gui::Application::Instance->runPythonCode((const char*)code.toLatin1());
|
||||||
activeDoc->commitTransaction();
|
activeDoc->commitTransaction();
|
||||||
activeDoc->recompute();
|
activeDoc->recompute();
|
||||||
if (d->fillet) {
|
if (d->fillet) {
|
||||||
|
@ -879,8 +879,8 @@ bool DlgFilletEdges::accept()
|
||||||
if (vp) vp->show();
|
if (vp) vp->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray to = name.toAscii();
|
QByteArray to = name.toLatin1();
|
||||||
QByteArray from = shape.toAscii();
|
QByteArray from = shape.toLatin1();
|
||||||
Gui::Command::copyVisual(to, "LineColor", from);
|
Gui::Command::copyVisual(to, "LineColor", from);
|
||||||
Gui::Command::copyVisual(to, "PointColor", from);
|
Gui::Command::copyVisual(to, "PointColor", from);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -102,7 +102,7 @@ void Picker::createPrimitive(QWidget* widget, const QString& descr, Gui::Documen
|
||||||
|
|
||||||
// Execute the Python block
|
// Execute the Python block
|
||||||
doc->openCommand(descr.toUtf8());
|
doc->openCommand(descr.toUtf8());
|
||||||
Gui::Command::doCommand(Gui::Command::Doc, (const char*)cmd.toAscii());
|
Gui::Command::doCommand(Gui::Command::Doc, (const char*)cmd.toLatin1());
|
||||||
doc->commitCommand();
|
doc->commitCommand();
|
||||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||||
Gui::Command::doCommand(Gui::Command::Gui, "Gui.SendMsgToActiveView(\"ViewFit\")");
|
Gui::Command::doCommand(Gui::Command::Gui, "Gui.SendMsgToActiveView(\"ViewFit\")");
|
||||||
|
|
|
@ -212,9 +212,9 @@ void DlgRevolution::accept()
|
||||||
.arg(ui->angle->value(),0,'f',2)
|
.arg(ui->angle->value(),0,'f',2)
|
||||||
.arg(solid)
|
.arg(solid)
|
||||||
;
|
;
|
||||||
Gui::Application::Instance->runPythonCode((const char*)code.toAscii());
|
Gui::Application::Instance->runPythonCode((const char*)code.toLatin1());
|
||||||
QByteArray to = name.toAscii();
|
QByteArray to = name.toLatin1();
|
||||||
QByteArray from = shape.toAscii();
|
QByteArray from = shape.toLatin1();
|
||||||
Gui::Command::copyVisual(to, "ShapeColor", from);
|
Gui::Command::copyVisual(to, "ShapeColor", from);
|
||||||
Gui::Command::copyVisual(to, "LineColor", from);
|
Gui::Command::copyVisual(to, "LineColor", from);
|
||||||
Gui::Command::copyVisual(to, "PointColor", from);
|
Gui::Command::copyVisual(to, "PointColor", from);
|
||||||
|
|
|
@ -123,7 +123,7 @@ bool Mirroring::accept()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
App::Document* activeDoc = App::GetApplication().getDocument((const char*)this->document.toAscii());
|
App::Document* activeDoc = App::GetApplication().getDocument((const char*)this->document.toLatin1());
|
||||||
if (!activeDoc) {
|
if (!activeDoc) {
|
||||||
QMessageBox::critical(this, windowTitle(),
|
QMessageBox::critical(this, windowTitle(),
|
||||||
tr("No such document '%1'.").arg(this->document));
|
tr("No such document '%1'.").arg(this->document));
|
||||||
|
@ -169,8 +169,8 @@ bool Mirroring::accept()
|
||||||
.arg(this->document).arg(shape).arg(label)
|
.arg(this->document).arg(shape).arg(label)
|
||||||
.arg(normx).arg(normy).arg(normz)
|
.arg(normx).arg(normy).arg(normz)
|
||||||
.arg(basex).arg(basey).arg(basez);
|
.arg(basex).arg(basey).arg(basez);
|
||||||
Gui::Application::Instance->runPythonCode((const char*)code.toAscii());
|
Gui::Application::Instance->runPythonCode((const char*)code.toLatin1());
|
||||||
QByteArray from = shape.toAscii();
|
QByteArray from = shape.toLatin1();
|
||||||
Gui::Command::copyVisual("ActiveObject", "ShapeColor", from);
|
Gui::Command::copyVisual("ActiveObject", "ShapeColor", from);
|
||||||
Gui::Command::copyVisual("ActiveObject", "LineColor", from);
|
Gui::Command::copyVisual("ActiveObject", "LineColor", from);
|
||||||
Gui::Command::copyVisual("ActiveObject", "PointColor", from);
|
Gui::Command::copyVisual("ActiveObject", "PointColor", from);
|
||||||
|
|
|
@ -561,7 +561,7 @@ void TaskCheckGeometryResults::buildShapeContent(const QString &baseName, const
|
||||||
std::ostringstream stream;
|
std::ostringstream stream;
|
||||||
if (!shapeContentString.empty())
|
if (!shapeContentString.empty())
|
||||||
stream << std::endl << std::endl;
|
stream << std::endl << std::endl;
|
||||||
stream << baseName.toAscii().data() << ":" << std::endl;
|
stream << baseName.toLatin1().data() << ":" << std::endl;
|
||||||
|
|
||||||
BRepTools_ShapeSet set;
|
BRepTools_ShapeSet set;
|
||||||
set.Add(shape);
|
set.Add(shape);
|
||||||
|
@ -709,7 +709,7 @@ void TaskCheckGeometryResults::currentRowChanged (const QModelIndex ¤t, co
|
||||||
QString doc, object, sub;
|
QString doc, object, sub;
|
||||||
if (!this->split((*stringIt), doc, object, sub))
|
if (!this->split((*stringIt), doc, object, sub))
|
||||||
continue;
|
continue;
|
||||||
Gui::Selection().addSelection(doc.toAscii(), object.toAscii(), sub.toAscii());
|
Gui::Selection().addSelection(doc.toLatin1(), object.toLatin1(), sub.toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,7 @@ bool LoftWidget::accept()
|
||||||
Gui::Document* doc = Gui::Application::Instance->getDocument(d->document.c_str());
|
Gui::Document* doc = Gui::Application::Instance->getDocument(d->document.c_str());
|
||||||
if (!doc) throw Base::Exception("Document doesn't exist anymore");
|
if (!doc) throw Base::Exception("Document doesn't exist anymore");
|
||||||
doc->openCommand("Loft");
|
doc->openCommand("Loft");
|
||||||
Gui::Application::Instance->runPythonCode((const char*)cmd.toAscii(), false, false);
|
Gui::Application::Instance->runPythonCode((const char*)cmd.toLatin1(), false, false);
|
||||||
doc->getDocument()->recompute();
|
doc->getDocument()->recompute();
|
||||||
App::DocumentObject* obj = doc->getDocument()->getActiveObject();
|
App::DocumentObject* obj = doc->getDocument()->getActiveObject();
|
||||||
if (obj && !obj->isValid()) {
|
if (obj && !obj->isValid()) {
|
||||||
|
|
|
@ -201,7 +201,7 @@ void ShapeBuilderWidget::createEdgeFromVertex()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Gui::Application::Instance->activeDocument()->openCommand("Edge");
|
Gui::Application::Instance->activeDocument()->openCommand("Edge");
|
||||||
Gui::Application::Instance->runPythonCode((const char*)cmd.toAscii(), false, false);
|
Gui::Application::Instance->runPythonCode((const char*)cmd.toLatin1(), false, false);
|
||||||
Gui::Application::Instance->activeDocument()->commitCommand();
|
Gui::Application::Instance->activeDocument()->commitCommand();
|
||||||
}
|
}
|
||||||
catch (const Base::Exception&) {
|
catch (const Base::Exception&) {
|
||||||
|
@ -253,7 +253,7 @@ void ShapeBuilderWidget::createFaceFromVertex()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Gui::Application::Instance->activeDocument()->openCommand("Face");
|
Gui::Application::Instance->activeDocument()->openCommand("Face");
|
||||||
Gui::Application::Instance->runPythonCode((const char*)cmd.toAscii(), false, false);
|
Gui::Application::Instance->runPythonCode((const char*)cmd.toLatin1(), false, false);
|
||||||
Gui::Application::Instance->activeDocument()->commitCommand();
|
Gui::Application::Instance->activeDocument()->commitCommand();
|
||||||
}
|
}
|
||||||
catch (const Base::Exception&) {
|
catch (const Base::Exception&) {
|
||||||
|
@ -305,7 +305,7 @@ void ShapeBuilderWidget::createFaceFromEdge()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Gui::Application::Instance->activeDocument()->openCommand("Face");
|
Gui::Application::Instance->activeDocument()->openCommand("Face");
|
||||||
Gui::Application::Instance->runPythonCode((const char*)cmd.toAscii(), false, false);
|
Gui::Application::Instance->runPythonCode((const char*)cmd.toLatin1(), false, false);
|
||||||
Gui::Application::Instance->activeDocument()->commitCommand();
|
Gui::Application::Instance->activeDocument()->commitCommand();
|
||||||
}
|
}
|
||||||
catch (const Base::Exception&) {
|
catch (const Base::Exception&) {
|
||||||
|
@ -358,7 +358,7 @@ void ShapeBuilderWidget::createShellFromFace()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Gui::Application::Instance->activeDocument()->openCommand("Shell");
|
Gui::Application::Instance->activeDocument()->openCommand("Shell");
|
||||||
Gui::Application::Instance->runPythonCode((const char*)cmd.toAscii(), false, false);
|
Gui::Application::Instance->runPythonCode((const char*)cmd.toLatin1(), false, false);
|
||||||
Gui::Application::Instance->activeDocument()->commitCommand();
|
Gui::Application::Instance->activeDocument()->commitCommand();
|
||||||
}
|
}
|
||||||
catch (const Base::Exception&) {
|
catch (const Base::Exception&) {
|
||||||
|
@ -398,7 +398,7 @@ void ShapeBuilderWidget::createSolidFromShell()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Gui::Application::Instance->activeDocument()->openCommand("Solid");
|
Gui::Application::Instance->activeDocument()->openCommand("Solid");
|
||||||
Gui::Application::Instance->runPythonCode((const char*)cmd.toAscii(), false, false);
|
Gui::Application::Instance->runPythonCode((const char*)cmd.toLatin1(), false, false);
|
||||||
Gui::Application::Instance->activeDocument()->commitCommand();
|
Gui::Application::Instance->activeDocument()->commitCommand();
|
||||||
}
|
}
|
||||||
catch (const Base::Exception&) {
|
catch (const Base::Exception&) {
|
||||||
|
|
|
@ -321,7 +321,7 @@ bool SweepWidget::accept()
|
||||||
Gui::Document* doc = Gui::Application::Instance->getDocument(d->document.c_str());
|
Gui::Document* doc = Gui::Application::Instance->getDocument(d->document.c_str());
|
||||||
if (!doc) throw Base::Exception("Document doesn't exist anymore");
|
if (!doc) throw Base::Exception("Document doesn't exist anymore");
|
||||||
doc->openCommand("Sweep");
|
doc->openCommand("Sweep");
|
||||||
Gui::Application::Instance->runPythonCode((const char*)cmd.toAscii(), false, false);
|
Gui::Application::Instance->runPythonCode((const char*)cmd.toLatin1(), false, false);
|
||||||
doc->getDocument()->recompute();
|
doc->getDocument()->recompute();
|
||||||
App::DocumentObject* obj = doc->getDocument()->getActiveObject();
|
App::DocumentObject* obj = doc->getDocument()->getActiveObject();
|
||||||
if (obj && !obj->isValid()) {
|
if (obj && !obj->isValid()) {
|
||||||
|
|
|
@ -56,7 +56,7 @@ std::vector<App::DocumentObject*> FeaturePickDialog::getFeatures() {
|
||||||
std::vector<App::DocumentObject*> result;
|
std::vector<App::DocumentObject*> result;
|
||||||
|
|
||||||
for (std::vector<QString>::const_iterator s = features.begin(); s != features.end(); ++s)
|
for (std::vector<QString>::const_iterator s = features.begin(); s != features.end(); ++s)
|
||||||
result.push_back(App::GetApplication().getActiveDocument()->getObject(s->toAscii().data()));
|
result.push_back(App::GetApplication().getActiveDocument()->getObject(s->toLatin1().data()));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,7 +270,7 @@ void CmdRobotSetDefaultValues::activated(int iMsg)
|
||||||
QObject::tr("speed: (e.g. 1 m/s or 3 cm/s)"), QLineEdit::Normal,
|
QObject::tr("speed: (e.g. 1 m/s or 3 cm/s)"), QLineEdit::Normal,
|
||||||
QString::fromAscii("1 m/s"), &ok);
|
QString::fromAscii("1 m/s"), &ok);
|
||||||
if ( ok && !text.isEmpty() ) {
|
if ( ok && !text.isEmpty() ) {
|
||||||
doCommand(Doc,"_DefSpeed = '%s'",text.toAscii().constData());
|
doCommand(Doc,"_DefSpeed = '%s'",text.toLatin1().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList items;
|
QStringList items;
|
||||||
|
@ -279,7 +279,7 @@ void CmdRobotSetDefaultValues::activated(int iMsg)
|
||||||
QString item = QInputDialog::getItem(0, QObject::tr("set default continuity"),
|
QString item = QInputDialog::getItem(0, QObject::tr("set default continuity"),
|
||||||
QObject::tr("continuous ?"), items, 0, false, &ok);
|
QObject::tr("continuous ?"), items, 0, false, &ok);
|
||||||
if (ok && !item.isEmpty())
|
if (ok && !item.isEmpty())
|
||||||
doCommand(Doc,"_DefCont = %s",item.toAscii().constData());
|
doCommand(Doc,"_DefCont = %s",item.toLatin1().constData());
|
||||||
|
|
||||||
text.clear();
|
text.clear();
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ void CmdRobotSetDefaultValues::activated(int iMsg)
|
||||||
QObject::tr("acceleration: (e.g. 1 m/s^2 or 3 cm/s^2)"), QLineEdit::Normal,
|
QObject::tr("acceleration: (e.g. 1 m/s^2 or 3 cm/s^2)"), QLineEdit::Normal,
|
||||||
QString::fromAscii("1 m/s^2"), &ok);
|
QString::fromAscii("1 m/s^2"), &ok);
|
||||||
if ( ok && !text.isEmpty() ) {
|
if ( ok && !text.isEmpty() ) {
|
||||||
doCommand(Doc,"_DefAccelaration = '%s'",text.toAscii().constData());
|
doCommand(Doc,"_DefAccelaration = '%s'",text.toLatin1().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -568,7 +568,7 @@ void DrawSketchHandler::renderSuggestConstraintsCursor(std::vector<AutoConstrain
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!iconType.isEmpty()) {
|
if (!iconType.isEmpty()) {
|
||||||
QPixmap icon = Gui::BitmapFactory().pixmap(iconType.toAscii()).scaledToWidth(iconSize);
|
QPixmap icon = Gui::BitmapFactory().pixmap(iconType.toLatin1()).scaledToWidth(iconSize);
|
||||||
qp.drawPixmap(QPoint(baseIcon.width() + i * iconSize, baseIcon.height() - iconSize), icon);
|
qp.drawPixmap(QPoint(baseIcon.width() + i * iconSize, baseIcon.height() - iconSize), icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2817,7 +2817,7 @@ void ViewProviderSketch::drawMergedConstraintIcons(IconQueue iconQueue)
|
||||||
}
|
}
|
||||||
|
|
||||||
edit->combinedConstrBoxes[idString] = boundingBoxes;
|
edit->combinedConstrBoxes[idString] = boundingBoxes;
|
||||||
thisInfo->string.setValue(idString.toAscii().data());
|
thisInfo->string.setValue(idString.toLatin1().data());
|
||||||
sendConstraintIconToCoin(compositeIcon, thisDest);
|
sendConstraintIconToCoin(compositeIcon, thisDest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2835,7 +2835,7 @@ QImage ViewProviderSketch::renderConstrIcon(const QString &type,
|
||||||
// Constants to help create constraint icons
|
// Constants to help create constraint icons
|
||||||
QString joinStr = QString::fromAscii(", ");
|
QString joinStr = QString::fromAscii(", ");
|
||||||
|
|
||||||
QImage icon = Gui::BitmapFactory().pixmap(type.toAscii()).toImage();
|
QImage icon = Gui::BitmapFactory().pixmap(type.toLatin1()).toImage();
|
||||||
|
|
||||||
QFont font = QApplication::font();
|
QFont font = QApplication::font();
|
||||||
font.setPixelSize(11);
|
font.setPixelSize(11);
|
||||||
|
@ -2918,7 +2918,7 @@ void ViewProviderSketch::drawTypicalConstraintIcon(const constrIconQueueItem &i)
|
||||||
QList<QColor>() << color,
|
QList<QColor>() << color,
|
||||||
i.iconRotation);
|
i.iconRotation);
|
||||||
|
|
||||||
i.infoPtr->string.setValue(QString::number(i.constraintId).toAscii().data());
|
i.infoPtr->string.setValue(QString::number(i.constraintId).toLatin1().data());
|
||||||
sendConstraintIconToCoin(image, i.destination);
|
sendConstraintIconToCoin(image, i.destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ Py::Object UnitTestDialogPy::getUnitTest(const Py::Tuple& args)
|
||||||
{
|
{
|
||||||
if (!PyArg_ParseTuple(args.ptr(), ""))
|
if (!PyArg_ParseTuple(args.ptr(), ""))
|
||||||
throw Py::Exception();
|
throw Py::Exception();
|
||||||
return Py::String((const char*)UnitTestDialog::instance()->getUnitTest().toAscii());
|
return Py::String((const char*)UnitTestDialog::instance()->getUnitTest().toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
Py::Object UnitTestDialogPy::setStatusText(const Py::Tuple& args)
|
Py::Object UnitTestDialogPy::setStatusText(const Py::Tuple& args)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user