Theme Editor: Overhauled main window toolbar

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27697 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Bieber 2010-08-04 17:56:00 +00:00
parent bcf51beee7
commit c216100f84
12 changed files with 78 additions and 17 deletions

View file

@ -207,6 +207,24 @@ void EditorWindow::setupUI()
void EditorWindow::setupMenus() void EditorWindow::setupMenus()
{ {
/* Adding actions to the toolbar */
ui->toolBar->addAction(ui->actionNew_Document);
ui->toolBar->addAction(ui->actionOpen_Document);
ui->toolBar->addAction(ui->actionSave_Document);
ui->toolBar->addAction(ui->actionSave_Document_As);
ui->toolBar->addSeparator();
ui->toolBar->addAction(ui->actionUndo);
ui->toolBar->addAction(ui->actionRedo);
ui->toolBar->addSeparator();
ui->toolBar->addAction(ui->actionCut);
ui->toolBar->addAction(ui->actionCopy);
ui->toolBar->addAction(ui->actionPaste);
ui->toolBar->addSeparator();
ui->toolBar->addAction(ui->actionFind_Replace);
/* Connecting panel show actions */ /* Connecting panel show actions */
QObject::connect(ui->actionFile_Panel, SIGNAL(triggered()), QObject::connect(ui->actionFile_Panel, SIGNAL(triggered()),
this, SLOT(showPanel())); this, SLOT(showPanel()));
@ -224,8 +242,6 @@ void EditorWindow::setupMenus()
this, SLOT(newTab())); this, SLOT(newTab()));
QObject::connect(ui->actionNew_Project, SIGNAL(triggered()), QObject::connect(ui->actionNew_Project, SIGNAL(triggered()),
this, SLOT(newProject())); this, SLOT(newProject()));
QObject::connect(ui->actionToolbarNew, SIGNAL(triggered()),
this, SLOT(newTab()));
QObject::connect(ui->actionClose_Document, SIGNAL(triggered()), QObject::connect(ui->actionClose_Document, SIGNAL(triggered()),
this, SLOT(closeCurrent())); this, SLOT(closeCurrent()));
@ -236,15 +252,11 @@ void EditorWindow::setupMenus()
this, SLOT(saveCurrent())); this, SLOT(saveCurrent()));
QObject::connect(ui->actionSave_Document_As, SIGNAL(triggered()), QObject::connect(ui->actionSave_Document_As, SIGNAL(triggered()),
this, SLOT(saveCurrentAs())); this, SLOT(saveCurrentAs()));
QObject::connect(ui->actionToolbarSave, SIGNAL(triggered()),
this, SLOT(saveCurrent()));
QObject::connect(ui->actionExport_Project, SIGNAL(triggered()), QObject::connect(ui->actionExport_Project, SIGNAL(triggered()),
this, SLOT(exportProject())); this, SLOT(exportProject()));
QObject::connect(ui->actionOpen_Document, SIGNAL(triggered()), QObject::connect(ui->actionOpen_Document, SIGNAL(triggered()),
this, SLOT(openFile())); this, SLOT(openFile()));
QObject::connect(ui->actionToolbarOpen, SIGNAL(triggered()),
this, SLOT(openFile()));
QObject::connect(ui->actionOpen_Project, SIGNAL(triggered()), QObject::connect(ui->actionOpen_Project, SIGNAL(triggered()),
this, SLOT(openProject())); this, SLOT(openProject()));
@ -409,7 +421,6 @@ void EditorWindow::shiftTab(int index)
ui->actionSave_Document->setEnabled(false); ui->actionSave_Document->setEnabled(false);
ui->actionSave_Document_As->setEnabled(false); ui->actionSave_Document_As->setEnabled(false);
ui->actionClose_Document->setEnabled(false); ui->actionClose_Document->setEnabled(false);
ui->actionToolbarSave->setEnabled(false);
ui->fromTree->setEnabled(false); ui->fromTree->setEnabled(false);
ui->actionUndo->setEnabled(false); ui->actionUndo->setEnabled(false);
ui->actionRedo->setEnabled(false); ui->actionRedo->setEnabled(false);
@ -424,7 +435,6 @@ void EditorWindow::shiftTab(int index)
ui->actionSave_Document->setEnabled(true); ui->actionSave_Document->setEnabled(true);
ui->actionSave_Document_As->setEnabled(true); ui->actionSave_Document_As->setEnabled(true);
ui->actionClose_Document->setEnabled(true); ui->actionClose_Document->setEnabled(true);
ui->actionToolbarSave->setEnabled(true);
ui->actionUndo->setEnabled(false); ui->actionUndo->setEnabled(false);
ui->actionRedo->setEnabled(false); ui->actionRedo->setEnabled(false);
ui->actionCut->setEnabled(false); ui->actionCut->setEnabled(false);
@ -443,7 +453,6 @@ void EditorWindow::shiftTab(int index)
ui->actionSave_Document->setEnabled(true); ui->actionSave_Document->setEnabled(true);
ui->actionSave_Document_As->setEnabled(true); ui->actionSave_Document_As->setEnabled(true);
ui->actionClose_Document->setEnabled(true); ui->actionClose_Document->setEnabled(true);
ui->actionToolbarSave->setEnabled(true);
ui->fromTree->setEnabled(true); ui->fromTree->setEnabled(true);
ui->actionUndo->setEnabled(true); ui->actionUndo->setEnabled(true);

