]> Git trees. - libqmvoc.git/commitdiff
Nuke kdeeduui. fontUtils has moved into kdelibs/kdeui/fonts.
authorJeremy Paul Whiting <jpwhiting@kde.org>
Sat, 8 Jan 2011 14:10:24 +0000 (14:10 +0000)
committerJeremy Paul Whiting <jpwhiting@kde.org>
Sat, 8 Jan 2011 14:10:24 +0000 (14:10 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=1212897

CMakeLists.txt
kdeeduui/CMakeLists.txt [deleted file]
kdeeduui/kedufontutils.cpp [deleted file]
kdeeduui/kedufontutils.h [deleted file]
kdeeduui/libkdeedu_ui_export.h [deleted file]
kdeeduui/tests/CMakeLists.txt [deleted file]

index c150f88608a29f081f1ac0dbc24c9f9ae02dff32..a63bc25f19fd99705393d5027759d0ed1d5d51ba 100644 (file)
@@ -3,7 +3,6 @@ project(libkdeedu)
 #add_definitions( -Wall -fprofile-arcs -ftest-coverage )
 
 add_subdirectory(keduvocdocument)
-add_subdirectory(kdeeduui)
 #add_subdirectory(widgets)
 add_subdirectory(qtmmlwidget)
 add_subdirectory(icons)
diff --git a/kdeeduui/CMakeLists.txt b/kdeeduui/CMakeLists.txt
deleted file mode 100644 (file)
index 3df2943..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#add_subdirectory(tests)
-
-########### next target ###############
-
-set(kdeeduui_LIB_SRCS
-   kedufontutils.cpp
-)
-
-
-kde4_add_library(kdeeduui SHARED ${kdeeduui_LIB_SRCS})
-
-target_link_libraries(kdeeduui ${KDE4_KHTML_LIBS} ${QT_QTXML_LIBRARY})
-
-set_target_properties(kdeeduui PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
-install(TARGETS kdeeduui  ${INSTALL_TARGETS_DEFAULT_ARGS})
-
-
-########### install files ###############
-
-install(FILES
-   libkdeedu_ui_export.h
-   kedufontutils.h DESTINATION ${INCLUDE_INSTALL_DIR}/libkdeedu  COMPONENT Devel
-)
diff --git a/kdeeduui/kedufontutils.cpp b/kdeeduui/kedufontutils.cpp
deleted file mode 100644 (file)
index 39ae6f3..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2005-2006 by Albert Astals Cid <aacid@kde.org>          *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-
-#include "kedufontutils.h"
-
-#include <qpainter.h>
-
-int fontUtils::fontSize(QPainter &p, const QString &s1, int w, int h, Flags flags)
-{
-    int size;
-    QRect aux1;
-    bool done = false;
-
-    size = 28;
-
-    while (!done && size > 1)
-    {
-        QFont f = p.font();
-        f.setPointSize(size);
-        p.setFont(f);
-        int qtFlags = Qt::AlignCenter | Qt::TextWordWrap;
-        if (flags & DoNotAllowWordWrap) qtFlags = qtFlags & ~Qt::TextWordWrap;
-        aux1 = p.boundingRect(QRect(0, 0, w, h), qtFlags, s1);
-        if (aux1.width() == 0 || aux1.height() == 0) return -1;
-        else if (aux1.width() > w || aux1.height() > h) {
-            if (flags & DoNotAllowWordWrap || aux1.height() == p.fontMetrics().height()) {
-                size = qMin(w * size / aux1.width(), h * size / aux1.height());
-            } else {
-                // Word wrapping can completely change the
-                // layout of the text, so the above will not work.
-                size = size - 1;
-            }
-        }
-        else done = true;
-    }
-
-    return size;
-}
-
diff --git a/kdeeduui/kedufontutils.h b/kdeeduui/kedufontutils.h
deleted file mode 100644 (file)
index de8861f..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2005 by Albert Astals Cid <tsdgeos@terra.es>            *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-
-#ifndef FONTUTILS_H
-#define FONTUTILS_H
-
-#include "libkdeedu_ui_export.h"
-
-class QPainter;
-class QString;
-
-namespace fontUtils
-{
-       enum Flags
-       {
-               NoFlags = 1,
-               DoNotAllowWordWrap = 2
-       };
-
-       int KDEEDUUI_EXPORT fontSize(QPainter &p, const QString &s1, int w, int h, Flags flags = NoFlags);
-}
-
-#endif
-
diff --git a/kdeeduui/libkdeedu_ui_export.h b/kdeeduui/libkdeedu_ui_export.h
deleted file mode 100644 (file)
index cec0149..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*  This file is part of the KDE project
-    Copyright (C) 2007 David Faure <faure@kde.org>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#ifndef LIBKDEEDU_UI_EXPORT_H
-#define LIBKDEEDU_UI_EXPORT_H
-
-/* needed for KDE_EXPORT and KDE_IMPORT macros */
-#include <kdemacros.h>
-
-#ifndef KDEEDUUI_EXPORT
-# if defined(MAKE_KDEEDUUI_LIB)
-   /* We are building this library */ 
-#  define KDEEDUUI_EXPORT KDE_EXPORT
-# else
-   /* We are using this library */ 
-#  define KDEEDUUI_EXPORT KDE_IMPORT
-# endif
-#endif
-
-# ifndef KDEEDUUI_EXPORT_DEPRECATED
-#  define KDEEDUUI_EXPORT_DEPRECATED KDE_DEPRECATED KDEEDUUI_EXPORT
-# endif
-
-#endif
diff --git a/kdeeduui/tests/CMakeLists.txt b/kdeeduui/tests/CMakeLists.txt
deleted file mode 100644 (file)
index 88b27f7..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-include_directories( ${CMAKE_SOURCE_DIR}/kdeeduui  )
-
-
-########### install files ###############
-
-
-
-
-
-#original Makefile.am contents follow:
-
-#SUBDIRS = .
-#INCLUDES = -I.  -I$(top_srcdir)/kdeeduui $(all_includes)
-#LDADD = ../libkdeeduui.la
-#LDFLAGS = $(all_libraries)
-#
-##check_PROGRAMS = entrydialogs
-#check_PROGRAMS = 
-#
-##all: check
-#
-##entrydialogs_SOURCES         = entrydialogs.cpp