1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

Merge branch 'pt/CC3D_Release' of ssh://git.openpilot.org/OpenPilot into pt/CC3D_Release

This commit is contained in:
PT_Dreamer 2012-08-16 19:39:07 +01:00
commit af61e983b8
2 changed files with 28 additions and 13 deletions

View File

@ -6,14 +6,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>867</width>
<height>598</height>
<width>920</width>
<height>626</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<property name="bottomMargin">
<number>12</number>
</property>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
@ -28,7 +31,7 @@
<number>12</number>
</property>
<property name="topMargin">
<number>0</number>
<number>12</number>
</property>
<property name="rightMargin">
<number>12</number>
@ -128,8 +131,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>813</width>
<height>491</height>
<width>866</width>
<height>507</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@ -2745,8 +2748,8 @@ margin:1px;</string>
<rect>
<x>0</x>
<y>0</y>
<width>813</width>
<height>455</height>
<width>866</width>
<height>483</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_18">
@ -3190,18 +3193,18 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
<customwidgets>
<customwidget>
<class>ConfigCcpmWidget</class>
<extends>QWidget</extends>
<header>cfg_vehicletypes/configccpmwidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>MixerCurve</class>
<extends>QWidget</extends>
<header location="global">mixercurve.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ConfigCcpmWidget</class>
<extends>QWidget</extends>
<header>cfg_vehicletypes/configccpmwidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="../coreplugin/core.qrc"/>

View File

@ -272,10 +272,17 @@ void MainWindow::extensionsInitialized()
if ( ! qs->allKeys().count() ){
importSettings * dialog=new importSettings(this);
QDir directory(QCoreApplication::applicationDirPath());
#ifdef Q_OS_MAC
directory.cdUp();
directory.cd("Resources");
#else
directory.cdUp();
directory.cd("share");
directory.cd("openpilotgcs");
#endif
directory.cd("default_configurations");
qDebug() << "Looking for default config files in: " + directory.absolutePath();
dialog->loadFiles(directory.absolutePath());
dialog->exec();
settings=new QSettings(dialog->choosenConfig(), XmlConfig::XmlSettingsFormat);
@ -302,9 +309,14 @@ void MainWindow::extensionsInitialized()
void MainWindow::loadStyleSheet(QString name) {
/* Let's use QFile and point to a resource... */
QDir directory(QCoreApplication::applicationDirPath());
#ifdef Q_OS_MAC
directory.cdUp();
directory.cd("Resources");
#else
directory.cdUp();
directory.cd("share");
directory.cd("openpilotgcs");
#endif
directory.cd("stylesheets");
#ifdef Q_OS_MAC
QFile data(directory.absolutePath()+QDir::separator()+name+"_macos.qss");