View file

@ -129,9 +129,6 @@
<attribute name="toolBarBreak"> <attribute name="toolBarBreak">
<bool>false</bool> <bool>false</bool>
</attribute> </attribute>
<addaction name="actionToolbarNew"/>
<addaction name="actionToolbarOpen"/>
<addaction name="actionToolbarSave"/>
</widget> </widget>
<widget class="QDockWidget" name="projectDock"> <widget class="QDockWidget" name="projectDock">
<property name="windowTitle"> <property name="windowTitle">
@ -230,6 +227,10 @@
</property> </property>
</action> </action>
<action name="actionNew_Document"> <action name="actionNew_Document">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/resources/document-new.png</normaloff>:/resources/resources/document-new.png</iconset>
</property>
<property name="text"> <property name="text">
<string>&amp;New Document</string> <string>&amp;New Document</string>
</property> </property>
@ -238,6 +239,10 @@
</property> </property>
</action> </action>
<action name="actionOpen_Document"> <action name="actionOpen_Document">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/resources/document-open.png</normaloff>:/resources/resources/document-open.png</iconset>
</property>
<property name="text"> <property name="text">
<string>&amp;Open Document</string> <string>&amp;Open Document</string>
</property> </property>
@ -249,6 +254,10 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/resources/document-save.png</normaloff>:/resources/resources/document-save.png</iconset>
</property>
<property name="text"> <property name="text">
<string>&amp;Save Document</string> <string>&amp;Save Document</string>
</property> </property>
@ -271,6 +280,10 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/resources/document-save-as.png</normaloff>:/resources/resources/document-save-as.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Save Document &amp;As</string> <string>Save Document &amp;As</string>
</property> </property>
@ -334,6 +347,10 @@
</property> </property>
</action> </action>
<action name="actionUndo"> <action name="actionUndo">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/resources/edit-undo.png</normaloff>:/resources/resources/edit-undo.png</iconset>
</property>
<property name="text"> <property name="text">
<string>&amp;Undo</string> <string>&amp;Undo</string>
</property> </property>
@ -342,6 +359,10 @@
</property> </property>
</action> </action>
<action name="actionRedo"> <action name="actionRedo">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/resources/edit-redo.png</normaloff>:/resources/resources/edit-redo.png</iconset>
</property>
<property name="text"> <property name="text">
<string>&amp;Redo</string> <string>&amp;Redo</string>
</property> </property>
@ -350,6 +371,10 @@
</property> </property>
</action> </action>
<action name="actionCut"> <action name="actionCut">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/resources/edit-cut.png</normaloff>:/resources/resources/edit-cut.png</iconset>
</property>
<property name="text"> <property name="text">
<string>C&amp;ut</string> <string>C&amp;ut</string>
</property> </property>
@ -358,6 +383,10 @@
</property> </property>
</action> </action>
<action name="actionCopy"> <action name="actionCopy">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/resources/edit-copy.png</normaloff>:/resources/resources/edit-copy.png</iconset>
</property>
<property name="text"> <property name="text">
<string>&amp;Copy</string> <string>&amp;Copy</string>
</property> </property>
@ -366,6 +395,10 @@
</property> </property>
</action> </action>
<action name="actionPaste"> <action name="actionPaste">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/resources/edit-paste.png</normaloff>:/resources/resources/edit-paste.png</iconset>
</property>
<property name="text"> <property name="text">
<string>&amp;Paste</string> <string>&amp;Paste</string>
</property> </property>
@ -374,6 +407,10 @@
</property> </property>
</action> </action>
<action name="actionFind_Replace"> <action name="actionFind_Replace">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/resources/resources/edit-find-replace.png</normaloff>:/resources/resources/edit-find-replace.png</iconset>
</property>
<property name="text"> <property name="text">
<string>&amp;Find/Replace</string> <string>&amp;Find/Replace</string>
</property> </property>

