summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Fischer <[email protected]>2014-11-16 14:10:34 +0100
committerAndi Fischer <[email protected]>2014-11-16 14:10:34 +0100
commit8a90401bec66835868b12d757d2759273d2e0777 (patch)
tree05f446e07f90669d0e79fcef8b236c305e387d79
parent3986f01f28496542482067957363b91071350aaf (diff)
KFontChooser --> QFontDialog
-rw-r--r--umbrello/dialogs/associationpropertiesdialog.cpp8
-rw-r--r--umbrello/dialogs/associationpropertiesdialog.h10
-rw-r--r--umbrello/dialogs/classpropertiesdialog.cpp8
-rw-r--r--umbrello/dialogs/classpropertiesdialog.h4
-rw-r--r--umbrello/dialogs/codevieweroptionsbase.ui219
-rw-r--r--umbrello/dialogs/settingsdialog.cpp7
-rw-r--r--umbrello/dialogs/settingsdialog.h4
-rw-r--r--umbrello/dialogs/umlviewdialog.cpp7
-rw-r--r--umbrello/dialogs/umlviewdialog.h4
9 files changed, 132 insertions, 139 deletions
diff --git a/umbrello/dialogs/associationpropertiesdialog.cpp b/umbrello/dialogs/associationpropertiesdialog.cpp
index bfc3c60..dd1f737 100644
--- a/umbrello/dialogs/associationpropertiesdialog.cpp
+++ b/umbrello/dialogs/associationpropertiesdialog.cpp
@@ -27,13 +27,13 @@
#include "umlwidgetstylepage.h"
// kde includes
-#include <kfontdialog.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kvbox.h>
// qt includes
#include <QFrame>
+#include <QFontDialog>
#include <QLabel>
#include <QLayout>
#include <QHBoxLayout>
@@ -115,8 +115,8 @@ void AssociationPropertiesDialog::setupPages()
// font page
page = createPage(i18nc("font page name", "Font"), i18n("Font Settings"), Icon_Utils::it_Properties_Font);
layout = new QHBoxLayout(page);
- m_pChooser = new KFontChooser(page, KFontChooser::NoDisplayFlags, QStringList(), false);
- m_pChooser->setFont(m_pAssoc->font());
- m_pChooser->setSampleText(QString::fromLatin1("Association font"));
+ m_pChooser = new QFontDialog();
+ m_pChooser->setCurrentFont(m_pAssoc->font());
+ m_pChooser->setOption(QFontDialog::NoButtons);
layout->addWidget(m_pChooser);
}
diff --git a/umbrello/dialogs/associationpropertiesdialog.h b/umbrello/dialogs/associationpropertiesdialog.h
index d9912bc..9e5a282 100644
--- a/umbrello/dialogs/associationpropertiesdialog.h
+++ b/umbrello/dialogs/associationpropertiesdialog.h
@@ -16,7 +16,7 @@
class AssociationWidget;
class AssociationRolePage;
class AssociationGeneralPage;
-class KFontChooser;
+class QFontDialog;
class UMLWidgetStylePage;
/**
@@ -42,10 +42,10 @@ protected slots:
private:
AssociationGeneralPage *m_pGenPage;
- AssociationRolePage *m_pRolePage;
- UMLWidgetStylePage *m_pStylePage;
- KFontChooser *m_pChooser;
- AssociationWidget *m_pAssoc;
+ AssociationRolePage *m_pRolePage;
+ UMLWidgetStylePage *m_pStylePage;
+ QFontDialog *m_pChooser;
+ AssociationWidget *m_pAssoc;
};
diff --git a/umbrello/dialogs/classpropertiesdialog.cpp b/umbrello/dialogs/classpropertiesdialog.cpp
index 1b9fdae..3e63eb5 100644
--- a/umbrello/dialogs/classpropertiesdialog.cpp
+++ b/umbrello/dialogs/classpropertiesdialog.cpp
@@ -29,10 +29,10 @@
#include "umlwidgetstylepage.h"
// kde includes
-#include <kfontdialog.h>
#include <klocale.h>
// qt includes
+#include <QFontDialog>
#include <QFrame>
#include <QHBoxLayout>
@@ -134,6 +134,7 @@ void ClassPropertiesDialog::init()
m_pEntityConstraintPage = 0;
m_pOptionsPage = 0;
m_pStylePage = 0;
+ m_pChooser = 0;
m_doc = UMLApp::app()->document();
}
@@ -398,7 +399,8 @@ void ClassPropertiesDialog::setupFontPage()
pageItem->setHeader(i18n("Font Settings"));
pageItem->setIcon(Icon_Utils::DesktopIcon(Icon_Utils::it_Properties_Font));
addPage(pageItem);
- m_pChooser = new KFontChooser(page, KFontChooser::NoDisplayFlags, QStringList(), 0);
- m_pChooser->setFont(m_pWidget->font());
+ m_pChooser = new QFontDialog();
+ m_pChooser->setCurrentFont(m_pWidget->font());
+ m_pChooser->setOption(QFontDialog::NoButtons);
topLayout->addWidget(m_pChooser);
}
diff --git a/umbrello/dialogs/classpropertiesdialog.h b/umbrello/dialogs/classpropertiesdialog.h
index 178a604..9068e0d 100644
--- a/umbrello/dialogs/classpropertiesdialog.h
+++ b/umbrello/dialogs/classpropertiesdialog.h
@@ -18,9 +18,9 @@ class ClassGeneralPage;
class ClassifierListPage;
class ClassOptionsPage;
class ConstraintListPage;
-class KFontChooser;
class PackageContentsPage;
class ObjectWidget;
+class QFontDialog;
class UMLDoc;
class UMLObject;
class UMLWidget;
@@ -67,7 +67,7 @@ protected:
void setupFontPage();
private:
- KFontChooser* m_pChooser;
+ QFontDialog* m_pChooser;
ClassGeneralPage* m_pGenPage;
ClassifierListPage* m_pAttPage;
ClassifierListPage* m_pOpsPage;
diff --git a/umbrello/dialogs/codevieweroptionsbase.ui b/umbrello/dialogs/codevieweroptionsbase.ui
index c26f809..72df0d7 100644
--- a/umbrello/dialogs/codevieweroptionsbase.ui
+++ b/umbrello/dialogs/codevieweroptionsbase.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>CodeViewerOptionsBase</class>
- <widget class="QWidget" name="CodeViewerOptionsBase" >
- <property name="geometry" >
+ <widget class="QWidget" name="CodeViewerOptionsBase">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -9,53 +10,46 @@
<height>545</height>
</rect>
</property>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="KFontChooser" name="fontChooser" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="MinimumExpanding" hsizetype="Minimum" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
+ <layout class="QGridLayout">
+ <item row="1" column="0">
+ <widget class="QFontComboBox" name="fontChooser"/>
</item>
- <item row="1" column="0" >
- <widget class="QGroupBox" name="colorGroupBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <item row="2" column="0">
+ <widget class="QGroupBox" name="colorGroupBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="title" >
+ <property name="title">
<string>Colors</string>
</property>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <layout class="QGridLayout" >
- <item row="0" column="2" >
- <widget class="QLabel" name="fontLabel" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <layout class="QGridLayout">
+ <item row="0" column="2">
+ <widget class="QLabel" name="fontLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
+ <property name="text">
<string>Font:</string>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
- <item row="0" column="5" >
- <widget class="KColorButton" name="selectColorButton" >
- <property name="text" >
+ <item row="0" column="5">
+ <widget class="KColorButton" name="selectColorButton">
+ <property name="text">
<string/>
</property>
- <property name="color" >
+ <property name="color" stdset="0">
<color>
<red>255</red>
<green>255</green>
@@ -64,28 +58,28 @@
</property>
</widget>
</item>
- <item row="0" column="0" >
- <widget class="QLabel" name="paperLabel" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+ <item row="0" column="0">
+ <widget class="QLabel" name="paperLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
+ <property name="text">
<string>Paper:</string>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="KColorButton" name="paperColorButton" >
- <property name="text" >
+ <item row="0" column="1">
+ <widget class="KColorButton" name="paperColorButton">
+ <property name="text">
<string/>
</property>
- <property name="color" >
+ <property name="color" stdset="0">
<color>
<red>255</red>
<green>255</green>
@@ -94,34 +88,34 @@
</property>
</widget>
</item>
- <item row="0" column="4" >
- <widget class="QLabel" name="selectedLabel" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+ <item row="0" column="4">
+ <widget class="QLabel" name="selectedLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
+ <property name="text">
<string>Selected:</string>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
- <item row="0" column="3" >
- <widget class="KColorButton" name="fontColorButton" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <item row="0" column="3">
+ <widget class="KColorButton" name="fontColorButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
+ <property name="text">
<string/>
</property>
- <property name="color" >
+ <property name="color" stdset="0">
<color>
<red>0</red>
<green>0</green>
@@ -132,20 +126,20 @@
</item>
</layout>
</item>
- <item row="1" column="0" >
- <layout class="QGridLayout" >
- <item row="1" column="3" >
- <widget class="KColorButton" name="nonEditBlockColorButton" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <item row="1" column="0">
+ <layout class="QGridLayout">
+ <item row="1" column="3">
+ <widget class="KColorButton" name="nonEditBlockColorButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
+ <property name="text">
<string/>
</property>
- <property name="color" >
+ <property name="color" stdset="0">
<color>
<red>213</red>
<green>213</green>
@@ -154,20 +148,20 @@
</property>
</widget>
</item>
- <item row="0" column="0" colspan="4" >
- <layout class="QGridLayout" >
- <item row="0" column="3" >
- <widget class="KColorButton" name="m_hiddenBlockColorButton" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <item row="0" column="0" colspan="4">
+ <layout class="QGridLayout">
+ <item row="0" column="3">
+ <widget class="KColorButton" name="m_hiddenBlockColorButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
+ <property name="text">
<string/>
</property>
- <property name="color" >
+ <property name="color" stdset="0">
<color>
<red>166</red>
<green>254</green>
@@ -176,18 +170,18 @@
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="KColorButton" name="umlObjectColorButton" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <item row="0" column="1">
+ <widget class="KColorButton" name="umlObjectColorButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
+ <property name="text">
<string/>
</property>
- <property name="color" >
+ <property name="color" stdset="0">
<color>
<red>255</red>
<green>170</green>
@@ -196,68 +190,68 @@
</property>
</widget>
</item>
- <item row="0" column="0" >
- <widget class="QLabel" name="textLabel1" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+ <item row="0" column="0">
+ <widget class="QLabel" name="textLabel1">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
- <string>&lt;p align="right">UML object block:&lt;/p></string>
+ <property name="text">
+ <string>&lt;p align=&quot;right&quot;&gt;UML object block:&lt;/p&gt;</string>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
- <item row="0" column="2" >
- <widget class="QLabel" name="textLabel1_2" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+ <item row="0" column="2">
+ <widget class="QLabel" name="textLabel1_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
- <string>&lt;p align="right">Hidden block:&lt;/p></string>
+ <property name="text">
+ <string>&lt;p align=&quot;right&quot;&gt;Hidden block:&lt;/p&gt;</string>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
- <item row="1" column="2" >
- <widget class="QLabel" name="textLabel2" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+ <item row="1" column="2">
+ <widget class="QLabel" name="textLabel2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
- <string>&lt;p align="right">Uneditable text:&lt;/p></string>
+ <property name="text">
+ <string>&lt;p align=&quot;right&quot;&gt;Uneditable text:&lt;/p&gt;</string>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="KColorButton" name="editBlockColorButton" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <item row="1" column="1">
+ <widget class="KColorButton" name="editBlockColorButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
+ <property name="text">
<string/>
</property>
- <property name="color" >
+ <property name="color" stdset="0">
<color>
<red>255</red>
<green>170</green>
@@ -266,18 +260,18 @@
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="textLabel3" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="textLabel3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text" >
- <string>&lt;p align="right">Editable text:&lt;/p></string>
+ <property name="text">
+ <string>&lt;p align=&quot;right&quot;&gt;Editable text:&lt;/p&gt;</string>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>false</bool>
</property>
</widget>
@@ -295,14 +289,9 @@
<extends>QPushButton</extends>
<header>kcolorbutton.h</header>
</customwidget>
- <customwidget>
- <class>KFontChooser</class>
- <extends>QWidget</extends>
- <header>kfontdialog.h</header>
- </customwidget>
</customwidgets>
<includes>
- <include location="local" >kcolorbutton.h</include>
+ <include location="local">kcolorbutton.h</include>
</includes>
<resources/>
<connections/>
diff --git a/umbrello/dialogs/settingsdialog.cpp b/umbrello/dialogs/settingsdialog.cpp
index 31bcf26..81c6cbf 100644
--- a/umbrello/dialogs/settingsdialog.cpp
+++ b/umbrello/dialogs/settingsdialog.cpp
@@ -26,10 +26,10 @@
#include <kcolorbutton.h>
#include <kfiledialog.h>
-#include <kfontdialog.h>
#include <klocale.h>
#include <QCheckBox>
+#include <QFontDialog>
#include <QGroupBox>
#include <QSpinBox>
@@ -249,8 +249,9 @@ void SettingsDialog::setupFontPage()
pageFont->setHeader(i18n("Font Settings"));
pageFont->setIcon(Icon_Utils::DesktopIcon(Icon_Utils::it_Properties_Font));
addPage(pageFont);
- m_FontWidgets.chooser = new KFontChooser(page, KFontChooser::NoDisplayFlags, QStringList(), 0);
- m_FontWidgets.chooser->setFont(m_pOptionState->uiState.font);
+ m_FontWidgets.chooser = new QFontDialog();
+ m_FontWidgets.chooser->setCurrentFont(parentWidget()->font());
+ m_FontWidgets.chooser->setOption(QFontDialog::NoButtons);
topLayout->addWidget(m_FontWidgets.chooser);
}
diff --git a/umbrello/dialogs/settingsdialog.h b/umbrello/dialogs/settingsdialog.h
index 5cb8bd0..0495d55 100644
--- a/umbrello/dialogs/settingsdialog.h
+++ b/umbrello/dialogs/settingsdialog.h
@@ -21,8 +21,8 @@ class CodeGenOptionsPage;
class CodeViewerOptionsPage;
class GeneralOptionPage;
class KColorButton;
-class KFontChooser;
class QCheckBox;
+class QFontDialog;
class QGroupBox;
class QSpinBox;
class UMLWidgetStylePage;
@@ -72,7 +72,7 @@ private:
};//end struct UIWidgets
struct FontWidgets {
- KFontChooser * chooser;
+ QFontDialog * chooser;
};
//private methods
diff --git a/umbrello/dialogs/umlviewdialog.cpp b/umbrello/dialogs/umlviewdialog.cpp
index e0cbf67..6f5c9d8 100644
--- a/umbrello/dialogs/umlviewdialog.cpp
+++ b/umbrello/dialogs/umlviewdialog.cpp
@@ -25,10 +25,10 @@
// kde includes
#include <klocale.h>
#include <kmessagebox.h>
-#include <kfontdialog.h>
// qt includes
#include <QFrame>
+#include <QFontDialog>
#include <QHBoxLayout>
/**
@@ -158,8 +158,9 @@ void UMLViewDialog::setupFontPage()
m_pageFontItem->setIcon(Icon_Utils::DesktopIcon(Icon_Utils::it_Properties_Font));
addPage(m_pageFontItem);
- m_pChooser = new KFontChooser(page, KFontChooser::NoDisplayFlags, QStringList(), 0);
- m_pChooser->setFont(m_pScene->optionState().uiState.font);
+ m_pChooser = new QFontDialog();
+ m_pChooser->setCurrentFont(m_pScene->optionState().uiState.font);
+ m_pChooser->setOption(QFontDialog::NoButtons);
topLayout->addWidget(m_pChooser);
}
diff --git a/umbrello/dialogs/umlviewdialog.h b/umbrello/dialogs/umlviewdialog.h
index b988f3a..07a6ca7 100644
--- a/umbrello/dialogs/umlviewdialog.h
+++ b/umbrello/dialogs/umlviewdialog.h
@@ -20,10 +20,10 @@
class ClassOptionsPage;
class DiagramPropertiesPage;
+class QFontDialog;
class UMLScene;
class UMLView;
class UMLWidgetStylePage;
-class KFontChooser;
/**
* @author Paul Hensgen
@@ -52,7 +52,7 @@ protected:
UMLScene* m_pScene; ///< the scene to represent
Settings::OptionState m_options;
- KFontChooser* m_pChooser;
+ QFontDialog* m_pChooser;
DiagramPropertiesPage* m_diagramPropertiesPage;
ClassOptionsPage* m_pOptionsPage;
UMLWidgetStylePage* m_pStylePage;