Added toolbars in Designer, make search panel appear below toolbar

master
shaina7837 2014-09-14 20:26:31 +02:00 committed by Torsten Paul
parent 3fd08be98e
commit 56ebdd92f1
3 changed files with 43 additions and 73 deletions

View File

@ -9,8 +9,6 @@
#include "Tree.h" #include "Tree.h"
#include "memory.h" #include "memory.h"
#include "editor.h" #include "editor.h"
#include "editortoolbar.h"
#include "toolbar.h"
#include <vector> #include <vector>
#include <QMutex> #include <QMutex>
#include <QSet> #include <QSet>
@ -113,8 +111,6 @@ private:
void setDockWidgetTitle(QDockWidget *dockWidget, QString prefix, bool topLevel); void setDockWidgetTitle(QDockWidget *dockWidget, QString prefix, bool topLevel);
EditorInterface *editor; EditorInterface *editor;
EditorToolBar *editortoolbar;
ToolBar *toolBar;
class QMessageBox *openglbox; class QMessageBox *openglbox;
class FontListDialog *font_list_dialog; class FontListDialog *font_list_dialog;

View File

@ -15,16 +15,7 @@
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
@ -35,20 +26,11 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="topMargin"> <property name="margin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
@ -67,7 +49,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item alignment="Qt::AlignBottom"> <item>
<widget class="QFrame" name="animate_panel"> <widget class="QFrame" name="animate_panel">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@ -82,16 +64,7 @@
<number>0</number> <number>0</number>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayoutAnimate"> <layout class="QHBoxLayout" name="horizontalLayoutAnimate">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
@ -134,9 +107,13 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="ToolBar" name="toolBar" native="true"/>
</item>
</layout> </layout>
<zorder>animate_panel</zorder> <zorder>animate_panel</zorder>
<zorder>qglview</zorder> <zorder>qglview</zorder>
<zorder>toolBar</zorder>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -147,7 +124,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>936</width> <width>936</width>
<height>25</height> <height>22</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menu_File"> <widget class="QMenu" name="menu_File">
@ -297,20 +274,17 @@
<number>1</number> <number>1</number>
</attribute> </attribute>
<widget class="QWidget" name="editorDockContents"> <widget class="QWidget" name="editorDockContents">
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="topMargin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <item>
<number>0</number> <widget class="EditorToolBar" name="editortoolbar" native="true"/>
</property> </item>
<property name="bottomMargin"> <item>
<number>0</number>
</property>
<item alignment="Qt::AlignTop">
<widget class="QFrame" name="find_panel"> <widget class="QFrame" name="find_panel">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@ -415,16 +389,7 @@
</attribute> </attribute>
<widget class="QWidget" name="consoleDockContents"> <widget class="QWidget" name="consoleDockContents">
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
@ -442,7 +407,7 @@
</widget> </widget>
<action name="fileActionNew"> <action name="fileActionNew">
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/Document-New-128.png</normaloff>:/Document-New-128.png</iconset> <normaloff>:/Document-New-128.png</normaloff>:/Document-New-128.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -454,7 +419,7 @@
</action> </action>
<action name="fileActionOpen"> <action name="fileActionOpen">
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/Open-128.png</normaloff>:/Open-128.png</iconset> <normaloff>:/Open-128.png</normaloff>:/Open-128.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -466,7 +431,7 @@
</action> </action>
<action name="fileActionSave"> <action name="fileActionSave">
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/Save-128.png</normaloff>:/Save-128.png</iconset> <normaloff>:/Save-128.png</normaloff>:/Save-128.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -642,7 +607,7 @@
</action> </action>
<action name="designActionRender"> <action name="designActionRender">
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/Arrowhead-Right-32.png</normaloff>:/Arrowhead-Right-32.png</iconset> <normaloff>:/Arrowhead-Right-32.png</normaloff>:/Arrowhead-Right-32.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -731,7 +696,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/grid.png</normaloff>:/grid.png</iconset> <normaloff>:/grid.png</normaloff>:/grid.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -746,7 +711,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/axes.png</normaloff>:/axes.png</iconset> <normaloff>:/axes.png</normaloff>:/axes.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -777,7 +742,7 @@
</action> </action>
<action name="viewActionTop"> <action name="viewActionTop">
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/up.png</normaloff>:/up.png</iconset> <normaloff>:/up.png</normaloff>:/up.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -789,7 +754,7 @@
</action> </action>
<action name="viewActionBottom"> <action name="viewActionBottom">
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/bottom.png</normaloff>:/bottom.png</iconset> <normaloff>:/bottom.png</normaloff>:/bottom.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -801,7 +766,7 @@
</action> </action>
<action name="viewActionLeft"> <action name="viewActionLeft">
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/left.png</normaloff>:/left.png</iconset> <normaloff>:/left.png</normaloff>:/left.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -813,7 +778,7 @@
</action> </action>
<action name="viewActionRight"> <action name="viewActionRight">
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/right.png</normaloff>:/right.png</iconset> <normaloff>:/right.png</normaloff>:/right.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -825,7 +790,7 @@
</action> </action>
<action name="viewActionFront"> <action name="viewActionFront">
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/front.png</normaloff>:/front.png</iconset> <normaloff>:/front.png</normaloff>:/front.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -837,7 +802,7 @@
</action> </action>
<action name="viewActionBack"> <action name="viewActionBack">
<property name="icon"> <property name="icon">
<iconset resource="../openscad.qrc"> <iconset>
<normaloff>:/back.png</normaloff>:/back.png</iconset> <normaloff>:/back.png</normaloff>:/back.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -1063,6 +1028,18 @@
<header>QGLView.h</header> <header>QGLView.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>EditorToolBar</class>
<extends>QWidget</extends>
<header>editortoolbar.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ToolBar</class>
<extends>QWidget</extends>
<header>toolbar.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
<connections> <connections>

View File

@ -171,8 +171,7 @@ MainWindow::MainWindow(const QString &filename)
{ {
setupUi(this); setupUi(this);
editortype = Preferences::inst()->getValue("editor/editortype").toString(); editortype = Preferences::inst()->getValue("editor/editortype").toString();
useScintilla = (editortype == "QScintilla Editor"); useScintilla = (editortype == "QScintilla Editor");
#ifdef USE_SCINTILLA_EDITOR #ifdef USE_SCINTILLA_EDITOR
@ -452,8 +451,6 @@ MainWindow::MainWindow(const QString &filename)
connect(this->replaceInputField, SIGNAL(returnPressed()), this->replaceButton, SLOT(animateClick())); connect(this->replaceInputField, SIGNAL(returnPressed()), this->replaceButton, SLOT(animateClick()));
//Toolbar //Toolbar
toolBar = new ToolBar(this);
verticalLayout_2->addWidget(toolBar);
int defaultcolor = toolBar->palette().background().color().lightness(); int defaultcolor = toolBar->palette().background().color().lightness();
if(defaultcolor > 165){ if(defaultcolor > 165){