QColorDialog modifications
Der QColorDialog hat jetzt einen Titel und nutzt den systemunabhängigen Standard-ColorPicker
This commit is contained in:
parent
99eee06a31
commit
8187d7c3b7
@ -21,10 +21,18 @@ CircleOfFifths::CircleOfFifths(qreal x, qreal y, qreal w, qreal h, MainWindow *
|
|||||||
};
|
};
|
||||||
|
|
||||||
void CircleOfFifths::mousePressEvent(QGraphicsSceneMouseEvent *event){
|
void CircleOfFifths::mousePressEvent(QGraphicsSceneMouseEvent *event){
|
||||||
|
QString title = "Bitte Farbe wählen für Ton ";
|
||||||
if(event->button() == Qt::LeftButton){
|
if(event->button() == Qt::LeftButton){
|
||||||
for(int i=0; i<12; i++){
|
for(int i=0; i<12; i++){
|
||||||
if(circleElements[i]->sceneBoundingRect().contains(event->scenePos())){
|
if(circleElements[i]->sceneBoundingRect().contains(event->scenePos())){
|
||||||
circleElements[i]->getTone()->setColor(QColorDialog::getColor(circleElements[i]->getTone()->getColor()));
|
circleElements[i]->getTone()->setColor(
|
||||||
|
QColorDialog::getColor(
|
||||||
|
circleElements[i]->getTone()->getColor(),
|
||||||
|
nullptr,
|
||||||
|
title.append(circleElements[i]->getTone()->getName()),
|
||||||
|
QColorDialog::DontUseNativeDialog
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user