Several fixes related to refs #304

* removed #include <QtDesigner/QDesignerExportWidget>
* correct targets swiftcore / swiftgui
* Annotated possible error of QFontDialog / style sheet compliance
+ Set sizePolicy to preferred due to RWs rewiew ("over sized drawing")
This commit is contained in:
Klaus Basan
2014-08-04 02:21:41 +02:00
parent a7bb0f2e22
commit cb350d9086
8 changed files with 83 additions and 16 deletions

View File

@@ -10,6 +10,12 @@
<height>477</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>TabWidget</string>
</property>

View File

@@ -42,8 +42,8 @@
<widget class="BlackGui::CDockWidgetInfoArea" name="dw_Aircrafts">
<property name="minimumSize">
<size>
<width>149</width>
<height>80</height>
<width>127</width>
<height>38</height>
</size>
</property>
<property name="features">
@@ -83,6 +83,12 @@
</property>
<item>
<widget class="BlackGui::Components::CAircraftComponent" name="comp_Aircrafts">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
@@ -138,6 +144,12 @@
</property>
<item>
<widget class="BlackGui::Components::CAtcStationComponent" name="comp_AtcStations">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
@@ -177,7 +189,14 @@
<number>0</number>
</property>
<item>
<widget class="BlackGui::Components::CUserComponent" name="comp_Users"/>
<widget class="BlackGui::Components::CUserComponent" name="comp_Users">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
@@ -210,7 +229,14 @@
<number>0</number>
</property>
<item>
<widget class="BlackGui::Components::CTextMessageComponent" name="comp_TextMessages"/>
<widget class="BlackGui::Components::CTextMessageComponent" name="comp_TextMessages">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
@@ -243,7 +269,14 @@
<number>0</number>
</property>
<item>
<widget class="BlackGui::Components::CSimulatorComponent" name="comp_Simulator"/>
<widget class="BlackGui::Components::CSimulatorComponent" name="comp_Simulator">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
@@ -276,7 +309,14 @@
<number>0</number>
</property>
<item>
<widget class="BlackGui::Components::CFlightPlanComponent" name="comp_FlightPlan"/>
<widget class="BlackGui::Components::CFlightPlanComponent" name="comp_FlightPlan">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
@@ -352,7 +392,14 @@
<number>0</number>
</property>
<item>
<widget class="QTabWidget" name="comp_Mappings"/>
<widget class="QTabWidget" name="comp_Mappings">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
@@ -425,7 +472,14 @@
<number>0</number>
</property>
<item>
<widget class="BlackGui::Components::CSettingsComponent" name="comp_Settings"/>
<widget class="BlackGui::Components::CSettingsComponent" name="comp_Settings">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>

View File

@@ -6,19 +6,25 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<width>300</width>
<height>323</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>TabWidget</string>
<string>Settings</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tb_SettingsTrafficNetwork">
<attribute name="title">
<string>Traffic Network</string>
<string>Network</string>
</attribute>
<layout class="QVBoxLayout" name="vl_SettingsTrafficNetwork">
<property name="spacing">

View File

@@ -100,6 +100,7 @@ namespace BlackGui
void CDockWidget::paintEvent(QPaintEvent *event)
{
// KB: Should give me style sheet compliance, however I did not notice any difference
// included for style sheet compliance
// QStyleOption opt;
// opt.init(this);

View File

@@ -21,7 +21,6 @@
#include <Qt>
#include <QWidget>
#include <QtDesigner/QDesignerExportWidget>
class QColor;
class QSvgRenderer;

View File

@@ -5,7 +5,7 @@ include (../../build.pri)
QT += core dbus network xml multimedia gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = sample_blackcore
TARGET = swiftcore
TEMPLATE = app
CONFIG += console

View File

@@ -49,13 +49,14 @@ void MainWindow::ps_onMenuClicked()
}
else if (sender == this->ui->menu_FileFont)
{
// KB: There seems to be a bug with the font Dialog (Win 7/32), it only works once
// Then the font cannot be changed anymore
bool ok = false;
QFont font = QFontDialog::getFont(&ok, this->font(), this, "Application fonts", QFontDialog::ProportionalFonts);
qDebug() << font.toString();
if (ok)
{
// the user clicked OK and font is set to the font the user selected
// this->setFont(font);
this->setFont(font);
CStyleSheetUtility::instance().updateFonts(font);
}
else

View File

@@ -4,7 +4,7 @@ include (../../build.pri)
QT += core dbus gui svg network xml multimedia
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = sample_blackgui
TARGET = swiftgui_std
TEMPLATE = app
SOURCES += *.cpp