mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-14 20:30:32 +02:00
New GUI Menu Bar Layout
This commit is contained in:
@@ -20,7 +20,7 @@ IntelliPhotoGui::IntelliPhotoGui(){
|
|||||||
setIntelliStyle();
|
setIntelliStyle();
|
||||||
// Size the app
|
// Size the app
|
||||||
resize(600,600);
|
resize(600,600);
|
||||||
showMaximized();
|
showMaximized();
|
||||||
setDefaultValues();
|
setDefaultValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,13 +242,13 @@ void IntelliPhotoGui::slotSetActiveLayer(){
|
|||||||
|
|
||||||
void IntelliPhotoGui::slotUpdateRenderSettingsOn(){
|
void IntelliPhotoGui::slotUpdateRenderSettingsOn(){
|
||||||
paintingArea->setRenderSettings(true);
|
paintingArea->setRenderSettings(true);
|
||||||
FastRendererLabel->setText("Fast Render: On");
|
FastRendererLabel->setText("Fast Render: On");
|
||||||
UpdateGui();
|
UpdateGui();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotUpdateRenderSettingsOff(){
|
void IntelliPhotoGui::slotUpdateRenderSettingsOff(){
|
||||||
paintingArea->setRenderSettings(false);
|
paintingArea->setRenderSettings(false);
|
||||||
FastRendererLabel->setText("Fast Render: Off");
|
FastRendererLabel->setText("Fast Render: Off");
|
||||||
UpdateGui();
|
UpdateGui();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,8 +303,8 @@ void IntelliPhotoGui::slotCreateFloodFillTool(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void IntelliPhotoGui::slotCreateGradientTool(){
|
void IntelliPhotoGui::slotCreateGradientTool(){
|
||||||
GradientButton->setChecked(true);
|
GradientButton->setChecked(true);
|
||||||
paintingArea->createGradientTool();
|
paintingArea->createGradientTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open an about dialog
|
// Open an about dialog
|
||||||
@@ -528,9 +528,9 @@ void IntelliPhotoGui::createActions(){
|
|||||||
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()));
|
||||||
|
|
||||||
actionCreateGradientTool = new QAction(tr("&Gradient"),this);
|
actionCreateGradientTool = new QAction(tr("&Gradient"),this);
|
||||||
connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotResetTools()));
|
||||||
connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotCreateGradientTool()));
|
connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotCreateGradientTool()));
|
||||||
|
|
||||||
// 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);
|
||||||
@@ -551,8 +551,8 @@ void IntelliPhotoGui::createActions(){
|
|||||||
connect(FloodFillButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
connect(FloodFillButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||||
connect(FloodFillButton, SIGNAL(clicked()), this, SLOT(slotCreateFloodFillTool()));
|
connect(FloodFillButton, SIGNAL(clicked()), this, SLOT(slotCreateFloodFillTool()));
|
||||||
|
|
||||||
connect(GradientButton, SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
connect(GradientButton, SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||||
connect(GradientButton, SIGNAL(clicked()), this, SLOT(slotCreateGradientTool()));
|
connect(GradientButton, SIGNAL(clicked()), this, SLOT(slotCreateGradientTool()));
|
||||||
|
|
||||||
connect(LineButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
connect(LineButton,SIGNAL(pressed()), this, SLOT(slotResetTools()));
|
||||||
connect(LineButton, SIGNAL(clicked()), this, SLOT(slotCreateLineTool()));
|
connect(LineButton, SIGNAL(clicked()), this, SLOT(slotCreateLineTool()));
|
||||||
@@ -636,8 +636,8 @@ void IntelliPhotoGui::createMenus(){
|
|||||||
//Attach all Tool Creation Actions
|
//Attach all Tool Creation Actions
|
||||||
toolCreationMenu = new QMenu(tr("&Drawingtools"), this);
|
toolCreationMenu = new QMenu(tr("&Drawingtools"), this);
|
||||||
toolCreationMenu->addAction(actionCreateCircleTool);
|
toolCreationMenu->addAction(actionCreateCircleTool);
|
||||||
toolCreationMenu->addAction(actionCreateFloodFillTool);
|
toolCreationMenu->addAction(actionCreateFloodFillTool);
|
||||||
toolCreationMenu->addAction(actionCreateGradientTool);
|
toolCreationMenu->addAction(actionCreateGradientTool);
|
||||||
toolCreationMenu->addAction(actionCreateLineTool);
|
toolCreationMenu->addAction(actionCreateLineTool);
|
||||||
toolCreationMenu->addAction(actionCreatePenTool);
|
toolCreationMenu->addAction(actionCreatePenTool);
|
||||||
toolCreationMenu->addAction(actionCreatePlainTool);
|
toolCreationMenu->addAction(actionCreatePlainTool);
|
||||||
@@ -659,8 +659,7 @@ void IntelliPhotoGui::createMenus(){
|
|||||||
// Attach all actions to Options
|
// Attach all actions to Options
|
||||||
optionMenu = new QMenu(tr("&Options"), this);
|
optionMenu = new QMenu(tr("&Options"), this);
|
||||||
optionMenu->addAction(actionGoBack);
|
optionMenu->addAction(actionGoBack);
|
||||||
optionMenu->addAction(actionGoForward);
|
optionMenu->addAction(actionGoForward);
|
||||||
optionMenu->addMenu(layerMenu);
|
|
||||||
optionMenu->addMenu(toolMenu);
|
optionMenu->addMenu(toolMenu);
|
||||||
optionMenu->addSeparator();
|
optionMenu->addSeparator();
|
||||||
optionMenu->addMenu(renderMenu);
|
optionMenu->addMenu(renderMenu);
|
||||||
@@ -674,6 +673,7 @@ void IntelliPhotoGui::createMenus(){
|
|||||||
// Add menu items to the menubar
|
// Add menu items to the menubar
|
||||||
menuBar()->addMenu(fileMenu);
|
menuBar()->addMenu(fileMenu);
|
||||||
menuBar()->addMenu(optionMenu);
|
menuBar()->addMenu(optionMenu);
|
||||||
|
menuBar()->addMenu(layerMenu);
|
||||||
menuBar()->addMenu(helpMenu);
|
menuBar()->addMenu(helpMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -705,12 +705,12 @@ void IntelliPhotoGui::createGui(){
|
|||||||
FloodFillButton->setIconSize(Buttonsize);
|
FloodFillButton->setIconSize(Buttonsize);
|
||||||
FloodFillButton->setCheckable(true);
|
FloodFillButton->setCheckable(true);
|
||||||
|
|
||||||
preview = QPixmap(":/Icons/Buttons/icons/icon.png");
|
preview = QPixmap(":/Icons/Buttons/icons/icon.png");
|
||||||
GradientButton = new QPushButton();
|
GradientButton = new QPushButton();
|
||||||
GradientButton->setFixedSize(Buttonsize);
|
GradientButton->setFixedSize(Buttonsize);
|
||||||
GradientButton->setIcon(preview);
|
GradientButton->setIcon(preview);
|
||||||
GradientButton->setIconSize(Buttonsize);
|
GradientButton->setIconSize(Buttonsize);
|
||||||
GradientButton->setCheckable(true);
|
GradientButton->setCheckable(true);
|
||||||
|
|
||||||
preview = QPixmap(":/Icons/Buttons/icons/line-tool.svg");
|
preview = QPixmap(":/Icons/Buttons/icons/line-tool.svg");
|
||||||
LineButton = new QPushButton();
|
LineButton = new QPushButton();
|
||||||
@@ -810,9 +810,9 @@ void IntelliPhotoGui::createGui(){
|
|||||||
QString String = QString("%1x%2").arg(paintingArea->Canvas->width()).arg(paintingArea->Canvas->height());
|
QString String = QString("%1x%2").arg(paintingArea->Canvas->width()).arg(paintingArea->Canvas->height());
|
||||||
dimCanvas->setText(String);
|
dimCanvas->setText(String);
|
||||||
|
|
||||||
FastRendererLabel = new QLabel();
|
FastRendererLabel = new QLabel();
|
||||||
FastRendererLabel->setFixedSize(Buttonsize.width() * 2 + 15,(Buttonsize.height() * 2) / 3);
|
FastRendererLabel->setFixedSize(Buttonsize.width() * 2 + 15,(Buttonsize.height() * 2) / 3);
|
||||||
FastRendererLabel->setText("Fast Render: On");
|
FastRendererLabel->setText("Fast Render: On");
|
||||||
|
|
||||||
ScrollArea = new QScrollArea(this);
|
ScrollArea = new QScrollArea(this);
|
||||||
ScrollArea->setBackgroundRole(QPalette::Dark);
|
ScrollArea->setBackgroundRole(QPalette::Dark);
|
||||||
@@ -829,7 +829,7 @@ void IntelliPhotoGui::createGui(){
|
|||||||
mainLayout->addWidget(PlainButton,3,2,1,1);
|
mainLayout->addWidget(PlainButton,3,2,1,1);
|
||||||
mainLayout->addWidget(PolygonButton,3,3,1,1);
|
mainLayout->addWidget(PolygonButton,3,3,1,1);
|
||||||
mainLayout->addWidget(RectangleButton,4,2,1,1);
|
mainLayout->addWidget(RectangleButton,4,2,1,1);
|
||||||
mainLayout->addWidget(GradientButton,4,3,1,1);
|
mainLayout->addWidget(GradientButton,4,3,1,1);
|
||||||
mainLayout->addWidget(WidthLine,5,2,1,2);
|
mainLayout->addWidget(WidthLine,5,2,1,2);
|
||||||
mainLayout->addWidget(EditLineWidth,6,2,1,2);
|
mainLayout->addWidget(EditLineWidth,6,2,1,2);
|
||||||
mainLayout->addWidget(innerAlphaLine,7,2,1,2);
|
mainLayout->addWidget(innerAlphaLine,7,2,1,2);
|
||||||
@@ -841,7 +841,7 @@ void IntelliPhotoGui::createGui(){
|
|||||||
mainLayout->addWidget(ActiveLayerImageLabel,12,2,1,2);
|
mainLayout->addWidget(ActiveLayerImageLabel,12,2,1,2);
|
||||||
mainLayout->addWidget(dimActive,13,2,1,2);
|
mainLayout->addWidget(dimActive,13,2,1,2);
|
||||||
mainLayout->addWidget(dimCanvas,14,2,1,2);
|
mainLayout->addWidget(dimCanvas,14,2,1,2);
|
||||||
mainLayout->addWidget(FastRendererLabel,15,2,1,2);
|
mainLayout->addWidget(FastRendererLabel,15,2,1,2);
|
||||||
mainLayout->setHorizontalSpacing(0);
|
mainLayout->setHorizontalSpacing(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user