merge default

This commit is contained in:
sfb 2011-07-18 21:30:28 -05:00
commit b23c890bbf
9 changed files with 30 additions and 17 deletions

View file

@ -124,6 +124,7 @@ sint main(int argc, char **argv)
nlinfo("Welcome to NeL Object Viewer Qt!"); nlinfo("Welcome to NeL Object Viewer Qt!");
} }
QApplication::setGraphicsSystem("raster");
QApplication app(argc, argv); QApplication app(argc, argv);
QSplashScreen *splash = new QSplashScreen(); QSplashScreen *splash = new QSplashScreen();
splash->setPixmap(QPixmap(":/images/nel_ide_load.png")); splash->setPixmap(QPixmap(":/images/nel_ide_load.png"));

View file

@ -1,6 +1,8 @@
<RCC> <RCC>
<qresource prefix="/core"> <qresource prefix="/core">
<file>icons/ic_nel_add_item.png</file> <file>icons/ic_nel_add_item.png</file>
<file>icons/ic_nel_redo.png</file>
<file>icons/ic_nel_undo.png</file>
<file>icons/ic_nel_crash.png</file> <file>icons/ic_nel_crash.png</file>
<file>icons/ic_nel_delete_item.png</file> <file>icons/ic_nel_delete_item.png</file>
<file>icons/ic_nel_down_item.png</file> <file>icons/ic_nel_down_item.png</file>

View file

@ -112,6 +112,8 @@ const char * const ICON_NEW = ":/core/icons/ic_nel_new.png";
const char * const ICON_SAVE = ":/core/icons/ic_nel_save.png"; const char * const ICON_SAVE = ":/core/icons/ic_nel_save.png";
const char * const ICON_SAVE_AS = ":/core/icons/ic_nel_save_as.png"; const char * const ICON_SAVE_AS = ":/core/icons/ic_nel_save_as.png";
const char * const ICON_CRASH = ":/core/icons/ic_nel_crash.png"; const char * const ICON_CRASH = ":/core/icons/ic_nel_crash.png";
const char * const ICON_UNDO = ":/core/icons/ic_nel_undo.png";
const char * const ICON_REDO = ":/core/icons/ic_nel_redo.png";
} // namespace Constants } // namespace Constants
} // namespace Core } // namespace Core

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

@ -384,8 +384,12 @@ void MainWindow::createMenus()
m_editMenu = m_menuBar->addMenu(tr("&Edit")); m_editMenu = m_menuBar->addMenu(tr("&Edit"));
QAction *undoAction = m_undoGroup->createUndoAction(this); QAction *undoAction = m_undoGroup->createUndoAction(this);
menuManager()->registerAction(undoAction, Constants::UNDO);
undoAction->setIcon(QIcon(Constants::ICON_UNDO));
undoAction->setShortcut(QKeySequence::Undo); undoAction->setShortcut(QKeySequence::Undo);
QAction *redoAction = m_undoGroup->createRedoAction(this); QAction *redoAction = m_undoGroup->createRedoAction(this);
menuManager()->registerAction(redoAction, Constants::REDO);
redoAction->setIcon(QIcon(Constants::ICON_REDO));
redoAction->setShortcut(QKeySequence::Redo); redoAction->setShortcut(QKeySequence::Redo);
m_editMenu->addAction(undoAction); m_editMenu->addAction(undoAction);
m_editMenu->addAction(redoAction); m_editMenu->addAction(redoAction);

View file

