[qet] [1638] TBT editor: added toolbars |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 1638
Author: xavier
Date: 2012-04-08 22:51:46 +0200 (Sun, 08 Apr 2012)
Log Message:
-----------
TBT editor: added toolbars
Modified Paths:
--------------
branches/0.3/sources/titleblock/qettemplateeditor.cpp
branches/0.3/sources/titleblock/qettemplateeditor.h
Modified: branches/0.3/sources/titleblock/qettemplateeditor.cpp
===================================================================
--- branches/0.3/sources/titleblock/qettemplateeditor.cpp 2012-04-08 20:51:43 UTC (rev 1637)
+++ branches/0.3/sources/titleblock/qettemplateeditor.cpp 2012-04-08 20:51:46 UTC (rev 1638)
@@ -44,6 +44,7 @@
initWidgets();
initActions();
initMenus();
+ initToolbars();
}
/**
@@ -393,6 +394,35 @@
}
/**
+ Initalize toolbars.
+*/
+void QETTitleBlockTemplateEditor::initToolbars() {
+ QToolBar *main_toolbar = new QToolBar(tr("Outils", "toolbar title"), this);
+ main_toolbar -> setObjectName("tbt_main_toolbar");
+ main_toolbar -> addAction(new_);
+ main_toolbar -> addAction(open_);
+ main_toolbar -> addAction(save_);
+ main_toolbar -> addAction(save_as_);
+ addToolBar(Qt::TopToolBarArea, main_toolbar);
+
+ QToolBar *edit_toolbar = new QToolBar(tr("\311dition", "toolbar title"), this);
+ edit_toolbar -> addAction(undo_);
+ edit_toolbar -> addAction(redo_);
+ edit_toolbar -> addSeparator();
+ edit_toolbar -> addAction(merge_cells_);
+ edit_toolbar -> addAction(split_cell_);
+ addToolBar(Qt::TopToolBarArea, edit_toolbar);
+
+ QToolBar *display_toolbar = new QToolBar(tr("Affichage", "toolbar title"), this);
+ display_toolbar -> setObjectName("tbt_display_toolbar");
+ display_toolbar -> addAction(zoom_in_);
+ display_toolbar -> addAction(zoom_out_);
+ display_toolbar -> addAction(zoom_fit_);
+ display_toolbar -> addAction(zoom_reset_);
+ addToolBar(Qt::TopToolBarArea, display_toolbar);
+}
+
+/**
Initialize layouts and widgets
*/
void QETTitleBlockTemplateEditor::initWidgets() {
Modified: branches/0.3/sources/titleblock/qettemplateeditor.h
===================================================================
--- branches/0.3/sources/titleblock/qettemplateeditor.h 2012-04-08 20:51:43 UTC (rev 1637)
+++ branches/0.3/sources/titleblock/qettemplateeditor.h 2012-04-08 20:51:46 UTC (rev 1638)
@@ -95,6 +95,7 @@
private:
void initActions();
void initMenus();
+ void initToolbars();
void initWidgets();
void initLogoManager();
QString currentlyEditedTitle() const;