From bc7e89732847be30d0ef7e829293171c7a7c8bd7 Mon Sep 17 00:00:00 2001 From: Jeremy Paul Whiting Date: Sat, 8 Jan 2011 14:10:24 +0000 Subject: [PATCH] Nuke kdeeduui. fontUtils has moved into kdelibs/kdeui/fonts. svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=1212897 --- CMakeLists.txt | 1 - kdeeduui/CMakeLists.txt | 24 ------------------ kdeeduui/kedufontutils.cpp | 45 ---------------------------------- kdeeduui/kedufontutils.h | 30 ----------------------- kdeeduui/libkdeedu_ui_export.h | 40 ------------------------------ kdeeduui/tests/CMakeLists.txt | 23 ----------------- 6 files changed, 163 deletions(-) delete mode 100644 kdeeduui/CMakeLists.txt delete mode 100644 kdeeduui/kedufontutils.cpp delete mode 100644 kdeeduui/kedufontutils.h delete mode 100644 kdeeduui/libkdeedu_ui_export.h delete mode 100644 kdeeduui/tests/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index c150f88..a63bc25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 index 3df2943..0000000 --- a/kdeeduui/CMakeLists.txt +++ /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 index 39ae6f3..0000000 --- a/kdeeduui/kedufontutils.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005-2006 by Albert Astals Cid * - * * - * 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 - -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 index de8861f..0000000 --- a/kdeeduui/kedufontutils.h +++ /dev/null @@ -1,30 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005 by Albert Astals Cid * - * * - * 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 index cec0149..0000000 --- a/kdeeduui/libkdeedu_ui_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - 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 - -#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 index 88b27f7..0000000 --- a/kdeeduui/tests/CMakeLists.txt +++ /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 -- 2.47.3