mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-15 21:00:37 +02:00
Added more Hotkeys + edited ColorPalette
TY all for watching
This commit is contained in:
@@ -112,14 +112,14 @@ void IntelliPhotoGui::slotSetActiveAlpha(){
|
|||||||
// Define the standard Value, min, max, step and ok button
|
// Define the standard Value, min, max, step and ok button
|
||||||
int layer = QInputDialog::getInt(this, tr("Layer to set on"),
|
int layer = QInputDialog::getInt(this, tr("Layer to set on"),
|
||||||
tr("Layer:"),
|
tr("Layer:"),
|
||||||
-1,-1,100,1, &ok1);
|
1,1,500,1, &ok1);
|
||||||
// "New Alpha" is the title of the window
|
// "New Alpha" is the title of the window
|
||||||
int alpha = QInputDialog::getInt(this, tr("New Alpha"),
|
int alpha = QInputDialog::getInt(this, tr("New Alpha"),
|
||||||
tr("Alpha:"),
|
tr("Alpha:"),
|
||||||
255,0, 255, 1, &ok2);
|
255,0, 255, 1, &ok2);
|
||||||
if (ok1&&ok2)
|
if (ok1&&ok2)
|
||||||
{
|
{
|
||||||
paintingArea->setLayerAlpha(layer,alpha);
|
paintingArea->setLayerAlpha(layer-1,alpha);
|
||||||
UpdateGui();
|
UpdateGui();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -192,10 +192,10 @@ void IntelliPhotoGui::slotSetActiveLayer(){
|
|||||||
// Define the standard Value, min, max, step and ok button
|
// Define the standard Value, min, max, step and ok button
|
||||||
int layer = QInputDialog::getInt(this, tr("Layer to set on"),
|
int layer = QInputDialog::getInt(this, tr("Layer to set on"),
|
||||||
tr("Layer:"),
|
tr("Layer:"),
|
||||||
-1,0,255,1, &ok1);
|
1,1,500,1, &ok1);
|
||||||
if (ok1)
|
if (ok1)
|
||||||
{
|
{
|
||||||
paintingArea->setLayerActive(layer);
|
paintingArea->setLayerActive(layer-1);
|
||||||
UpdateGui();
|
UpdateGui();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -264,7 +264,7 @@ void IntelliPhotoGui::slotCreateFloodFillTool(){
|
|||||||
void IntelliPhotoGui::slotAboutDialog(){
|
void IntelliPhotoGui::slotAboutDialog(){
|
||||||
// Window title and text to display
|
// Window title and text to display
|
||||||
QMessageBox::about(this, tr("About Painting"),
|
QMessageBox::about(this, tr("About Painting"),
|
||||||
tr("<p><b>IntelliPhoto</b>Pretty basic editor.</p>"));
|
tr("<p><b>IntelliPhoto - </b>A Pretty basic editor.</p> <br>Developed by Team 7."));
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotEnterPressed(){
|
void IntelliPhotoGui::slotEnterPressed(){
|
||||||
@@ -327,6 +327,7 @@ void IntelliPhotoGui::createActions(){
|
|||||||
connect(pngSaveAction, SIGNAL(triggered()), this, SLOT(slotSave()));
|
connect(pngSaveAction, SIGNAL(triggered()), this, SLOT(slotSave()));
|
||||||
// Attach each PNG in save Menu
|
// Attach each PNG in save Menu
|
||||||
actionSaveAs.append(pngSaveAction);
|
actionSaveAs.append(pngSaveAction);
|
||||||
|
pngSaveAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_S));
|
||||||
|
|
||||||
// Create exit action and tie to IntelliPhotoGui::close()
|
// Create exit action and tie to IntelliPhotoGui::close()
|
||||||
actionExit = new QAction(tr("&Exit"), this);
|
actionExit = new QAction(tr("&Exit"), this);
|
||||||
@@ -344,12 +345,15 @@ void IntelliPhotoGui::createActions(){
|
|||||||
|
|
||||||
// Delete New Layer action and tie to IntelliPhotoGui::deleteLayer()
|
// Delete New Layer action and tie to IntelliPhotoGui::deleteLayer()
|
||||||
actionDeleteLayer = new QAction(tr("&Delete Layer..."), this);
|
actionDeleteLayer = new QAction(tr("&Delete Layer..."), this);
|
||||||
|
actionDeleteLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_D));
|
||||||
connect(actionDeleteLayer, SIGNAL(triggered()), this, SLOT(slotDeleteLayer()));
|
connect(actionDeleteLayer, SIGNAL(triggered()), this, SLOT(slotDeleteLayer()));
|
||||||
|
|
||||||
actionSetActiveLayer = new QAction(tr("&set Active"), this);
|
actionSetActiveLayer = new QAction(tr("&set Active"), this);
|
||||||
|
actionSetActiveLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_A));
|
||||||
connect(actionSetActiveLayer, SIGNAL(triggered()), this, SLOT(slotSetActiveLayer()));
|
connect(actionSetActiveLayer, SIGNAL(triggered()), this, SLOT(slotSetActiveLayer()));
|
||||||
|
|
||||||
actionSetActiveAlpha = new QAction(tr("&set Alpha"), this);
|
actionSetActiveAlpha = new QAction(tr("&set Alpha"), this);
|
||||||
|
actionSetActiveAlpha->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_A));
|
||||||
connect(actionSetActiveAlpha, SIGNAL(triggered()), this, SLOT(slotSetActiveAlpha()));
|
connect(actionSetActiveAlpha, SIGNAL(triggered()), this, SLOT(slotSetActiveAlpha()));
|
||||||
|
|
||||||
actionMovePositionUp = new QAction(tr("&move Up"), this);
|
actionMovePositionUp = new QAction(tr("&move Up"), this);
|
||||||
@@ -378,61 +382,74 @@ void IntelliPhotoGui::createActions(){
|
|||||||
|
|
||||||
//Create Update RenderSettings Actions here
|
//Create Update RenderSettings Actions here
|
||||||
actionUpdateRenderSettingsOn = new QAction(tr("&On"), this);
|
actionUpdateRenderSettingsOn = new QAction(tr("&On"), this);
|
||||||
|
actionUpdateRenderSettingsOn->setShortcut(QKeySequence(Qt::ALT +Qt::SHIFT + +Qt::Key_A));
|
||||||
connect(actionUpdateRenderSettingsOn, SIGNAL(triggered()),this, SLOT(slotUpdateRenderSettingsOn()));
|
connect(actionUpdateRenderSettingsOn, SIGNAL(triggered()),this, SLOT(slotUpdateRenderSettingsOn()));
|
||||||
|
|
||||||
actionUpdateRenderSettingsOff = new QAction(tr("&Off"), this);
|
actionUpdateRenderSettingsOff = new QAction(tr("&Off"), this);
|
||||||
|
actionUpdateRenderSettingsOff->setShortcut(QKeySequence(Qt::ALT +Qt::SHIFT + +Qt::Key_D));
|
||||||
connect(actionUpdateRenderSettingsOff, SIGNAL(triggered()),this, SLOT(slotUpdateRenderSettingsOff()));
|
connect(actionUpdateRenderSettingsOff, SIGNAL(triggered()),this, SLOT(slotUpdateRenderSettingsOff()));
|
||||||
|
|
||||||
//Create Color Actions here
|
//Create Color Actions here
|
||||||
actionColorPickerFirstColor = new QAction(tr("&Main"), this);
|
actionColorPickerFirstColor = new QAction(tr("&Main"), this);
|
||||||
|
actionColorPickerFirstColor->setShortcut(QKeySequence(Qt::ALT + Qt::Key_N));
|
||||||
connect(actionColorPickerFirstColor, SIGNAL(triggered()), this, SLOT(slotSetFirstColor()));
|
connect(actionColorPickerFirstColor, SIGNAL(triggered()), this, SLOT(slotSetFirstColor()));
|
||||||
connect(FirstColorButton, SIGNAL(clicked()), this, SLOT(slotSetFirstColor()));
|
connect(FirstColorButton, SIGNAL(clicked()), this, SLOT(slotSetFirstColor()));
|
||||||
|
|
||||||
actionColorPickerSecondColor = new QAction(tr("&Secondary"), this);
|
actionColorPickerSecondColor = new QAction(tr("&Secondary"), this);
|
||||||
|
actionColorPickerSecondColor->setShortcut(QKeySequence(Qt::ALT + Qt::Key_M));
|
||||||
connect(actionColorPickerSecondColor, SIGNAL(triggered()), this, SLOT(slotSetSecondColor()));
|
connect(actionColorPickerSecondColor, SIGNAL(triggered()), this, SLOT(slotSetSecondColor()));
|
||||||
connect(SecondColorButton, SIGNAL(clicked()), this, SLOT(slotSetSecondColor()));
|
connect(SecondColorButton, SIGNAL(clicked()), this, SLOT(slotSetSecondColor()));
|
||||||
|
|
||||||
actionColorSwap = new QAction(tr("&Switch"), this);
|
actionColorSwap = new QAction(tr("&Switch"), this);
|
||||||
actionColorSwap->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_S));
|
actionColorSwap->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_S));
|
||||||
connect(actionColorSwap, SIGNAL(triggered()), this, SLOT(slotSwapColor()));
|
connect(actionColorSwap, SIGNAL(triggered()), this, SLOT(slotSwapColor()));
|
||||||
connect(SwitchColorButton, SIGNAL(clicked()), this, SLOT(slotSwapColor()));
|
connect(SwitchColorButton, SIGNAL(clicked()), this, SLOT(slotSwapColor()));
|
||||||
|
|
||||||
//Create Tool actions down here
|
//Create Tool actions down here
|
||||||
actionCreatePlainTool = new QAction(tr("&Plain"), this);
|
actionCreatePlainTool = new QAction(tr("&Plain"), this);
|
||||||
|
actionCreatePlainTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT +Qt::Key_P));
|
||||||
connect(actionCreatePlainTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
connect(actionCreatePlainTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreatePlainTool, SIGNAL(triggered()), this, SLOT(slotCreatePlainTool()));
|
connect(actionCreatePlainTool, SIGNAL(triggered()), this, SLOT(slotCreatePlainTool()));
|
||||||
|
|
||||||
|
|
||||||
actionCreatePenTool = new QAction(tr("&Pen"),this);
|
actionCreatePenTool = new QAction(tr("&Pen"),this);
|
||||||
|
actionCreatePenTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT +Qt::Key_S));
|
||||||
connect(actionCreatePenTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
connect(actionCreatePenTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreatePenTool, SIGNAL(triggered()), this, SLOT(slotCreatePenTool()));
|
connect(actionCreatePenTool, SIGNAL(triggered()), this, SLOT(slotCreatePenTool()));
|
||||||
|
|
||||||
actionCreateLineTool = new QAction(tr("&Line"), this);
|
actionCreateLineTool = new QAction(tr("&Line"), this);
|
||||||
|
actionCreateLineTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT +Qt::Key_L));
|
||||||
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotCreateLineTool()));
|
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotCreateLineTool()));
|
||||||
|
|
||||||
actionCreateCircleTool = new QAction(tr("&Circle"), this);
|
actionCreateCircleTool = new QAction(tr("&Circle"), this);
|
||||||
|
actionCreateCircleTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT +Qt::Key_C));
|
||||||
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotCreateCircleTool()));
|
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotCreateCircleTool()));
|
||||||
|
|
||||||
actionCreateRectangleTool = new QAction(tr("&Rectangle"), this);
|
actionCreateRectangleTool = new QAction(tr("&Rectangle"), this);
|
||||||
|
actionCreateRectangleTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT +Qt::Key_R));
|
||||||
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotCreateRectangleTool()));
|
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotCreateRectangleTool()));
|
||||||
|
|
||||||
actionCreatePolygonTool = new QAction(tr("&Polygon"), this);
|
actionCreatePolygonTool = new QAction(tr("&Polygon"), this);
|
||||||
|
actionCreatePolygonTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT +Qt::Key_V));
|
||||||
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotCreatePolygonTool()));
|
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotCreatePolygonTool()));
|
||||||
|
|
||||||
actionCreateFloodFillTool = new QAction(tr("&FloodFill"), this);
|
actionCreateFloodFillTool = new QAction(tr("&FloodFill"), this);
|
||||||
|
actionCreateFloodFillTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT +Qt::Key_F));
|
||||||
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotCreateFloodFillTool()));
|
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotCreateFloodFillTool()));
|
||||||
|
|
||||||
// Create about action and tie to IntelliPhotoGui::about()
|
// Create about action and tie to IntelliPhotoGui::about()
|
||||||
actionAboutDialog = new QAction(tr("&About"), this);
|
actionAboutDialog = new QAction(tr("&About"), this);
|
||||||
|
actionAboutDialog->setShortcut(Qt::Key_F2);
|
||||||
connect(actionAboutDialog, SIGNAL(triggered()), this, SLOT(slotAboutDialog()));
|
connect(actionAboutDialog, SIGNAL(triggered()), this, SLOT(slotAboutDialog()));
|
||||||
|
|
||||||
// Create about Qt action and tie to IntelliPhotoGui::aboutQt()
|
// Create about Qt action and tie to IntelliPhotoGui::aboutQt()
|
||||||
actionAboutQtDialog = new QAction(tr("About &Qt"), this);
|
actionAboutQtDialog = new QAction(tr("About &Qt"), this);
|
||||||
|
actionAboutQtDialog->setShortcut(Qt::Key_F3);
|
||||||
connect(actionAboutQtDialog, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
connect(actionAboutQtDialog, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
||||||
|
|
||||||
connect(EditLineWidth, SIGNAL(returnPressed()), this, SLOT(slotEnterPressed()));
|
connect(EditLineWidth, SIGNAL(returnPressed()), this, SLOT(slotEnterPressed()));
|
||||||
@@ -460,9 +477,11 @@ void IntelliPhotoGui::createActions(){
|
|||||||
connect(RectangleButton, SIGNAL(clicked()), this, SLOT(slotCreateRectangleTool()));
|
connect(RectangleButton, SIGNAL(clicked()), this, SLOT(slotCreateRectangleTool()));
|
||||||
|
|
||||||
actionSetWidth = new QAction(tr("&Set Width"),this);
|
actionSetWidth = new QAction(tr("&Set Width"),this);
|
||||||
|
actionSetWidth->setShortcut(QKeySequence(Qt::ALT + Qt::Key_W));
|
||||||
connect(actionSetWidth, SIGNAL(triggered()), this, SLOT(slotSetWidth()));
|
connect(actionSetWidth, SIGNAL(triggered()), this, SLOT(slotSetWidth()));
|
||||||
|
|
||||||
actionSetInnerAlpha = new QAction(tr("&Set Inner Alpha"),this);
|
actionSetInnerAlpha = new QAction(tr("&Set Inner Alpha"),this);
|
||||||
|
actionSetInnerAlpha->setShortcut(QKeySequence(Qt::ALT + Qt::Key_A));
|
||||||
connect(actionSetInnerAlpha, SIGNAL(triggered()), this, SLOT(slotSetInnerAlpha()));
|
connect(actionSetInnerAlpha, SIGNAL(triggered()), this, SLOT(slotSetInnerAlpha()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -664,7 +683,6 @@ void IntelliPhotoGui::createGui(){
|
|||||||
ActiveLayerImageButton->setFixedSize(Buttonsize);
|
ActiveLayerImageButton->setFixedSize(Buttonsize);
|
||||||
ActiveLayerImageButton->setIcon(preview);
|
ActiveLayerImageButton->setIcon(preview);
|
||||||
ActiveLayerImageButton->setIconSize(Buttonsize);
|
ActiveLayerImageButton->setIconSize(Buttonsize);
|
||||||
ActiveLayerImageButton->setEnabled(false);
|
|
||||||
|
|
||||||
// set gui elements
|
// set gui elements
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user