Compare commits
2
Commits
c772e20e67
...
851b7c53c6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
851b7c53c6 | ||
|
|
c060ba5596 |
No files matched your search
@@ -143,6 +143,13 @@ else()
|
|||||||
qt_add_translations(${EXE_NAME} ${ADD_TRANSLATIONS_ADDITIONAL_ARGS} TS_FILES ${PPIC_TS_FILES} QM_FILES_OUTPUT_VARIABLE PPIC_QM_FILES)
|
qt_add_translations(${EXE_NAME} ${ADD_TRANSLATIONS_ADDITIONAL_ARGS} TS_FILES ${PPIC_TS_FILES} QM_FILES_OUTPUT_VARIABLE PPIC_QM_FILES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# YYC MARK:
|
||||||
|
# We use this to disable that Qt UIC generate code like `QMetaObject::connectSlotsByName(foobar);`
|
||||||
|
# for the header file of `.ui` file, which cause this application outputs log at runtime like
|
||||||
|
# `qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_actionXxx_triggered()`,
|
||||||
|
# because we only use UIC for building user interface and all signals and actions are managed by ourselves.
|
||||||
|
set_target_properties(${EXE_NAME} PROPERTIES AUTOUIC_OPTIONS "-a")
|
||||||
|
|
||||||
# YYC MARK:
|
# YYC MARK:
|
||||||
# This is essential, otherwise Qt UIC generated UI header file
|
# This is essential, otherwise Qt UIC generated UI header file
|
||||||
# can not find our header files if there are custom widgets inside UI file.
|
# can not find our header files if there are custom widgets inside UI file.
|
||||||
|
|||||||
+12
-4
@@ -146,7 +146,8 @@ void ActionManager::setupAction(MainWindow *mainWindow)
|
|||||||
|
|
||||||
void ActionManager::setupShortcuts()
|
void ActionManager::setupShortcuts()
|
||||||
{
|
{
|
||||||
actionCopyPixmap->setShortcut(QKeySequence::Copy);
|
actionCopyPixmap->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_C));
|
||||||
|
actionCopyFilePath->setShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_C));
|
||||||
|
|
||||||
actionPrevPicture->setShortcuts({
|
actionPrevPicture->setShortcuts({
|
||||||
QKeySequence(Qt::Key_Left),
|
QKeySequence(Qt::Key_Left),
|
||||||
@@ -157,13 +158,20 @@ void ActionManager::setupShortcuts()
|
|||||||
QKeySequence(Qt::Key_PageDown),
|
QKeySequence(Qt::Key_PageDown),
|
||||||
});
|
});
|
||||||
|
|
||||||
actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
|
actionFitToScreen->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
|
||||||
|
actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_0));
|
||||||
|
|
||||||
actionZoomIn->setShortcut(QKeySequence::ZoomIn);
|
actionZoomIn->setShortcut(QKeySequence::ZoomIn);
|
||||||
actionZoomOut->setShortcut(QKeySequence::ZoomOut);
|
actionZoomOut->setShortcut(QKeySequence::ZoomOut);
|
||||||
|
|
||||||
actionTrash->setShortcut(QKeySequence::Delete);
|
actionFlipHorizontal->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_M));
|
||||||
actionProperties->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_I));
|
actionFlipVertical->setShortcut(QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_M));
|
||||||
|
|
||||||
|
actionRotateClockwise->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Comma));
|
||||||
|
actionRotateCounterClockwise->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Period));
|
||||||
|
|
||||||
|
actionTrash->setShortcut(QKeySequence::Delete);
|
||||||
|
actionProperties->setShortcut(QKeySequence(Qt::ALT | Qt::Key_Enter));
|
||||||
actionSettings->setShortcut(QKeySequence::Preferences);
|
actionSettings->setShortcut(QKeySequence::Preferences);
|
||||||
actionHelp->setShortcut(QKeySequence::HelpContents);
|
actionHelp->setShortcut(QKeySequence::HelpContents);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ public:
|
|||||||
void setupAction(MainWindow * mainWindow);
|
void setupAction(MainWindow * mainWindow);
|
||||||
void setupShortcuts();
|
void setupShortcuts();
|
||||||
|
|
||||||
public slots:
|
|
||||||
void updateActionState(PlaylistManager* pm, GraphicsView* gv);
|
void updateActionState(PlaylistManager* pm, GraphicsView* gv);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -180,6 +180,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
|
delete m_am;
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user