improved syntax color scheme and added more icons

master
shaina7837 2014-09-14 20:20:54 +02:00 committed by Torsten Paul
parent 8e3b3e1919
commit 642407c241
26 changed files with 86 additions and 134 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/Preview-32 (1).png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/Preview-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/Zoom-In-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/Zoom-Out-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/animate.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

BIN
images/animate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/cross.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

BIN
images/crosswhite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/orthogonal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

BIN
images/orthogonalwhite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

BIN
images/perspective1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

BIN
images/surfaceWhite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/wireframeWhite.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

View File

@ -12,7 +12,6 @@
<file>images/axes.png</file>
<file>images/back.png</file>
<file>images/Document-New-128.png</file>
<file>images/down.png</file>
<file>images/front.png</file>
<file>images/grid.png</file>
<file>images/Open-128.png</file>
@ -28,13 +27,9 @@
<file>images/Rotation-32.png</file>
<file>images/Shape-Cube-32.png</file>
<file>images/Open-32.png</file>
<file>images/Open-32(1).png</file>
<file>images/Save-32.png</file>
<file>images/blackbottom.png</file>
<file>images/blackleft (copy).png</file>
<file>images/blackright (copy).png</file>
<file>images/blackright.png</file>
<file>images/blackright1.png</file>
<file>images/rightright.png</file>
<file>images/blackfront.png</file>
<file>images/blackback.png</file>
@ -43,5 +38,18 @@
<file>images/zoomout.png</file>
<file>images/wireframe1.png</file>
<file>images/surface.png</file>
<file>images/Zoom-In-32.png</file>
<file>images/Zoom-Out-32.png</file>
<file>images/surfaceWhite.png</file>
<file>images/wireframeWhite.png</file>
<file>images/orthogonal.png</file>
<file>images/cross.png</file>
<file>images/perspective1.png</file>
<file>images/Preview-32.png</file>
<file>images/animate.png</file>
<file>images/Preview-32 (1).png</file>
<file>images/orthogonalwhite.png</file>
<file>images/perspective1white.png</file>
<file>images/crosswhite.png</file>
</qresource>
</RCC>

View File

@ -2,39 +2,4 @@
EditorToolBar::EditorToolBar(QWidget *parent) :
QToolBar(parent)
{
int defaultColor = this->palette().background().color().lightness();
buttonNew = new QToolButton;
buttonOpen = new QToolButton;
buttonSave = new QToolButton;
buttonZoomIn = new QToolButton;
buttonZoomOut = new QToolButton;
if(defaultColor > 165)
{
buttonNew->setIcon(QIcon("://images/blackNew.png"));
buttonOpen->setIcon(QIcon("://images/Open-32(1).png"));
buttonSave->setIcon(QIcon("://images/Save-32.png"));
buttonZoomIn->setIcon(QIcon("://images/zoomin.png"));
buttonZoomOut->setIcon(QIcon("://images/zoomout.png"));
} else {
buttonNew->setIcon(QIcon("://images/Document-New-128.png"));
buttonOpen->setIcon(QIcon("://images/Open-128.png"));
buttonSave->setIcon(QIcon("://images/Save-128.png"));
}
buttonNew->setToolTip("New");
buttonOpen->setToolTip("Open");
buttonSave->setToolTip("Save");
buttonZoomIn->setToolTip("Zoom In");
buttonZoomOut->setToolTip("Zoom Out");
this->addWidget(buttonNew);
this->addWidget(buttonOpen);
this->addWidget(buttonSave);
this->addWidget(buttonZoomIn);
this->addWidget(buttonZoomOut);
}
{ }

View File

@ -9,8 +9,6 @@ class EditorToolBar : public QToolBar
Q_OBJECT
public:
explicit EditorToolBar(QWidget *parent = 0);
QToolButton *buttonNew, *buttonOpen, *buttonSave;
QToolButton *buttonZoomIn, *buttonZoomOut;
signals:

View File