View file

@ -16,6 +16,13 @@
<file>resources/cursor.png</file> <file>resources/cursor.png</file>
<file>resources/lines.png</file> <file>resources/lines.png</file>
<file alias="tagdb">resources/tagdb</file> <file alias="tagdb">resources/tagdb</file>
<file>resources/document-save-as.png</file>
<file>resources/edit-redo.png</file>
<file>resources/edit-undo.png</file>
<file>resources/edit-copy.png</file>
<file>resources/edit-cut.png</file>
<file>resources/edit-paste.png</file>
<file>resources/edit-find-replace.png</file>
</qresource> </qresource>
<qresource prefix="/render"> <qresource prefix="/render">
<file alias="scenebg.png">resources/render/scenebg.png</file> <file alias="scenebg.png">resources/render/scenebg.png</file>

View file

@ -1,7 +1,8 @@
The files ffwd.png, rwnd.png, play.png, pause.png, document-new.png, The files edit-cut.png, edit-copy.png, edit-paste.png, edit-find-replace.png,
document-open.png, and document-save.png came from edit-undo.png, edit-redo.png, ffwd.png, rwnd.png, play.png, pause.png,
the Tango Desktop Project (http://www.tango.freedesktop.org) and are in document-new.png, document-open.png, document-save-as.png, and document-save.png
the public domain. came from the Tango Desktop Project (http://www.tango.freedesktop.org) and are
in the public domain.
The files zoomin.png, zoomout.png, and zoomeven.png came from the Tango Project The files zoomin.png, zoomout.png, and zoomeven.png came from the Tango Project
with modifications by Robert Bieber, also in the public domain. with modifications by Robert Bieber, also in the public domain.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -175,7 +175,14 @@ OTHER_FILES += README \
quazip/README.ROCKBOX \ quazip/README.ROCKBOX \
quazip/LICENSE.GPL \ quazip/LICENSE.GPL \
qtfindreplacedialog/dialogs.pro \ qtfindreplacedialog/dialogs.pro \
resources/tagdb resources/tagdb \
resources/document-save-as.png \
resources/edit-undo.png \
resources/edit-redo.png \
resources/edit-paste.png \
resources/edit-cut.png \
resources/edit-copy.png \
resources/edit-find-replace.png
FORMS += gui/editorwindow.ui \ FORMS += gui/editorwindow.ui \
gui/preferencesdialog.ui \ gui/preferencesdialog.ui \
gui/configdocument.ui \ gui/configdocument.ui \