home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bstringutils.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  1006 b   |  40 lines

  1. /* 
  2.  *
  3.  * $Id: k3bstringutils.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16.  
  17. #ifndef _K3B_STRING_UTILS_H_
  18. #define _K3B_STRING_UTILS_H_
  19.  
  20. #include <qstring.h>
  21.  
  22. class QFontMetrics;
  23.  
  24. namespace K3b
  25. {
  26.   /**
  27.    * Cuts the text at the end.
  28.    * Example: "some long text" -> "some lo..."
  29.    */
  30.   QString cutToWidth( const QFontMetrics&, const QString&, int );
  31.  
  32.   /**
  33.    * squeezes the text.
  34.    * Example: "some long text" -> "some...ext"
  35.    */
  36.   QString squeezeTextToWidth( const QFontMetrics& fm, const QString& fullText, int cutWidth );
  37. }
  38.  
  39. #endif
  40.