updated for version 7.0003
diff --git a/src/gui.h b/src/gui.h
index 4357c46..02028f2 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -30,6 +30,23 @@
 # include "gui_beval.h"
 #endif
 
+#ifdef FEAT_GUI_KDE
+# include <X11/Intrinsic.h>
+
+/* used only as pointer to, so casting to int is ok */
+# ifdef __cplusplus
+class QScrollBar;
+class QPopupMenu;
+class QFont;
+class VimWidget;
+# else
+#  define QScrollBar int
+#  define QPopupMenu int
+#  define QFont int
+#  define VimWidget  int
+# endif
+#endif
+
 #ifdef FEAT_GUI_GTK
 # include <X11/Intrinsic.h>
 # include <gtk/gtk.h>
@@ -85,7 +102,7 @@
  * GUIs that support dropping files on a running Vim.
  */
 #if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MAC) \
-	|| defined(FEAT_GUI_BEOS) || defined(FEAT_GUI_GTK)
+	|| defined(FEAT_GUI_BEOS) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)
 # define HAVE_DROP_FILE
 #endif
 
@@ -152,7 +169,7 @@
 #define DRAW_TRANSP		0x01	/* draw with transparant bg */
 #define DRAW_BOLD		0x02	/* draw bold text */
 #define DRAW_UNDERL		0x04	/* draw underline text */
-#if defined(RISCOS) || defined(HAVE_GTK2)
+#if defined(RISCOS) || defined(HAVE_GTK2) || defined (FEAT_GUI_KDE)
 # define DRAW_ITALIC		0x08	/* draw italic text */
 #endif
 #define DRAW_CURSOR		0x10	/* drawing block cursor (win32) */
@@ -171,7 +188,7 @@
 #endif
 #define TOOLBAR_BORDER_HEIGHT	12  /* room above+below buttons for MSWindows */
 
-#if defined(NO_CONSOLE) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
+#if defined(NO_CONSOLE) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE) || defined(FEAT_GUI_X11)
 # define NO_CONSOLE_INPUT	/* use no_console_input() to check if there
 				   is no console input possible */
 #endif
@@ -195,6 +212,9 @@
     int		width;		/* Current width of scroll bar in cols */
 #endif
     int		status_height;	/* Height of status line */
+#ifdef FEAT_GUI_KDE
+    QScrollBar *w;
+#endif
 #ifdef FEAT_GUI_X11
     Widget	id;		/* Id of real scroll bar */
 #endif
@@ -231,6 +251,12 @@
 				   displays there is a tiny chance this is an
 				   actual color */
 
+#ifdef FEAT_GUI_KDE
+  typedef QFont		*GuiFont;
+  typedef QFont		*GuiFontset;
+# define NOFONT		(GuiFont)NULL
+# define NOFONTSET	(GuiFontset)NULL
+#endif
 #ifdef FEAT_GUI_GTK
 # ifdef HAVE_GTK2
   typedef PangoFontDescription	*GuiFont;       /* handle for a GUI font */
@@ -254,10 +280,12 @@
 #   define NOFONT	(GuiFont)0
 #   define NOFONTSET	(GuiFontset)0
 #  else
+#   if !defined(FEAT_GUI_KDE)
   typedef long_u	GuiFont;	/* handle for a GUI font */
   typedef long_u	GuiFontset;	/* handle for a GUI fontset */
 #   define NOFONT	(GuiFont)0
 #   define NOFONTSET	(GuiFontset)0
+#   endif
 #  endif
 # endif
 #endif
@@ -375,6 +403,13 @@
     Bool	color_approx;	    /* Some color was approximated */
 #endif
 
+#ifdef FEAT_GUI_KDE
+    VimWidget   *w;                 /* Vim widget */
+    Display     *dpy;               /* X display */
+    QFont	*current_font;
+    char_u	*fontname;	    /* font name from font selection dialog */
+#endif
+
 #ifdef FEAT_GUI_GTK
     int		visibility;	    /* Is shell partially/fully obscured? */
     GdkCursor	*blank_pointer;	    /* Blank pointer */
@@ -507,7 +542,7 @@
 }
 gui_win_pos_T;
 
-#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
+#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE) \
 	|| defined(MSWIN_FIND_REPLACE)
 /*
  * Flags used to distinguish the different contexts in which the