@ -68,7 +68,7 @@ namespace Plugin
{ {
Q_UNUSED(errorString); Q_UNUSED(errorString);
m_plugMan = pluginManager; m_plugMan = pluginManager;
m_logSettingsPage = new CLogSettingsPage(this); m_logSettingsPage = new CLogSettingsPage(this, this);
addAutoReleasedObject(m_logSettingsPage); addAutoReleasedObject(m_logSettingsPage);
return true; return true;
} }
@ -139,10 +139,10 @@ namespace Plugin
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::instance()->settings();
settings->beginGroup(Core::Constants::LOG_SECTION); settings->beginGroup(Core::Constants::LOG_SECTION);
bool error = settings->value(Core::Constants::LOG_ERROR, true).toBool(); bool error = settings->value(Core::Constants::LOG_ERROR, true).toBool();
bool warning = settings->value(Core::Constants::LOG_WARNING, true).toBool(); bool warning = settings->value(Core::Constants::LOG_WARNING, true).toBool();
bool debug = settings->value(Core::Constants::LOG_DEBUG, true).toBool(); bool debug = settings->value(Core::Constants::LOG_DEBUG, true).toBool();
bool assert = settings->value(Core::Constants::LOG_ASSERT, true).toBool(); bool assert = settings->value(Core::Constants::LOG_ASSERT, true).toBool();
bool info = settings->value(Core::Constants::LOG_INFO, true).toBool(); bool info = settings->value(Core::Constants::LOG_INFO, true).toBool();
settings->endGroup(); settings->endGroup();

View file

@ -28,8 +28,8 @@
#include <QtGui/QWidget> #include <QtGui/QWidget>
#include <QtCore/QSettings> #include <QtCore/QSettings>
namespace ExtensionSystem namespace ExtensionSystem
{ {
class IPluginManager; class IPluginManager;
} }
@ -38,13 +38,14 @@ namespace Plugin
class CLogPlugin; class CLogPlugin;
CLogSettingsPage::CLogSettingsPage(QObject *parent) CLogSettingsPage::CLogSettingsPage(CLogPlugin *logPlugin, QObject *parent)
: IOptionsPage(parent), : IOptionsPage(parent),
m_logPlugin(logPlugin),
m_currentPage(NULL), m_currentPage(NULL),
m_error(true), m_error(true),
m_warning(true), m_warning(true),
m_debug(true), m_debug(true),
m_assert(true), m_assert(true),
m_info(true) m_info(true)
{ {
} }
@ -115,10 +116,10 @@ namespace Plugin
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::instance()->settings();
settings->beginGroup(Core::Constants::LOG_SECTION); settings->beginGroup(Core::Constants::LOG_SECTION);
m_error = settings->value(Core::Constants::LOG_ERROR, true).toBool(); m_error = settings->value(Core::Constants::LOG_ERROR, true).toBool();
m_warning = settings->value(Core::Constants::LOG_WARNING, true).toBool(); m_warning = settings->value(Core::Constants::LOG_WARNING, true).toBool();
m_debug = settings->value(Core::Constants::LOG_DEBUG, true).toBool(); m_debug = settings->value(Core::Constants::LOG_DEBUG, true).toBool();
m_assert = settings->value(Core::Constants::LOG_ASSERT, true).toBool(); m_assert = settings->value(Core::Constants::LOG_ASSERT, true).toBool();
m_info = settings->value(Core::Constants::LOG_INFO, true).toBool(); m_info = settings->value(Core::Constants::LOG_INFO, true).toBool();
settings->endGroup(); settings->endGroup();
} }

View file

@ -29,6 +29,8 @@ class QWidget;
namespace Plugin namespace Plugin
{ {
class CLogPlugin;
/** /**
@class CLogSettingsPage @class CLogSettingsPage
*/ */
@ -36,7 +38,7 @@ namespace Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
CLogSettingsPage(QObject *parent = 0); CLogSettingsPage(CLogPlugin *logPlugin, QObject *parent = 0);
virtual ~CLogSettingsPage() {} virtual ~CLogSettingsPage() {}
virtual QString id() const; virtual QString id() const;
@ -53,6 +55,7 @@ namespace Plugin
void readSettings(); void readSettings();
void writeSettings(); void writeSettings();
CLogPlugin *m_logPlugin;
QWidget *m_currentPage; QWidget *m_currentPage;
Ui::CLogSettingsPage m_ui; Ui::CLogSettingsPage m_ui;