@ -451,40 +451,87 @@ MainWindow::MainWindow(const QString &filename)
connect(this->replaceAllButton, SIGNAL(clicked()), this, SLOT(replaceAll()));
connect(this->replaceInputField, SIGNAL(returnPressed()), this->replaceButton, SLOT(animateClick()));
//EditorToolbar
connect(editortoolbar->buttonNew, SIGNAL(clicked()), this, SLOT(actionNew()));
connect(editortoolbar->buttonOpen, SIGNAL(clicked()), this, SLOT(actionOpen()));
connect(editortoolbar->buttonSave, SIGNAL(clicked()), this, SLOT(actionSave()));
connect(editortoolbar->buttonZoomIn, SIGNAL(clicked()), editor, SLOT(zoomIn()));
connect(editortoolbar->buttonZoomOut, SIGNAL(clicked()), editor, SLOT(zoomOut()));
//Toolbar
toolBar = new ToolBar(this);
verticalLayout_2->addWidget(toolBar);
int defaultcolor = toolBar->palette().background().color().lightness();
if(defaultcolor > 165){
fileActionNew->setIcon(QIcon("://images/blackNew.png"));
fileActionOpen->setIcon(QIcon("://images/Open-32(1).png"));
fileActionSave->setIcon(QIcon("://images/Save-32.png"));
editActionZoomIn->setIcon(QIcon("://images/zoomin.png"));
editActionZoomOut->setIcon(QIcon("://images/zoomout.png"));
designActionRender->setIcon(QIcon("://images/blackRender.png"));
viewActionShowAxes->setIcon(QIcon("://images/blackaxes.png"));
toolBar->addAction(viewActionShowAxes);
viewActionShowEdges->setIcon(QIcon("://images/Rotation-32.png"));
toolBar->addAction(viewActionShowEdges);
}
connect(toolBar->buttonRender, SIGNAL(clicked()), this, SLOT(actionRender()));
connect(toolBar->buttonTop, SIGNAL(clicked()), this, SLOT(viewAngleTop()));
connect(toolBar->buttonBottom, SIGNAL(clicked()), this, SLOT(viewAngleBottom()));
connect(toolBar->buttonLeft, SIGNAL(clicked()), this, SLOT(viewAngleLeft()));
connect(toolBar->buttonRight, SIGNAL(clicked()), this, SLOT(viewAngleRight()));
connect(toolBar->buttonFront, SIGNAL(clicked()), this, SLOT(viewAngleFront()));
connect(toolBar->buttonBack, SIGNAL(clicked()), this, SLOT(viewModeShowAxes()));
connect(toolBar->buttonZoomIn, SIGNAL(clicked()), qglview, SLOT(ZoomIn()));
connect(toolBar->buttonZoomOut, SIGNAL(clicked()), qglview, SLOT(ZoomOut()));
viewActionShowEdges->setIcon(QIcon("://images/Rotation-32.png"));
viewActionZoomIn->setIcon(QIcon("://images/zoomin.png"));
viewActionZoomOut->setIcon(QIcon("://images/zoomout.png"));
viewActionTop->setIcon(QIcon("://images/blackUp.png"));
viewActionBottom->setIcon(QIcon("://images/blackbottom.png"));
viewActionLeft->setIcon(QIcon("://images/blackleft (copy).png"));
viewActionRight->setIcon(QIcon("://images/rightright.png"));
viewActionFront->setIcon(QIcon("://images/blackfront.png"));
viewActionBack->setIcon(QIcon("://images/blackback.png"));
viewActionSurfaces->setIcon(QIcon("://images/surface.png"));
viewActionWireframe->setIcon(QIcon("://images/wireframe1.png"));
viewActionShowCrosshairs->setIcon(QIcon("://images/cross.png"));
viewActionPerspective->setIcon(QIcon("://images/perspective1.png"));
viewActionOrthogonal->setIcon(QIcon("://images/orthogonal.png"));
viewActionPreview->setIcon(QIcon("://images/Preview-32.png"));
viewActionAnimate->setIcon(QIcon("://images/animate.png"));
connect(toolBar->buttonSurface, SIGNAL(clicked()), this, SLOT(viewModeSurface()));
connect(toolBar->buttonWireframe, SIGNAL(clicked()), this, SLOT(viewModeWireframe()));
} else {
fileActionNew->setIcon(QIcon("://images/Document-New-128.png"));
fileActionOpen->setIcon(QIcon("://images/Open-128.png"));
fileActionSave->setIcon(QIcon("://images/Save-128.png"));
editActionZoomIn->setIcon(QIcon("://images/Zoom-In-32.png"));
editActionZoomOut->setIcon(QIcon("://images/Zoom-Out-32.png"));
designActionRender->setIcon(QIcon("://images/Arrowhead-Right-32.png"));
viewActionZoomIn->setIcon(QIcon("://images/Zoom-In-32.png"));
viewActionZoomOut->setIcon(QIcon("://images/Zoom-Out-32.png"));
viewActionShowAxes->setIcon(QIcon("://images/axes.png"));
viewActionShowEdges->setIcon(QIcon("://images/grid.png"));
viewActionTop->setIcon(QIcon("://images/up.png"));
viewActionBottom->setIcon(QIcon("://images/bottom.png"));
viewActionLeft->setIcon(QIcon("://images/left.png"));
viewActionRight->setIcon(QIcon("://images/right.png"));
viewActionFront->setIcon(QIcon("://images/front.png"));
viewActionBack->setIcon(QIcon("://images/back.png"));
viewActionSurfaces->setIcon(QIcon("://images/surfaceWhite.png"));
viewActionWireframe->setIcon(QIcon("://images/wireframeWhite.png"));
viewActionShowCrosshairs->setIcon(QIcon("://images/crosswhite.png"));
viewActionPreview->setIcon(QIcon("://images/Preview-32(1).png"));
viewActionPerspective->setIcon(QIcon("://images/perspective1white.png"));
viewActionOrthogonal->setIcon(QIcon("://images/orthogonalwhite.png"));
viewActionAnimate->setIcon(QIcon("://images/animate.png"));
}
editortoolbar->addAction(fileActionNew);
editortoolbar->addAction(fileActionOpen);
editortoolbar->addAction(fileActionSave);
editortoolbar->addAction(editActionZoomIn);
editortoolbar->addAction(editActionZoomOut);
editortoolbar->addAction(designActionRender);
toolBar->setStyleSheet("QToolBar{border:1 solid black;}" );
toolBar->addAction(viewActionPreview);
toolBar->addAction(viewActionSurfaces);
toolBar->addAction(viewActionWireframe);
toolBar->addAction(viewActionShowAxes);
toolBar->addAction(viewActionShowEdges);
toolBar->addAction(viewActionZoomIn);
toolBar->addAction(viewActionZoomOut);
toolBar->addAction(viewActionTop);
toolBar->addAction(viewActionBottom);
toolBar->addAction(viewActionLeft);
toolBar->addAction(viewActionRight);
toolBar->addAction(viewActionFront);
toolBar->addAction(viewActionBack);
toolBar->addAction(viewActionShowCrosshairs);
toolBar->addAction(viewActionPerspective);
toolBar->addAction(viewActionOrthogonal);
toolBar->addAction(viewActionAnimate);
toolBar->setStyleSheet("QToolBar{border:1 solid black;}" );
// make sure it looks nice..
QSettings settings;

