view gui/src/resource-manager.h @ 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 a565c560e654
children ad9523348676
line wrap: on
line source

/* OctaveGUI - A graphical user interface for Octave
 * Copyright (C) 2011 Jacob Dawid (jacob.dawid@googlemail.com)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef RESOURCEMANAGER_H
#define RESOURCEMANAGER_H

#include <QSettings>
#include <QDesktopServices>
#include <QMap>
#include <QIcon>

class resource_manager
{
public:

  ~resource_manager ();

  static resource_manager *
  instance ()
  {
    return &_singleton;
  }

  QSettings *get_settings ();
  QString get_home_path ();
  void reload_settings ();
  void set_settings (QString file);
  QString find_translator_file (QString language);
  void update_network_settings ();

  bool is_first_run ();
  const char *octave_keywords ();

private:
  resource_manager ();

  QSettings *_settings;
  QString _home_path;
  static resource_manager _singleton;
  bool _first_run;
};

#endif // RESOURCEMANAGER_H