Mercurial > hg > octave-lyh
changeset 15081:d02b229ce693 gui
Cleaned up icon positions. Removed icon loading from resource manager.
* chat.png: Moved to gui/src/icons.
* help_index.png: Moved to gui/src/icons.
* icons_license: Moved to gui/src/icons.
* jabber_protocol.png: Moved to gui/src/icons.
* logo.png: Moved to gui/src/icons.
* terminal.png: Moved to gui/src/icons.
* main-window.cc: Removed retrieveing icons from resource manager.
* octave-gui.cc: Removed loading icons with resource manager.
* resource-manager: Removed code for loading and retrieving icons.
* resource.qrc: Added icons to resource file.
author | Jacob Dawid <jacob.dawid@gmail.com> |
---|---|
date | Thu, 02 Aug 2012 12:12:00 +0200 |
parents | 4c4f2fb07a50 |
children | a132d206a36a |
files | gui/media/chat.png gui/media/help_index.png gui/media/icons_license gui/media/jabber_protocol.png gui/media/logo.png gui/media/terminal.png gui/src/icons/chat.png gui/src/icons/help_index.png gui/src/icons/icons_license gui/src/icons/jabber_protocol.png gui/src/icons/logo.png gui/src/icons/terminal.png gui/src/main-window.cc gui/src/octave-gui.cc gui/src/resource-manager.cc gui/src/resource-manager.h gui/src/resource.qrc |
diffstat | 11 files changed, 8 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/src/main-window.cc +++ b/gui/src/main-window.cc @@ -433,7 +433,7 @@ main_window::construct () { _closing = false; // flag for editor files when closed - setWindowIcon (resource_manager::instance ()->get_icon (resource_manager::octave)); + setWindowIcon (QIcon(":/actions/icons/logo.png")); // Setup dockable widgets and the status bar. _workspace_view = new workspace_view (this); @@ -463,6 +463,7 @@ _terminal->setObjectName ("OctaveTerminal"); _terminal->setFocusPolicy (Qt::StrongFocus); _terminal_dock_widget = new terminal_dock_widget (_terminal, this); + _terminal_dock_widget->setWindowIcon (QIcon(":/actions/icons/terminal.png")); QWidget *dummyWidget = new QWidget (); dummyWidget->setObjectName ("CentralDummyWidget");
--- a/gui/src/octave-gui.cc +++ b/gui/src/octave-gui.cc @@ -71,7 +71,6 @@ application.installTranslator (&translator); resource_manager::instance ()->update_network_settings (); - resource_manager::instance ()->load_icons (); main_window w; w.show ();
--- a/gui/src/resource-manager.cc +++ b/gui/src/resource-manager.cc @@ -81,15 +81,6 @@ return QString("../languages/%1.qm").arg(language); } -QIcon -resource_manager::get_icon (icon i) -{ - if (_icons.contains (i)) - { - return _icons [i]; - } - return QIcon (); -} bool resource_manager::is_first_run () @@ -123,14 +114,6 @@ QNetworkProxy::setApplicationProxy (proxy); } -void -resource_manager::load_icons () -{ - _icons [resource_manager::octave] = QIcon ("../media/logo.png"); - _icons [resource_manager::terminal] = QIcon ("../media/terminal.png"); - _icons [resource_manager::documentation] = QIcon ("../media/help_index.png"); -} - const char* resource_manager::octave_keywords () {
--- a/gui/src/resource-manager.h +++ b/gui/src/resource-manager.h @@ -26,12 +26,6 @@ class resource_manager { public: - enum icon - { - octave, - terminal, - documentation - }; ~resource_manager (); @@ -47,8 +41,7 @@ void set_settings (QString file); QString find_translator_file (QString language); void update_network_settings (); - void load_icons (); - QIcon get_icon (icon i); + bool is_first_run (); const char *octave_keywords (); @@ -57,7 +50,6 @@ QSettings *_settings; QString _home_path; - QMap <icon, QIcon> _icons; static resource_manager _singleton; bool _first_run; };
--- a/gui/src/resource.qrc +++ b/gui/src/resource.qrc @@ -22,5 +22,10 @@ <file>icons/zoom-in.png</file> <file>icons/zoom-out.png</file> <file>icons/find.png</file> + <file>icons/chat.png</file> + <file>icons/help_index.png</file> + <file>icons/jabber_protocol.png</file> + <file>icons/logo.png</file> + <file>icons/terminal.png</file> </qresource> </RCC>