1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-04-10 15:45:37 +00:00

Merge pull request #1995 from Capostrophic/icons

Add icons for record context menu actions (feature #4506)
This commit is contained in:
Bret Curtis 2018-10-28 22:22:42 +01:00 committed by GitHub
commit 7f2baa9373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 1 deletions

View File

@ -292,6 +292,7 @@ CSVWorld::Table::Table (const CSMWorld::UniversalId& id,
mEditAction = new QAction (tr ("Edit Record"), this); mEditAction = new QAction (tr ("Edit Record"), this);
connect (mEditAction, SIGNAL (triggered()), this, SLOT (editRecord())); connect (mEditAction, SIGNAL (triggered()), this, SLOT (editRecord()));
mEditAction->setIcon(QIcon(":edit-edit"));
addAction (mEditAction); addAction (mEditAction);
CSMPrefs::Shortcut* editShortcut = new CSMPrefs::Shortcut("table-edit", this); CSMPrefs::Shortcut* editShortcut = new CSMPrefs::Shortcut("table-edit", this);
editShortcut->associateAction(mEditAction); editShortcut->associateAction(mEditAction);
@ -300,12 +301,14 @@ CSVWorld::Table::Table (const CSMWorld::UniversalId& id,
{ {
mCreateAction = new QAction (tr ("Add Record"), this); mCreateAction = new QAction (tr ("Add Record"), this);
connect (mCreateAction, SIGNAL (triggered()), this, SIGNAL (createRequest())); connect (mCreateAction, SIGNAL (triggered()), this, SIGNAL (createRequest()));
mCreateAction->setIcon(QIcon(":edit-add"));
addAction (mCreateAction); addAction (mCreateAction);
CSMPrefs::Shortcut* createShortcut = new CSMPrefs::Shortcut("table-add", this); CSMPrefs::Shortcut* createShortcut = new CSMPrefs::Shortcut("table-add", this);
createShortcut->associateAction(mCreateAction); createShortcut->associateAction(mCreateAction);
mCloneAction = new QAction (tr ("Clone Record"), this); mCloneAction = new QAction (tr ("Clone Record"), this);
connect(mCloneAction, SIGNAL (triggered()), this, SLOT (cloneRecord())); connect(mCloneAction, SIGNAL (triggered()), this, SLOT (cloneRecord()));
mCloneAction->setIcon(QIcon(":edit-clone"));
addAction(mCloneAction); addAction(mCloneAction);
CSMPrefs::Shortcut* cloneShortcut = new CSMPrefs::Shortcut("table-clone", this); CSMPrefs::Shortcut* cloneShortcut = new CSMPrefs::Shortcut("table-clone", this);
cloneShortcut->associateAction(mCloneAction); cloneShortcut->associateAction(mCloneAction);
@ -315,6 +318,7 @@ CSVWorld::Table::Table (const CSMWorld::UniversalId& id,
{ {
mTouchAction = new QAction(tr("Touch Record"), this); mTouchAction = new QAction(tr("Touch Record"), this);
connect(mTouchAction, SIGNAL(triggered()), this, SLOT(touchRecord())); connect(mTouchAction, SIGNAL(triggered()), this, SLOT(touchRecord()));
mTouchAction->setIcon(QIcon(":edit-touch"));
addAction(mTouchAction); addAction(mTouchAction);
CSMPrefs::Shortcut* touchShortcut = new CSMPrefs::Shortcut("table-touch", this); CSMPrefs::Shortcut* touchShortcut = new CSMPrefs::Shortcut("table-touch", this);
touchShortcut->associateAction(mTouchAction); touchShortcut->associateAction(mTouchAction);
@ -322,49 +326,56 @@ CSVWorld::Table::Table (const CSMWorld::UniversalId& id,
mRevertAction = new QAction (tr ("Revert Record"), this); mRevertAction = new QAction (tr ("Revert Record"), this);
connect (mRevertAction, SIGNAL (triggered()), mDispatcher, SLOT (executeRevert())); connect (mRevertAction, SIGNAL (triggered()), mDispatcher, SLOT (executeRevert()));
mRevertAction->setIcon(QIcon(":edit-undo"));
addAction (mRevertAction); addAction (mRevertAction);
CSMPrefs::Shortcut* revertShortcut = new CSMPrefs::Shortcut("table-revert", this); CSMPrefs::Shortcut* revertShortcut = new CSMPrefs::Shortcut("table-revert", this);
revertShortcut->associateAction(mRevertAction); revertShortcut->associateAction(mRevertAction);
mDeleteAction = new QAction (tr ("Delete Record"), this); mDeleteAction = new QAction (tr ("Delete Record"), this);
connect (mDeleteAction, SIGNAL (triggered()), mDispatcher, SLOT (executeDelete())); connect (mDeleteAction, SIGNAL (triggered()), mDispatcher, SLOT (executeDelete()));
mDeleteAction->setIcon(QIcon(":edit-delete"));
addAction (mDeleteAction); addAction (mDeleteAction);
CSMPrefs::Shortcut* deleteShortcut = new CSMPrefs::Shortcut("table-remove", this); CSMPrefs::Shortcut* deleteShortcut = new CSMPrefs::Shortcut("table-remove", this);
deleteShortcut->associateAction(mDeleteAction); deleteShortcut->associateAction(mDeleteAction);
mMoveUpAction = new QAction (tr ("Move Up"), this); mMoveUpAction = new QAction (tr ("Move Up"), this);
connect (mMoveUpAction, SIGNAL (triggered()), this, SLOT (moveUpRecord())); connect (mMoveUpAction, SIGNAL (triggered()), this, SLOT (moveUpRecord()));
mMoveUpAction->setIcon(QIcon(":record-up"));
addAction (mMoveUpAction); addAction (mMoveUpAction);
CSMPrefs::Shortcut* moveUpShortcut = new CSMPrefs::Shortcut("table-moveup", this); CSMPrefs::Shortcut* moveUpShortcut = new CSMPrefs::Shortcut("table-moveup", this);
moveUpShortcut->associateAction(mMoveUpAction); moveUpShortcut->associateAction(mMoveUpAction);
mMoveDownAction = new QAction (tr ("Move Down"), this); mMoveDownAction = new QAction (tr ("Move Down"), this);
connect (mMoveDownAction, SIGNAL (triggered()), this, SLOT (moveDownRecord())); connect (mMoveDownAction, SIGNAL (triggered()), this, SLOT (moveDownRecord()));
mMoveDownAction->setIcon(QIcon(":record-down"));
addAction (mMoveDownAction); addAction (mMoveDownAction);
CSMPrefs::Shortcut* moveDownShortcut = new CSMPrefs::Shortcut("table-movedown", this); CSMPrefs::Shortcut* moveDownShortcut = new CSMPrefs::Shortcut("table-movedown", this);
moveDownShortcut->associateAction(mMoveDownAction); moveDownShortcut->associateAction(mMoveDownAction);
mViewAction = new QAction (tr ("View"), this); mViewAction = new QAction (tr ("View"), this);
connect (mViewAction, SIGNAL (triggered()), this, SLOT (viewRecord())); connect (mViewAction, SIGNAL (triggered()), this, SLOT (viewRecord()));
mViewAction->setIcon(QIcon(":/cell.png"));
addAction (mViewAction); addAction (mViewAction);
CSMPrefs::Shortcut* viewShortcut = new CSMPrefs::Shortcut("table-view", this); CSMPrefs::Shortcut* viewShortcut = new CSMPrefs::Shortcut("table-view", this);
viewShortcut->associateAction(mViewAction); viewShortcut->associateAction(mViewAction);
mPreviewAction = new QAction (tr ("Preview"), this); mPreviewAction = new QAction (tr ("Preview"), this);
connect (mPreviewAction, SIGNAL (triggered()), this, SLOT (previewRecord())); connect (mPreviewAction, SIGNAL (triggered()), this, SLOT (previewRecord()));
mPreviewAction->setIcon(QIcon(":edit-preview"));
addAction (mPreviewAction); addAction (mPreviewAction);
CSMPrefs::Shortcut* previewShortcut = new CSMPrefs::Shortcut("table-preview", this); CSMPrefs::Shortcut* previewShortcut = new CSMPrefs::Shortcut("table-preview", this);
previewShortcut->associateAction(mPreviewAction); previewShortcut->associateAction(mPreviewAction);
mExtendedDeleteAction = new QAction (tr ("Extended Delete Record"), this); mExtendedDeleteAction = new QAction (tr ("Extended Delete Record"), this);
connect (mExtendedDeleteAction, SIGNAL (triggered()), this, SLOT (executeExtendedDelete())); connect (mExtendedDeleteAction, SIGNAL (triggered()), this, SLOT (executeExtendedDelete()));
mExtendedDeleteAction->setIcon(QIcon(":edit-delete"));
addAction (mExtendedDeleteAction); addAction (mExtendedDeleteAction);
CSMPrefs::Shortcut* extendedDeleteShortcut = new CSMPrefs::Shortcut("table-extendeddelete", this); CSMPrefs::Shortcut* extendedDeleteShortcut = new CSMPrefs::Shortcut("table-extendeddelete", this);
extendedDeleteShortcut->associateAction(mExtendedDeleteAction); extendedDeleteShortcut->associateAction(mExtendedDeleteAction);
mExtendedRevertAction = new QAction (tr ("Extended Revert Record"), this); mExtendedRevertAction = new QAction (tr ("Extended Revert Record"), this);
connect (mExtendedRevertAction, SIGNAL (triggered()), this, SLOT (executeExtendedRevert())); connect (mExtendedRevertAction, SIGNAL (triggered()), this, SLOT (executeExtendedRevert()));
mExtendedRevertAction->setIcon(QIcon(":edit-undo"));
addAction (mExtendedRevertAction); addAction (mExtendedRevertAction);
CSMPrefs::Shortcut* extendedRevertShortcut = new CSMPrefs::Shortcut("table-extendedrevert", this); CSMPrefs::Shortcut* extendedRevertShortcut = new CSMPrefs::Shortcut("table-extendedrevert", this);
extendedRevertShortcut->associateAction(mExtendedRevertAction); extendedRevertShortcut->associateAction(mExtendedRevertAction);

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

BIN
files/opencs/record-up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

View File

@ -90,10 +90,14 @@
<file>multitype.png</file> <file>multitype.png</file>
<file alias="record-next">record-next.png</file> <file alias="record-next">record-next.png</file>
<file alias="record-previous">record-previous.png</file> <file alias="record-previous">record-previous.png</file>
<file alias="record-down">record-down.png</file>
<file alias="record-up">record-up.png</file>
<file alias="edit-delete">record-delete.png</file> <file alias="edit-delete">record-delete.png</file>
<file alias="edit-preview">record-preview.png</file> <file alias="edit-preview">record-preview.png</file>
<file alias="edit-clone">record-clone.png</file> <file alias="edit-clone">record-clone.png</file>
<file alias="edit-add">record-add.png</file> <file alias="edit-add">record-add.png</file>
<file alias="edit-edit">record-edit.png</file>
<file alias="edit-touch">record-touch.png</file>
<file alias="edit-undo">record-revert.png</file> <file alias="edit-undo">record-revert.png</file>
<file alias="resources-icon">resources-icon.png</file> <file alias="resources-icon">resources-icon.png</file>
<file alias="resources-mesh">resources-mesh.png</file> <file alias="resources-mesh">resources-mesh.png</file>