|
From: <dhu...@us...> - 2007-01-23 21:41:43
|
Revision: 241
http://svn.sourceforge.net/qcell/?rev=241&view=rev
Author: dhubleizh
Date: 2007-01-23 13:41:37 -0800 (Tue, 23 Jan 2007)
Log Message:
-----------
- geez - how can one torture onself in such way?? Why count dimensions and place widgets manually by pixel?? geez - tried to fix that
- basetools partially placed in QDockWidget
- this GUI needs A LOT of work
Modified Paths:
--------------
trunk/qcell/baseheaders/basetools.ui
trunk/qcell/baseheaders/simulationwindow.h
trunk/qcell/basesources/simulationwindow.cpp
trunk/qcell/visgui/MainWindow.h
Modified: trunk/qcell/baseheaders/basetools.ui
===================================================================
--- trunk/qcell/baseheaders/basetools.ui 2007-01-23 21:07:21 UTC (rev 240)
+++ trunk/qcell/baseheaders/basetools.ui 2007-01-23 21:41:37 UTC (rev 241)
@@ -8,184 +8,207 @@
<rect>
<x>0</x>
<y>0</y>
- <width>115</width>
- <height>375</height>
+ <width>150</width>
+ <height>503</height>
</rect>
</property>
<property name="windowTitle" >
<string>BaseTools</string>
</property>
- <widget class="QGroupBox" name="EditToolsGroup" >
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>140</y>
- <width>113</width>
- <height>91</height>
- </rect>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
</property>
- <property name="title" >
- <string>Edit Tools</string>
+ <property name="spacing" >
+ <number>6</number>
</property>
- <widget class="QToolButton" name="PasteButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>40</y>
- <width>91</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text" >
- <string>Paste</string>
- </property>
- </widget>
- <widget class="QToolButton" name="FillButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>60</y>
- <width>91</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text" >
- <string>Fill</string>
- </property>
- </widget>
- <widget class="QToolButton" name="CopyButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>20</y>
- <width>91</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text" >
- <string>Copy</string>
- </property>
- </widget>
- </widget>
- <widget class="QGroupBox" name="EditModeGroup" >
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>70</y>
- <width>113</width>
- <height>71</height>
- </rect>
- </property>
- <property name="title" >
- <string>Edit Mode</string>
- </property>
- <widget class="QToolButton" name="ModeEditButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>40</y>
- <width>91</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text" >
- <string>Edit</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QToolButton" name="ModeSelectButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>20</y>
- <width>91</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text" >
- <string>Select</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- <property name="checked" >
- <bool>true</bool>
- </property>
- </widget>
- </widget>
- <widget class="QGroupBox" name="ValuesGroup" >
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>240</y>
- <width>113</width>
- <height>131</height>
- </rect>
- </property>
- <property name="title" >
- <string>Values</string>
- </property>
- <widget class="QTableWidget" name="valueTable" >
- <property name="geometry" >
- <rect>
- <x>5</x>
- <y>20</y>
- <width>101</width>
- <height>101</height>
- </rect>
- </property>
- </widget>
- </widget>
- <widget class="QGroupBox" name="ViewModeGroup" >
- <property name="geometry" >
- <rect>
- <x>1</x>
- <y>0</y>
- <width>113</width>
- <height>71</height>
- </rect>
- </property>
- <property name="title" >
- <string>View Mode</string>
- </property>
- <widget class="QToolButton" name="LocalViewButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>40</y>
- <width>91</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text" >
- <string>Local</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QToolButton" name="GlobalVievButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>20</y>
- <width>91</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text" >
- <string>Global</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- <property name="checked" >
- <bool>true</bool>
- </property>
- </widget>
- </widget>
+ <item>
+ <widget class="QGroupBox" name="ViewModeGroup" >
+ <property name="title" >
+ <string>View Mode</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QToolButton" name="GlobalVievButton" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Global</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="LocalViewButton" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Local</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="EditModeGroup" >
+ <property name="title" >
+ <string>Edit Mode</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QToolButton" name="ModeSelectButton" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Select</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="ModeEditButton" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Edit</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="EditToolsGroup" >
+ <property name="title" >
+ <string>Edit Tools</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QToolButton" name="CopyButton" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Copy</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="PasteButton" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Paste</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="FillButton" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Fill</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="ValuesGroup" >
+ <property name="title" >
+ <string>Values</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QTableWidget" name="valueTable" />
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<resources/>
Modified: trunk/qcell/baseheaders/simulationwindow.h
===================================================================
--- trunk/qcell/baseheaders/simulationwindow.h 2007-01-23 21:07:21 UTC (rev 240)
+++ trunk/qcell/baseheaders/simulationwindow.h 2007-01-23 21:41:37 UTC (rev 241)
@@ -19,6 +19,7 @@
#include "view2dtexttools.h"
#include "view1dtexttools.h"
#include "math.h"
+#include "MainWindow.h"
//************** test *****************
#include "functiontable.h"
Modified: trunk/qcell/basesources/simulationwindow.cpp
===================================================================
--- trunk/qcell/basesources/simulationwindow.cpp 2007-01-23 21:07:21 UTC (rev 240)
+++ trunk/qcell/basesources/simulationwindow.cpp 2007-01-23 21:41:37 UTC (rev 241)
@@ -100,10 +100,10 @@
symbolTable->move(0, 35);
symbolTable->resize(ui.symbolConfig->width() - 7, ui.symbolConfig->height() -42);
- basetools->move(width() - 116, 0);
- view3DTools->move(width() - 116, basetools->height() + 1);
- view2DTextTools->move(width() - 116, basetools->height() + 1);
- view1DTextTools->move(width() - 116, basetools->height() + 1);
+// basetools->move(width() - 116, 0);
+// view3DTools->move(width() - 116, basetools->height() + 1);
+// view2DTextTools->move(width() - 116, basetools->height() + 1);
+// view1DTextTools->move(width() - 116, basetools->height() + 1);
ft->resize(ui.functionTab->width() - 10 , ui.functionTab->height() - 10);
}
@@ -626,10 +626,22 @@
table2DUpdateRequest = 0;
table1DUpdateRequest = 0;
- basetools = new BaseTools(this);
+ basetools = new BaseTools(parent);
basetools->getValueTablePointer()->setColumnCount(1);
basetools->getValueTablePointer()->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Value")));
+ // Let's make that basic tools widget into QDockWidget
+ QDockWidget* dw = new QDockWidget(parent);
+ dw->setWidget(basetools);
+// dw->hide();
+ dw->setWindowTitle(tr("Base tools"));
+ ((MainWindow*)parent)->addDockWidget(Qt::RightDockWidgetArea, dw);
+
+ // Let's make it accessible from the `View' menu
+ QAction* bt_action = dw->toggleViewAction();
+ bt_action->setText("&" + dw->windowTitle());
+ ((Ui_MainWindow*)parent)->menu_View->addAction(bt_action);
+
selectedSymbol = 0;
workMode = 0;
Modified: trunk/qcell/visgui/MainWindow.h
===================================================================
--- trunk/qcell/visgui/MainWindow.h 2007-01-23 21:07:21 UTC (rev 240)
+++ trunk/qcell/visgui/MainWindow.h 2007-01-23 21:41:37 UTC (rev 241)
@@ -34,6 +34,8 @@
typedef QString (*parser_fun)(QByteArray content, QString type, QString subtype);
+class simulationWindow;
+
class MainWindow : public QMainWindow, private Ui::MainWindow
{
Q_OBJECT
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|