This commit is contained in:
mfeemster 2014-12-14 17:12:01 -08:00
parent c0f98bf632
commit a004f71888
3 changed files with 25 additions and 116 deletions

View File

@ -51,128 +51,36 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="widgetResizable"> <property name="widgetResizable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
<widget class="QWidget" name="GLParentScrollAreaContents"> <widget class="GLWidget" name="GLDisplay">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>926</width> <width>923</width>
<height>941</height> <height>942</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <sizepolicy hsizetype="Ignored" vsizetype="Ignored">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<widget class="GLWidget" name="GLDisplay" native="true"> <property name="minimumSize">
<property name="geometry"> <size>
<rect> <width>0</width>
<x>0</x> <height>0</height>
<y>0</y> </size>
<width>914</width> </property>
<height>824</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="baseSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="mouseTracking">
<bool>true</bool>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="acceptDrops">
<bool>true</bool>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
</widget>
</widget> </widget>
</widget> </widget>
<widget class="QMenuBar" name="menuBar"> <widget class="QMenuBar" name="menuBar">
@ -181,7 +89,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1214</width> <width>1214</width>
<height>20</height> <height>21</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="MenuFile"> <widget class="QMenu" name="MenuFile">
@ -474,8 +382,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>261</width> <width>259</width>
<height>845</height> <height>852</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_11"> <layout class="QGridLayout" name="gridLayout_11">
@ -581,8 +489,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>261</width> <width>259</width>
<height>845</height> <height>852</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
@ -2902,8 +2810,8 @@ SpinBox
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>247</width> <width>245</width>
<height>728</height> <height>747</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground"> <property name="autoFillBackground">
@ -5118,8 +5026,8 @@ SpinBox
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>98</width> <width>259</width>
<height>470</height> <height>853</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">

View File

@ -182,6 +182,7 @@ void GLWidget::initializeGL()
SetDimensions(w, h); SetDimensions(w, h);
m_Fractorium->m_WidthSpin->setValue(w); m_Fractorium->m_WidthSpin->setValue(w);
m_Fractorium->m_HeightSpin->setValue(h); m_Fractorium->m_HeightSpin->setValue(h);
//m_Fractorium->ui.GLParentScrollArea->setViewport(this);
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &m_MaxTexSize); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &m_MaxTexSize);
@ -739,7 +740,7 @@ void GLWidget::resizeEvent(QResizeEvent* e)
void GLWidget::SetDimensions(int w, int h) void GLWidget::SetDimensions(int w, int h)
{ {
setFixedSize(w, h); setFixedSize(w, h);
m_Fractorium->ui.GLParentScrollAreaContents->setFixedSize(w, h); //m_Fractorium->ui.GLParentScrollAreaContents->setFixedSize(w, h);
} }
/// <summary> /// <summary>

View File

@ -43,7 +43,7 @@ class GLWidget : public QGLWidget, protected QOpenGLFunctions_2_0//QOpenGLFuncti
#endif #endif
public: public:
GLWidget(QWidget* p); GLWidget(QWidget* p = nullptr);
~GLWidget(); ~GLWidget();
void DrawQuad(); void DrawQuad();
void SetMainWindow(Fractorium* f); void SetMainWindow(Fractorium* f);