La couleur des textes est desormais forcee a etre noire

Utilisation de boutons radios dans le menu Fenetres


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@201 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavierqet
2007-11-01 23:56:19 +00:00
parent 556b626880
commit 937f732782
4 changed files with 6 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
DiagramTextItem::DiagramTextItem(QGraphicsItem *parent, QGraphicsScene *scene) : DiagramTextItem::DiagramTextItem(QGraphicsItem *parent, QGraphicsScene *scene) :
QGraphicsTextItem(parent, scene) QGraphicsTextItem(parent, scene)
{ {
setDefaultTextColor(Qt::black);
setFlags(QGraphicsItem::ItemIsSelectable|QGraphicsItem::ItemIsMovable); setFlags(QGraphicsItem::ItemIsSelectable|QGraphicsItem::ItemIsMovable);
connect(this, SIGNAL(lostFocus()), this, SLOT(setNonFocusable())); connect(this, SIGNAL(lostFocus()), this, SLOT(setNonFocusable()));
} }
@@ -23,6 +24,7 @@ DiagramTextItem::DiagramTextItem(const QString &text, QGraphicsItem *parent, QGr
QGraphicsTextItem(text, parent, scene), QGraphicsTextItem(text, parent, scene),
previous_text(text) previous_text(text)
{ {
setDefaultTextColor(Qt::black);
setFlags(QGraphicsItem::ItemIsSelectable|QGraphicsItem::ItemIsMovable); setFlags(QGraphicsItem::ItemIsSelectable|QGraphicsItem::ItemIsMovable);
connect(this, SIGNAL(lostFocus()), this, SLOT(setNonFocusable())); connect(this, SIGNAL(lostFocus()), this, SLOT(setNonFocusable()));
} }

View File

@@ -5,6 +5,7 @@ PartText::PartText(QETElementEditor *editor, QGraphicsItem *parent, ElementScene
QGraphicsTextItem(parent, scene), QGraphicsTextItem(parent, scene),
CustomElementPart(editor) CustomElementPart(editor)
{ {
setDefaultTextColor(Qt::black);
setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable); setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
setPlainText(QObject::tr("T")); setPlainText(QObject::tr("T"));
infos = new TextEditor(elementEditor(), this); infos = new TextEditor(elementEditor(), this);

View File

@@ -7,6 +7,7 @@ PartTextField::PartTextField(QETElementEditor *editor, QGraphicsItem *parent, QG
CustomElementPart(editor), CustomElementPart(editor),
follow_parent_rotations(true) follow_parent_rotations(true)
{ {
setDefaultTextColor(Qt::black);
setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable); setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
setPlainText(QObject::tr("_")); setPlainText(QObject::tr("_"));
infos = new TextFieldEditor(elementEditor(), this); infos = new TextFieldEditor(elementEditor(), this);

View File

@@ -841,11 +841,13 @@ void QETDiagramEditor::slot_updateWindowsMenu() {
prev_window -> setEnabled(windows.count() > 1); prev_window -> setEnabled(windows.count() > 1);
if (!windows.isEmpty()) windows_menu -> addSeparator(); if (!windows.isEmpty()) windows_menu -> addSeparator();
QActionGroup *windows_actions = new QActionGroup(this);
for (int i = 0 ; i < windows.size() ; ++ i) { for (int i = 0 ; i < windows.size() ; ++ i) {
DiagramView *dv = qobject_cast<DiagramView *>(windows.at(i)); DiagramView *dv = qobject_cast<DiagramView *>(windows.at(i));
if (!dv) continue; if (!dv) continue;
QString dv_title = dv -> windowTitle().left(dv -> windowTitle().length() - 3); QString dv_title = dv -> windowTitle().left(dv -> windowTitle().length() - 3);
QAction *action = windows_menu -> addAction(dv_title); QAction *action = windows_menu -> addAction(dv_title);
windows_actions -> addAction(action);
action -> setStatusTip(tr("Active la fen\352tre ") + dv_title); action -> setStatusTip(tr("Active la fen\352tre ") + dv_title);
action -> setCheckable(true); action -> setCheckable(true);
action -> setChecked(dv == currentDiagram()); action -> setChecked(dv == currentDiagram());