View File

@ -3,67 +3,4 @@
ToolBar::ToolBar(QWidget *parent) :
QToolBar(parent)
{
int defaultColor = this->palette().background().color().lightness();
buttonRender = new QToolButton;
buttonTop = new QToolButton;
buttonBottom = new QToolButton;
buttonLeft = new QToolButton;
buttonRight = new QToolButton;
buttonFront = new QToolButton;
buttonBack = new QToolButton;
buttonZoomIn = new QToolButton;
buttonZoomOut = new QToolButton;
buttonWireframe = new QToolButton;
buttonSurface = new QToolButton;
if(defaultColor > 165)
{
buttonRender->setIcon(QIcon("://images/blackRender.png"));
buttonRender->setToolTip("Render");
buttonTop->setIcon(QIcon("://images/blackUp.png"));
buttonBottom->setIcon(QIcon("://images/blackbottom.png"));
buttonLeft->setIcon(QIcon("://images/blackleft (copy).png"));
buttonRight->setIcon(QIcon("://images/rightright.png"));
buttonFront->setIcon(QIcon("://images/blackfront.png"));
buttonBack->setIcon(QIcon("://images/blackback.png"));
buttonZoomIn->setIcon(QIcon("://images/zoomin.png"));
buttonZoomOut->setIcon(QIcon("://images/zoomout.png"));
buttonWireframe->setIcon(QIcon("://images/wireframe1.png"));
buttonSurface->setIcon(QIcon("://images/surface.png"));
} else {
buttonRender->setIcon(QIcon("://images/Arrowhead-Right-32.png"));
buttonTop->setIcon(QIcon("://images/up.png"));
buttonBottom->setIcon(QIcon("://images/bottom.png"));
buttonLeft->setIcon(QIcon("://images/left.png"));
buttonRight->setIcon(QIcon("://images/right.png"));
buttonFront->setIcon(QIcon("://images/front.png"));
buttonBack->setIcon(QIcon("://images/back.png"));
}
buttonRender->setToolTip("Render");
buttonTop->setToolTip("Top");
buttonBottom->setToolTip("Bottom");
buttonLeft->setToolTip("Left");
buttonRight->setToolTip("Right");
buttonFront->setToolTip("Front");
buttonBack->setToolTip("Back");
buttonZoomIn->setToolTip("Zoom in");
buttonZoomOut->setToolTip("Zoom out");
buttonWireframe->setToolTip("Wireframe");
buttonSurface->setToolTip("Surfaces");
this->addWidget(buttonRender);
this->addSeparator();
this->addWidget(buttonTop);
this->addWidget(buttonBottom);
this->addWidget(buttonLeft);
this->addWidget(buttonRight);
this->addWidget(buttonFront);
this->addWidget(buttonBack);
this->addWidget(buttonZoomIn);
this->addWidget(buttonZoomOut);
this->addWidget(buttonWireframe);
this->addWidget(buttonSurface);
}

View File

@ -9,9 +9,6 @@ class ToolBar : public QToolBar
Q_OBJECT
public:
explicit ToolBar(QWidget *parent = 0);
QToolButton *buttonZoomIn, *buttonZoomOut, *buttonRender;
QToolButton *buttonTop, *buttonBottom, *buttonLeft, *buttonRight;
QToolButton *buttonFront, *buttonBack, *buttonWireframe, *buttonSurface;
signals: