summaryrefslogtreecommitdiffstats
path: root/python/pykde/extra
diff options
context:
space:
mode:
Diffstat (limited to 'python/pykde/extra')
-rw-r--r--python/pykde/extra/kde300/kaccelaction.h202
-rw-r--r--python/pykde/extra/kde300/kaccelbase.h233
-rw-r--r--python/pykde/extra/kde300/kicontheme.h217
-rw-r--r--python/pykde/extra/kde300/kkeyserver_x11.h131
-rw-r--r--python/pykde/extra/kde300/konsole_part.h223
-rw-r--r--python/pykde/extra/kde300/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde300/ksycocafactory.h135
-rw-r--r--python/pykde/extra/kde300/ktoolbarbutton.h306
-rw-r--r--python/pykde/extra/kde300/kurifilter.h593
-rw-r--r--python/pykde/extra/kde301/kaccelaction.h202
-rw-r--r--python/pykde/extra/kde301/kaccelbase.h233
-rw-r--r--python/pykde/extra/kde301/kicontheme.h217
-rw-r--r--python/pykde/extra/kde301/kkeyserver_x11.h131
-rw-r--r--python/pykde/extra/kde301/konsole_part.h223
-rw-r--r--python/pykde/extra/kde301/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde301/ksycocafactory.h135
-rw-r--r--python/pykde/extra/kde301/ktoolbarbutton.h313
-rw-r--r--python/pykde/extra/kde301/kurifilter.h593
-rw-r--r--python/pykde/extra/kde303/kaccelaction.h202
-rw-r--r--python/pykde/extra/kde303/kaccelbase.h233
-rw-r--r--python/pykde/extra/kde303/kicontheme.h217
-rw-r--r--python/pykde/extra/kde303/kkeyserver_x11.h131
-rw-r--r--python/pykde/extra/kde303/konsole_part.h223
-rw-r--r--python/pykde/extra/kde303/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde303/ksycocafactory.h135
-rw-r--r--python/pykde/extra/kde303/ktoolbarbutton.h313
-rw-r--r--python/pykde/extra/kde303/kurifilter.h593
-rw-r--r--python/pykde/extra/kde310/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde310/kaccelbase.h229
-rw-r--r--python/pykde/extra/kde310/kicontheme.h331
-rw-r--r--python/pykde/extra/kde310/kkeyserver_x11.h435
-rw-r--r--python/pykde/extra/kde310/konsole_part.h223
-rw-r--r--python/pykde/extra/kde310/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde310/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde310/ksycocafactory.h137
-rw-r--r--python/pykde/extra/kde310/ktoolbarbutton.h317
-rw-r--r--python/pykde/extra/kde310/kurifilter.h602
-rw-r--r--python/pykde/extra/kde311/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde311/kaccelbase.h229
-rw-r--r--python/pykde/extra/kde311/kicontheme.h331
-rw-r--r--python/pykde/extra/kde311/kkeyserver_x11.h435
-rw-r--r--python/pykde/extra/kde311/konsole_part.h223
-rw-r--r--python/pykde/extra/kde311/kpanelmenu.h177
-rw-r--r--python/pykde/extra/kde311/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde311/ksycocafactory.h137
-rw-r--r--python/pykde/extra/kde311/ktoolbarbutton.h317
-rw-r--r--python/pykde/extra/kde311/kurifilter.h602
-rw-r--r--python/pykde/extra/kde312/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde312/kaccelbase.h229
-rw-r--r--python/pykde/extra/kde312/kicontheme.h331
-rw-r--r--python/pykde/extra/kde312/kkeyserver_x11.h435
-rw-r--r--python/pykde/extra/kde312/konsole_part.h223
-rw-r--r--python/pykde/extra/kde312/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde312/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde312/ksycocafactory.h137
-rw-r--r--python/pykde/extra/kde312/ktoolbarbutton.h317
-rw-r--r--python/pykde/extra/kde312/kurifilter.h602
-rw-r--r--python/pykde/extra/kde313/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde313/kaccelbase.h229
-rw-r--r--python/pykde/extra/kde313/kicontheme.h331
-rw-r--r--python/pykde/extra/kde313/kkeyserver_x11.h435
-rw-r--r--python/pykde/extra/kde313/konsole_part.h223
-rw-r--r--python/pykde/extra/kde313/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde313/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde313/ksycocafactory.h137
-rw-r--r--python/pykde/extra/kde313/ktoolbarbutton.h317
-rw-r--r--python/pykde/extra/kde313/kurifilter.h602
-rw-r--r--python/pykde/extra/kde314/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde314/kaccelbase.h229
-rw-r--r--python/pykde/extra/kde314/kicontheme.h331
-rw-r--r--python/pykde/extra/kde314/kkeyserver_x11.h435
-rw-r--r--python/pykde/extra/kde314/konsole_part.h223
-rw-r--r--python/pykde/extra/kde314/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde314/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde314/ksycocafactory.h137
-rw-r--r--python/pykde/extra/kde314/ktoolbarbutton.h317
-rw-r--r--python/pykde/extra/kde314/kurifilter.h602
-rw-r--r--python/pykde/extra/kde315/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde315/kaccelbase.h229
-rw-r--r--python/pykde/extra/kde315/kicontheme.h331
-rw-r--r--python/pykde/extra/kde315/kkeyserver_x11.h435
-rw-r--r--python/pykde/extra/kde315/konsole_part.h223
-rw-r--r--python/pykde/extra/kde315/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde315/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde315/ksycocafactory.h137
-rw-r--r--python/pykde/extra/kde315/ktoolbarbutton.h317
-rw-r--r--python/pykde/extra/kde315/kurifilter.h602
-rw-r--r--python/pykde/extra/kde320/configwidget.h58
-rw-r--r--python/pykde/extra/kde320/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde320/kaccelbase.h230
-rw-r--r--python/pykde/extra/kde320/kicontheme.h334
-rw-r--r--python/pykde/extra/kde320/kkeyserver_x11.h433
-rw-r--r--python/pykde/extra/kde320/konsole_part.h223
-rw-r--r--python/pykde/extra/kde320/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde320/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde320/ksharedptr.h171
-rw-r--r--python/pykde/extra/kde320/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde320/ktoolbarbutton.h315
-rw-r--r--python/pykde/extra/kde320/kurifilter.h644
-rw-r--r--python/pykde/extra/kde320/selectdialog.h87
-rw-r--r--python/pykde/extra/kde321/configwidget.h58
-rw-r--r--python/pykde/extra/kde321/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde321/kaccelbase.h230
-rw-r--r--python/pykde/extra/kde321/kicontheme.h334
-rw-r--r--python/pykde/extra/kde321/kkeyserver_x11.h433
-rw-r--r--python/pykde/extra/kde321/konsole_part.h223
-rw-r--r--python/pykde/extra/kde321/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde321/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde321/ksharedptr.h171
-rw-r--r--python/pykde/extra/kde321/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde321/ktoolbarbutton.h315
-rw-r--r--python/pykde/extra/kde321/kurifilter.h644
-rw-r--r--python/pykde/extra/kde321/selectdialog.h87
-rw-r--r--python/pykde/extra/kde322/configwidget.h58
-rw-r--r--python/pykde/extra/kde322/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde322/kaccelbase.h230
-rw-r--r--python/pykde/extra/kde322/kicontheme.h334
-rw-r--r--python/pykde/extra/kde322/kkeyserver_x11.h433
-rw-r--r--python/pykde/extra/kde322/konsole_part.h223
-rw-r--r--python/pykde/extra/kde322/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde322/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde322/ksharedptr.h171
-rw-r--r--python/pykde/extra/kde322/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde322/ktoolbarbutton.h315
-rw-r--r--python/pykde/extra/kde322/kurifilter.h644
-rw-r--r--python/pykde/extra/kde322/selectdialog.h87
-rw-r--r--python/pykde/extra/kde323/configwidget.h58
-rw-r--r--python/pykde/extra/kde323/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde323/kaccelbase.h230
-rw-r--r--python/pykde/extra/kde323/kicontheme.h334
-rw-r--r--python/pykde/extra/kde323/kkeyserver_x11.h433
-rw-r--r--python/pykde/extra/kde323/konsole_part.h223
-rw-r--r--python/pykde/extra/kde323/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde323/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde323/ksharedptr.h171
-rw-r--r--python/pykde/extra/kde323/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde323/ktoolbarbutton.h315
-rw-r--r--python/pykde/extra/kde323/kurifilter.h644
-rw-r--r--python/pykde/extra/kde323/selectdialog.h87
-rw-r--r--python/pykde/extra/kde330/configwidget.h58
-rw-r--r--python/pykde/extra/kde330/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde330/kaccelbase.h230
-rw-r--r--python/pykde/extra/kde330/kicontheme.h336
-rw-r--r--python/pykde/extra/kde330/kkeyserver_x11.h433
-rw-r--r--python/pykde/extra/kde330/konsole_part.h229
-rw-r--r--python/pykde/extra/kde330/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde330/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde330/ksharedptr.h175
-rw-r--r--python/pykde/extra/kde330/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde330/ktoolbarbutton.h315
-rw-r--r--python/pykde/extra/kde330/kurifilter.h644
-rw-r--r--python/pykde/extra/kde330/selectdialog.h87
-rw-r--r--python/pykde/extra/kde331/configwidget.h58
-rw-r--r--python/pykde/extra/kde331/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde331/kaccelbase.h230
-rw-r--r--python/pykde/extra/kde331/kicontheme.h338
-rw-r--r--python/pykde/extra/kde331/kkeyserver_x11.h433
-rw-r--r--python/pykde/extra/kde331/konsole_part.h229
-rw-r--r--python/pykde/extra/kde331/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde331/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde331/ksharedptr.h175
-rw-r--r--python/pykde/extra/kde331/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde331/ktoolbarbutton.h315
-rw-r--r--python/pykde/extra/kde331/kurifilter.h644
-rw-r--r--python/pykde/extra/kde331/selectdialog.h87
-rw-r--r--python/pykde/extra/kde332/configwidget.h58
-rw-r--r--python/pykde/extra/kde332/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde332/kaccelbase.h230
-rw-r--r--python/pykde/extra/kde332/kicontheme.h338
-rw-r--r--python/pykde/extra/kde332/kkeyserver_x11.h433
-rw-r--r--python/pykde/extra/kde332/konsole_part.h229
-rw-r--r--python/pykde/extra/kde332/kpanelmenu.h181
-rw-r--r--python/pykde/extra/kde332/krecentdirs.h68
-rw-r--r--python/pykde/extra/kde332/ksharedptr.h175
-rw-r--r--python/pykde/extra/kde332/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde332/ktoolbarbutton.h315
-rw-r--r--python/pykde/extra/kde332/kurifilter.h644
-rw-r--r--python/pykde/extra/kde332/selectdialog.h87
-rw-r--r--python/pykde/extra/kde340/configwidget.h58
-rw-r--r--python/pykde/extra/kde340/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde340/kaccelbase.h229
-rw-r--r--python/pykde/extra/kde340/kicontheme.h355
-rw-r--r--python/pykde/extra/kde340/kkeyserver.h29
-rw-r--r--python/pykde/extra/kde340/kkeyserver_x11.h461
-rw-r--r--python/pykde/extra/kde340/konsole_part.h228
-rw-r--r--python/pykde/extra/kde340/kpanelmenu.h182
-rw-r--r--python/pykde/extra/kde340/krecentdirs.h70
-rw-r--r--python/pykde/extra/kde340/ksharedptr.h175
-rw-r--r--python/pykde/extra/kde340/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde340/ktoolbarbutton.h329
-rw-r--r--python/pykde/extra/kde340/kurifilter.h647
-rw-r--r--python/pykde/extra/kde340/selectdialog.h87
-rw-r--r--python/pykde/extra/kde341/configwidget.h58
-rw-r--r--python/pykde/extra/kde341/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde341/kaccelbase.h229
-rw-r--r--python/pykde/extra/kde341/kicontheme.h355
-rw-r--r--python/pykde/extra/kde341/kkeyserver.h29
-rw-r--r--python/pykde/extra/kde341/kkeyserver_x11.h461
-rw-r--r--python/pykde/extra/kde341/konsole_part.h228
-rw-r--r--python/pykde/extra/kde341/kpanelmenu.h182
-rw-r--r--python/pykde/extra/kde341/krecentdirs.h70
-rw-r--r--python/pykde/extra/kde341/ksharedptr.h175
-rw-r--r--python/pykde/extra/kde341/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde341/ktoolbarbutton.h329
-rw-r--r--python/pykde/extra/kde341/kurifilter.h647
-rw-r--r--python/pykde/extra/kde341/selectdialog.h87
-rw-r--r--python/pykde/extra/kde342/configwidget.h58
-rw-r--r--python/pykde/extra/kde342/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde342/kaccelbase.h229
-rw-r--r--python/pykde/extra/kde342/kicontheme.h355
-rw-r--r--python/pykde/extra/kde342/kkeyserver.h29
-rw-r--r--python/pykde/extra/kde342/kkeyserver_x11.h469
-rw-r--r--python/pykde/extra/kde342/konsole_part.h228
-rw-r--r--python/pykde/extra/kde342/kpanelmenu.h182
-rw-r--r--python/pykde/extra/kde342/krecentdirs.h70
-rw-r--r--python/pykde/extra/kde342/ksharedptr.h175
-rw-r--r--python/pykde/extra/kde342/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde342/ktoolbarbutton.h329
-rw-r--r--python/pykde/extra/kde342/kurifilter.h647
-rw-r--r--python/pykde/extra/kde342/selectdialog.h87
-rw-r--r--python/pykde/extra/kde343/configwidget.h58
-rw-r--r--python/pykde/extra/kde343/kaccelaction.h564
-rw-r--r--python/pykde/extra/kde343/kaccelbase.h229
-rw-r--r--python/pykde/extra/kde343/kicontheme.h355
-rw-r--r--python/pykde/extra/kde343/kkeyserver.h29
-rw-r--r--python/pykde/extra/kde343/kkeyserver_x11.h469
-rw-r--r--python/pykde/extra/kde343/konsole_part.h228
-rw-r--r--python/pykde/extra/kde343/kpanelmenu.h182
-rw-r--r--python/pykde/extra/kde343/krecentdirs.h70
-rw-r--r--python/pykde/extra/kde343/ksharedptr.h175
-rw-r--r--python/pykde/extra/kde343/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde343/ktoolbarbutton.h329
-rw-r--r--python/pykde/extra/kde343/kurifilter.h647
-rw-r--r--python/pykde/extra/kde343/selectdialog.h87
-rw-r--r--python/pykde/extra/kde350/configwidget.h58
-rw-r--r--python/pykde/extra/kde350/kaccelaction.h576
-rw-r--r--python/pykde/extra/kde350/kaccelbase.h260
-rw-r--r--python/pykde/extra/kde350/kicontheme.h355
-rw-r--r--python/pykde/extra/kde350/kkeyserver.h29
-rw-r--r--python/pykde/extra/kde350/kkeyserver_x11.h477
-rw-r--r--python/pykde/extra/kde350/konsole_part.h241
-rw-r--r--python/pykde/extra/kde350/kpanelmenu.h182
-rw-r--r--python/pykde/extra/kde350/krecentdirs.h70
-rw-r--r--python/pykde/extra/kde350/ksharedptr.h175
-rw-r--r--python/pykde/extra/kde350/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde350/ktoolbarbutton.h330
-rw-r--r--python/pykde/extra/kde350/kurifilter.h647
-rw-r--r--python/pykde/extra/kde350/selectdialog.h87
-rw-r--r--python/pykde/extra/kde351/kaccelaction.h576
-rw-r--r--python/pykde/extra/kde351/kaccelbase.h260
-rw-r--r--python/pykde/extra/kde351/kicontheme.h355
-rw-r--r--python/pykde/extra/kde351/kkeyserver.h29
-rw-r--r--python/pykde/extra/kde351/kkeyserver_x11.h477
-rw-r--r--python/pykde/extra/kde351/konsole_part.h241
-rw-r--r--python/pykde/extra/kde351/kpanelmenu.h182
-rw-r--r--python/pykde/extra/kde351/ksharedptr.h175
-rw-r--r--python/pykde/extra/kde351/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde351/ktoolbarbutton.h330
-rw-r--r--python/pykde/extra/kde351/kurifilter.h647
-rw-r--r--python/pykde/extra/kde352/kaccelaction.h576
-rw-r--r--python/pykde/extra/kde352/kaccelbase.h260
-rw-r--r--python/pykde/extra/kde352/kicontheme.h355
-rw-r--r--python/pykde/extra/kde352/kkeyserver.h29
-rw-r--r--python/pykde/extra/kde352/kkeyserver_x11.h477
-rw-r--r--python/pykde/extra/kde352/konsole_part.h241
-rw-r--r--python/pykde/extra/kde352/kpanelmenu.h182
-rw-r--r--python/pykde/extra/kde352/ksharedptr.h175
-rw-r--r--python/pykde/extra/kde352/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde352/ktoolbarbutton.h330
-rw-r--r--python/pykde/extra/kde352/kurifilter.h647
-rw-r--r--python/pykde/extra/kde353/kaccelaction.h576
-rw-r--r--python/pykde/extra/kde353/kaccelbase.h260
-rw-r--r--python/pykde/extra/kde353/kicontheme.h355
-rw-r--r--python/pykde/extra/kde353/kkeyserver.h29
-rw-r--r--python/pykde/extra/kde353/kkeyserver_x11.h477
-rw-r--r--python/pykde/extra/kde353/konsole_part.h241
-rw-r--r--python/pykde/extra/kde353/kpanelmenu.h182
-rw-r--r--python/pykde/extra/kde353/ksharedptr.h175
-rw-r--r--python/pykde/extra/kde353/ksycocafactory.h143
-rw-r--r--python/pykde/extra/kde353/ktoolbarbutton.h330
-rw-r--r--python/pykde/extra/kde353/kurifilter.h647
281 files changed, 0 insertions, 77172 deletions
diff --git a/python/pykde/extra/kde300/kaccelaction.h b/python/pykde/extra/kde300/kaccelaction.h
deleted file mode 100644
index c1e53f5a..00000000
--- a/python/pykde/extra/kde300/kaccelaction.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/*
- KAccelAction holds information an a given action, such as "Execute Command"
-
- 1) KAccelAction = "Execute Command"
- Default3 = "Alt+F2"
- Default4 = "Meta+Enter;Alt+F2"
- 1) KShortcut = "Meta+Enter"
- 1) KKeySequence = "Meta+Enter"
- 1) KKey = "Meta+Enter"
- 1) Meta+Enter
- 2) Meta+Keypad_Enter
- 2) KShortcut = "Alt+F2"
- 1) KKeySequence = "Alt+F2"
- 1) Alt+F2
- 2) KAccelAction = "Something"
- Default3 = ""
- Default4 = ""
- 1) KShortcut = "Meta+X,Asterisk"
- 1) KKeySequence = "Meta+X,Asterisk"
- 1) KKey = "Meta+X"
- 1) Meta+X
- 2) KKey = "Asterisk"
- 1) Shift+8 (English layout)
- 2) Keypad_Asterisk
-*/
-
-//---------------------------------------------------------------------
-// KAccelAction
-//---------------------------------------------------------------------
-
-class KAccelAction
-{
- public:
- KAccelAction();
- KAccelAction( const KAccelAction& );
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- void clear();
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- KAccelAction& operator=( const KAccelAction& );
-
- const TQString& name() const { return m_sName; }
- const TQString& label() const { return m_sLabel; }
- const TQString& whatsThis() const { return m_sWhatsThis; }
- const KShortcut& shortcut() const { return m_cut; }
- const KShortcut& shortcutDefault() const;
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
- const char* methodSlotPtr() const { return m_psMethodSlot; }
- bool isConfigurable() const { return m_bConfigurable; }
- bool isEnabled() const { return m_bEnabled; }
-
- void setName( const TQString& );
- void setLabel( const TQString& );
- void setWhatsThis( const TQString& );
- bool setShortcut( const KShortcut& rgCuts );
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
- void setConfigurable( bool );
- void setEnabled( bool );
-
- int getID() const { return m_nIDAccel; }
- void setID( int n ) { m_nIDAccel = n; }
- bool isConnected() const;
-
- bool setKeySequence( uint i, const KKeySequence& );
- void clearShortcut();
- bool contains( const KKeySequence& );
-
- TQString toString() const;
- TQString toStringInternal() const;
-
- static bool useFourModifierKeys();
- static void useFourModifierKeys( bool );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-class KAccelActions
-{
- public:
- KAccelActions();
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- void clear();
- bool init( const KAccelActions& );
- bool init( KConfigBase& config, const TQString& sGroup );
-
- void updateShortcuts( KAccelActions& );
-
- int actionIndex( const TQString& sAction ) const;
- KAccelAction* actionPtr( uint );
- const KAccelAction* actionPtr( uint ) const;
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( KKeySequence cut );
- KAccelAction& operator []( uint );
- const KAccelAction& operator []( uint ) const;
-
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
- bool remove( const TQString& sAction );
-
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- void emitKeycodeChanged();
-
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde300/kaccelbase.h b/python/pykde/extra/kde300/kaccelbase.h
deleted file mode 100644
index cd764bc3..00000000
--- a/python/pykde/extra/kde300/kaccelbase.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-class KAccelBasePrivate;
-/**
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * @ref KKeyChooser GUI.
- *
- * A @ref KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * @ref KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for @ref insertItem() is used only
- * in the configuration dialog.
- *<pre>
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *</pre>
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the @ref KStdAccel::Print from above.
- *
- * <pre>
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * </pre>
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * <pre>
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * </pre>
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> @ref readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.20 2002/03/03 21:20:25 lunakl Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * @ref KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with @ref setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
- protected:
- virtual void virtual_hook( int id, void* data );
- private:
- KAccelBasePrivate* d;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde300/kicontheme.h b/python/pykde/extra/kde300/kicontheme.h
deleted file mode 100644
index 29666371..00000000
--- a/python/pykde/extra/kde300/kicontheme.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.19 2002/03/05 23:13:26 rich Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- enum Context { Any, Action, Application, Device, FileSystem, MimeType };
- enum Type { Fixed, Scalable, Threshold };
- enum MatchType { MatchExact, MatchBest };
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=Desktop, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
- enum StdSizes { SizeSmall=16, SizeMedium=32, SizeLarge=48 };
- enum States { DefaultState, ActiveState, DisabledState, LastState };
- enum Overlays { LockOverlay=0x100, ZipOverlay=0x200, LinkOverlay=0x400,
- HiddenOverlay=0x800, OverlayMask = ~0xff };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon.
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the toplevel theme directory.
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- */
- bool isValid() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @ref #KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- */
- static TQString current();
-
- static void reconfigure();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde300/kkeyserver_x11.h b/python/pykde/extra/kde300/kkeyserver_x11.h
deleted file mode 100644
index 279dbd7d..00000000
--- a/python/pykde/extra/kde300/kkeyserver_x11.h
+++ /dev/null
@@ -1,131 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-namespace KKeyServer
-{
- struct CodeMod { int code, mod; };
-
- struct Sym
- {
- public:
- uint m_sym;
-
- Sym()
- { m_sym = 0; }
- Sym( uint sym )
- { m_sym = sym; }
- Sym( const TQString& s )
- { init( s ); }
-
- bool initQt( int keyQt );
- bool init( const TQString& );
-
- int qt() const;
- TQString toStringInternal() const;
- TQString toString() const;
-
- uint getModsRequired() const;
- uint getSymVariation() const;
-
- operator uint() const { return m_sym; }
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- struct Key
- {
- enum { CODE_FOR_QT = 256 };
-
- uint m_code;
- uint m_mod;
- uint m_sym;
-
- bool init( const KKey& key, bool bQt );
-
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- uint code() const { return m_code; }
- uint mod() const { return m_mod; }
- uint sym() const { return m_sym; }
- int keyCodeQt() const { return (int) m_sym; }
-
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- Key& operator =( const KKeyNative& key );
- int compare( const Key& ) const;
-
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- KKey key() const;
- };
-
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- */
- uint modX( KKey::ModFlag );
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- */
- bool keyboardHasWinKey();
- uint modXShift();
- uint modXLock();
- uint modXCtrl();
- uint modXAlt();
- uint modXNumLock();
- uint modXWin();
- uint modXScrollLock();
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- */
- uint accelModMaskX();
-
- bool keyQtToSym( int keyQt, uint& sym );
- bool keyQtToMod( int keyQt, uint& mod );
- bool symToKeyQt( uint sym, int& keyQt );
-
- bool modToModQt( uint mod, int& modQt );
- bool modToModX( uint mod, uint& modX );
- bool modXToModQt( uint modX, int& modQt );
- bool modXToMod( uint modX, uint& mod );
-
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- TQString modToStringInternal( uint mod );
- TQString modToStringUser( uint mod );
-
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-};
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde300/konsole_part.h b/python/pykde/extra/kde300/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde300/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde300/krecentdirs.h b/python/pykde/extra/kde300/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde300/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde300/ksycocafactory.h b/python/pykde/extra/kde300/ksycocafactory.h
deleted file mode 100644
index ff1d43cb..00000000
--- a/python/pykde/extra/kde300/ksycocafactory.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.12 2002/03/03 21:20:26 lunakl Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-// This, instead of a typedef, allows to declare "class ..." in header files
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde300/ktoolbarbutton.h b/python/pykde/extra/kde300/ktoolbarbutton.h
deleted file mode 100644
index 9b35b179..00000000
--- a/python/pykde/extra/kde300/ktoolbarbutton.h
+++ /dev/null
@@ -1,306 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.21 2002/03/04 00:51:52 lunakl Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by @ref KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use @ref setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap);
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over @ref setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if @ref #generate is
- * true. This function is preferred over @ref setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- void setIcon(const TQString &icon, bool /*generate*/ ) { setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon);
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon);
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself. Use @ref
- * toggle for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use @ref setDelayedPopup if you want that
- * behavior. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p The new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setPopup (TQPopupMenu *p, bool toggle = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p the new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setDelayedPopup(TQPopupMenu *p, bool toggle = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitely turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of @ref KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.21 2002/03/04 00:51:52 lunakl Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde300/kurifilter.h b/python/pykde/extra/kde300/kurifilter.h
deleted file mode 100644
index 24e09985..00000000
--- a/python/pykde/extra/kde300/kurifilter.h
+++ /dev/null
@@ -1,593 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.23 2002/03/04 04:17:37 lunakl Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-
-#include <kurl.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class TQStringList;
-class KCModule;
-
-/**
-* This is a basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* whenever the application requires more information about the
-* URI than just a filtered version of it. Any application can
-* create an instance of this class and send it to @ref KURIFilter
-* to have the filter plugins fill the necessary information.
-*
-* @sect Example
-* <pre>
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* if( filtered )
-* print ( "URI: %s\n"Filtered URI: %s\n URI Type: %i\n"Was Filtered: %i"
-* text.latin1(), d.uri().url().latin1(), d.uriType(), filtered );
-* </pre>
-*
-* The above code should yield the following output:
-* <pre>
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* </pre>
-*
-* @short A message object for exchanging filtering URI info.
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of URI to be filtered.
- *
- * This enumerator prvoides the return value for
- * @ref uriType. A breif description for each value:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& /*data*/);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * TRUE. You should instead use the result from the
- * @ref KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- bool hasBeenFiltered() const { return m_bFiltered; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins sucessfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See @ref #hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function works only for a local resource and
- * expects the absolute path to the relative URL set in this
- * meta object. If you are extracting the absolute path from
- * a KURL object, make sure you always set the argument below
- * using KURL::path() instead of KURL::url() so that "file:/"
- * would not be appended! Otherwise, the filter might not be
- * able to make correct determination whether the relative URL
- * locally exists!
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& /* abs_path */ );
-
- /**
- * Returns the absolute path if one has already been set.
- */
- TQString absolutePath() const;
-
- /**
- * Returns true if the supplied data has an absolute path.
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Returns true if the current data is a local resource with
- * command line options and arguments.
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource
- */
- TQString iconName();
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- */
- void init( const KURL& url = TQString::null );
-
-private:
- bool m_bFiltered;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All
- * plugins designed to provide URI filtering functionalities
- * should inherit from this abstract class and provide a
- * specific filtering implementation.
- *
- * All inheriting classes need to implement the pure
- * virtual function @ref filterURI. Otherwise, they
- * would also become abstract.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object.
- * @param name the name of the plugin.
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsability of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, @p null if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or @p null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of a URI.
- *
- * The intention of this plugin class is to allow people to extend
- * the functionality of KURL without modifying it directly. This
- * way KURL will remain a generic parser capable of parsing any
- * generic URL that adheres to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI,
- * and returns the filtered version whenever possible. The filters
- * are implemented using plugins to provide easy extensibility
- * of the filtering mechanism. That is, new filters can be added in
- * the future by simply inheriting from @ref KURIFilterPlugin and
- * implementing the @ref KURIFilterPlugin::filterURI method.
- *
- * Use of this plugin-manager class is straight forward. Since
- * it is a singleton object, all you have to do is obtain an instance
- * by doing @p KURIFilter::self() and use any of the public member
- * functions to preform the filtering.
- *
- * @sect Example
- *
- * To simply filter a given string:
- * <pre>
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * </pre>
- *
- * You can alternatively use a KURL:
- * <pre>
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * </pre>
- *
- * If you have a constant string or a constant URL,
- * simply invoke the corresponding function to obtain
- * the filtered string or URL instead of a boolean flag:
- * <pre>
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * </pre>
- *
- * You can also specify only specific filter(s) to be applied
- * by supplying the name(s) of the filter(s). By defualt all
- * filters that are found are loaded when the KURIFilter object
- * is created will be used. These names are taken from the
- * enteries in the \".desktop\" files. Here are a couple of
- * examples:
- * <pre>
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "KShortURIFilter" );
- *
- * TQStringList list;
- * list << "KShortURIFilter" << "MyFilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * </pre>
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See @ref KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Return a static instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * This filters the given data based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * This filters the given string based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * @ref loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been dis
- */
- void loadPlugins();
-
-private:
-
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-
-};
-
-#endif
-
diff --git a/python/pykde/extra/kde301/kaccelaction.h b/python/pykde/extra/kde301/kaccelaction.h
deleted file mode 100644
index c1e53f5a..00000000
--- a/python/pykde/extra/kde301/kaccelaction.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/*
- KAccelAction holds information an a given action, such as "Execute Command"
-
- 1) KAccelAction = "Execute Command"
- Default3 = "Alt+F2"
- Default4 = "Meta+Enter;Alt+F2"
- 1) KShortcut = "Meta+Enter"
- 1) KKeySequence = "Meta+Enter"
- 1) KKey = "Meta+Enter"
- 1) Meta+Enter
- 2) Meta+Keypad_Enter
- 2) KShortcut = "Alt+F2"
- 1) KKeySequence = "Alt+F2"
- 1) Alt+F2
- 2) KAccelAction = "Something"
- Default3 = ""
- Default4 = ""
- 1) KShortcut = "Meta+X,Asterisk"
- 1) KKeySequence = "Meta+X,Asterisk"
- 1) KKey = "Meta+X"
- 1) Meta+X
- 2) KKey = "Asterisk"
- 1) Shift+8 (English layout)
- 2) Keypad_Asterisk
-*/
-
-//---------------------------------------------------------------------
-// KAccelAction
-//---------------------------------------------------------------------
-
-class KAccelAction
-{
- public:
- KAccelAction();
- KAccelAction( const KAccelAction& );
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- void clear();
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- KAccelAction& operator=( const KAccelAction& );
-
- const TQString& name() const { return m_sName; }
- const TQString& label() const { return m_sLabel; }
- const TQString& whatsThis() const { return m_sWhatsThis; }
- const KShortcut& shortcut() const { return m_cut; }
- const KShortcut& shortcutDefault() const;
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
- const char* methodSlotPtr() const { return m_psMethodSlot; }
- bool isConfigurable() const { return m_bConfigurable; }
- bool isEnabled() const { return m_bEnabled; }
-
- void setName( const TQString& );
- void setLabel( const TQString& );
- void setWhatsThis( const TQString& );
- bool setShortcut( const KShortcut& rgCuts );
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
- void setConfigurable( bool );
- void setEnabled( bool );
-
- int getID() const { return m_nIDAccel; }
- void setID( int n ) { m_nIDAccel = n; }
- bool isConnected() const;
-
- bool setKeySequence( uint i, const KKeySequence& );
- void clearShortcut();
- bool contains( const KKeySequence& );
-
- TQString toString() const;
- TQString toStringInternal() const;
-
- static bool useFourModifierKeys();
- static void useFourModifierKeys( bool );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-class KAccelActions
-{
- public:
- KAccelActions();
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- void clear();
- bool init( const KAccelActions& );
- bool init( KConfigBase& config, const TQString& sGroup );
-
- void updateShortcuts( KAccelActions& );
-
- int actionIndex( const TQString& sAction ) const;
- KAccelAction* actionPtr( uint );
- const KAccelAction* actionPtr( uint ) const;
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( KKeySequence cut );
- KAccelAction& operator []( uint );
- const KAccelAction& operator []( uint ) const;
-
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
- bool remove( const TQString& sAction );
-
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- void emitKeycodeChanged();
-
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde301/kaccelbase.h b/python/pykde/extra/kde301/kaccelbase.h
deleted file mode 100644
index cd764bc3..00000000
--- a/python/pykde/extra/kde301/kaccelbase.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-class KAccelBasePrivate;
-/**
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * @ref KKeyChooser GUI.
- *
- * A @ref KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * @ref KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for @ref insertItem() is used only
- * in the configuration dialog.
- *<pre>
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *</pre>
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the @ref KStdAccel::Print from above.
- *
- * <pre>
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * </pre>
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * <pre>
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * </pre>
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> @ref readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.20 2002/03/03 21:20:25 lunakl Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * @ref KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with @ref setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
- protected:
- virtual void virtual_hook( int id, void* data );
- private:
- KAccelBasePrivate* d;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde301/kicontheme.h b/python/pykde/extra/kde301/kicontheme.h
deleted file mode 100644
index 29666371..00000000
--- a/python/pykde/extra/kde301/kicontheme.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.19 2002/03/05 23:13:26 rich Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- enum Context { Any, Action, Application, Device, FileSystem, MimeType };
- enum Type { Fixed, Scalable, Threshold };
- enum MatchType { MatchExact, MatchBest };
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=Desktop, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
- enum StdSizes { SizeSmall=16, SizeMedium=32, SizeLarge=48 };
- enum States { DefaultState, ActiveState, DisabledState, LastState };
- enum Overlays { LockOverlay=0x100, ZipOverlay=0x200, LinkOverlay=0x400,
- HiddenOverlay=0x800, OverlayMask = ~0xff };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon.
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the toplevel theme directory.
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- */
- bool isValid() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @ref #KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- */
- static TQString current();
-
- static void reconfigure();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde301/kkeyserver_x11.h b/python/pykde/extra/kde301/kkeyserver_x11.h
deleted file mode 100644
index 279dbd7d..00000000
--- a/python/pykde/extra/kde301/kkeyserver_x11.h
+++ /dev/null
@@ -1,131 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-namespace KKeyServer
-{
- struct CodeMod { int code, mod; };
-
- struct Sym
- {
- public:
- uint m_sym;
-
- Sym()
- { m_sym = 0; }
- Sym( uint sym )
- { m_sym = sym; }
- Sym( const TQString& s )
- { init( s ); }
-
- bool initQt( int keyQt );
- bool init( const TQString& );
-
- int qt() const;
- TQString toStringInternal() const;
- TQString toString() const;
-
- uint getModsRequired() const;
- uint getSymVariation() const;
-
- operator uint() const { return m_sym; }
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- struct Key
- {
- enum { CODE_FOR_QT = 256 };
-
- uint m_code;
- uint m_mod;
- uint m_sym;
-
- bool init( const KKey& key, bool bQt );
-
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- uint code() const { return m_code; }
- uint mod() const { return m_mod; }
- uint sym() const { return m_sym; }
- int keyCodeQt() const { return (int) m_sym; }
-
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- Key& operator =( const KKeyNative& key );
- int compare( const Key& ) const;
-
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- KKey key() const;
- };
-
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- */
- uint modX( KKey::ModFlag );
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- */
- bool keyboardHasWinKey();
- uint modXShift();
- uint modXLock();
- uint modXCtrl();
- uint modXAlt();
- uint modXNumLock();
- uint modXWin();
- uint modXScrollLock();
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- */
- uint accelModMaskX();
-
- bool keyQtToSym( int keyQt, uint& sym );
- bool keyQtToMod( int keyQt, uint& mod );
- bool symToKeyQt( uint sym, int& keyQt );
-
- bool modToModQt( uint mod, int& modQt );
- bool modToModX( uint mod, uint& modX );
- bool modXToModQt( uint modX, int& modQt );
- bool modXToMod( uint modX, uint& mod );
-
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- TQString modToStringInternal( uint mod );
- TQString modToStringUser( uint mod );
-
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-};
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde301/konsole_part.h b/python/pykde/extra/kde301/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde301/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde301/krecentdirs.h b/python/pykde/extra/kde301/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde301/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde301/ksycocafactory.h b/python/pykde/extra/kde301/ksycocafactory.h
deleted file mode 100644
index ff1d43cb..00000000
--- a/python/pykde/extra/kde301/ksycocafactory.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.12 2002/03/03 21:20:26 lunakl Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-// This, instead of a typedef, allows to declare "class ..." in header files
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde301/ktoolbarbutton.h b/python/pykde/extra/kde301/ktoolbarbutton.h
deleted file mode 100644
index 112be544..00000000
--- a/python/pykde/extra/kde301/ktoolbarbutton.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.21.2.1 2002/04/28 20:59:16 wtrobin Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by @ref KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use @ref setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap);
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over @ref setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- virtual void setIcon( const TQPixmap &pixmap )
- { return TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if @ref #generate is
- * true. This function is preferred over @ref setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- void setIcon(const TQString &icon, bool /*generate*/ ) { setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon);
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon);
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself. Use @ref
- * toggle for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use @ref setDelayedPopup if you want that
- * behavior. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p The new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setPopup (TQPopupMenu *p, bool toggle = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p the new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setDelayedPopup(TQPopupMenu *p, bool toggle = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitely turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- bool isRaised() const;
- bool isActive() const;
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of @ref KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.21.2.1 2002/04/28 20:59:16 wtrobin Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde301/kurifilter.h b/python/pykde/extra/kde301/kurifilter.h
deleted file mode 100644
index 24e09985..00000000
--- a/python/pykde/extra/kde301/kurifilter.h
+++ /dev/null
@@ -1,593 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.23 2002/03/04 04:17:37 lunakl Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-
-#include <kurl.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class TQStringList;
-class KCModule;
-
-/**
-* This is a basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* whenever the application requires more information about the
-* URI than just a filtered version of it. Any application can
-* create an instance of this class and send it to @ref KURIFilter
-* to have the filter plugins fill the necessary information.
-*
-* @sect Example
-* <pre>
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* if( filtered )
-* print ( "URI: %s\n"Filtered URI: %s\n URI Type: %i\n"Was Filtered: %i"
-* text.latin1(), d.uri().url().latin1(), d.uriType(), filtered );
-* </pre>
-*
-* The above code should yield the following output:
-* <pre>
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* </pre>
-*
-* @short A message object for exchanging filtering URI info.
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of URI to be filtered.
- *
- * This enumerator prvoides the return value for
- * @ref uriType. A breif description for each value:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& /*data*/);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * TRUE. You should instead use the result from the
- * @ref KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- bool hasBeenFiltered() const { return m_bFiltered; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins sucessfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See @ref #hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function works only for a local resource and
- * expects the absolute path to the relative URL set in this
- * meta object. If you are extracting the absolute path from
- * a KURL object, make sure you always set the argument below
- * using KURL::path() instead of KURL::url() so that "file:/"
- * would not be appended! Otherwise, the filter might not be
- * able to make correct determination whether the relative URL
- * locally exists!
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& /* abs_path */ );
-
- /**
- * Returns the absolute path if one has already been set.
- */
- TQString absolutePath() const;
-
- /**
- * Returns true if the supplied data has an absolute path.
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Returns true if the current data is a local resource with
- * command line options and arguments.
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource
- */
- TQString iconName();
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- */
- void init( const KURL& url = TQString::null );
-
-private:
- bool m_bFiltered;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All
- * plugins designed to provide URI filtering functionalities
- * should inherit from this abstract class and provide a
- * specific filtering implementation.
- *
- * All inheriting classes need to implement the pure
- * virtual function @ref filterURI. Otherwise, they
- * would also become abstract.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object.
- * @param name the name of the plugin.
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsability of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, @p null if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or @p null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of a URI.
- *
- * The intention of this plugin class is to allow people to extend
- * the functionality of KURL without modifying it directly. This
- * way KURL will remain a generic parser capable of parsing any
- * generic URL that adheres to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI,
- * and returns the filtered version whenever possible. The filters
- * are implemented using plugins to provide easy extensibility
- * of the filtering mechanism. That is, new filters can be added in
- * the future by simply inheriting from @ref KURIFilterPlugin and
- * implementing the @ref KURIFilterPlugin::filterURI method.
- *
- * Use of this plugin-manager class is straight forward. Since
- * it is a singleton object, all you have to do is obtain an instance
- * by doing @p KURIFilter::self() and use any of the public member
- * functions to preform the filtering.
- *
- * @sect Example
- *
- * To simply filter a given string:
- * <pre>
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * </pre>
- *
- * You can alternatively use a KURL:
- * <pre>
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * </pre>
- *
- * If you have a constant string or a constant URL,
- * simply invoke the corresponding function to obtain
- * the filtered string or URL instead of a boolean flag:
- * <pre>
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * </pre>
- *
- * You can also specify only specific filter(s) to be applied
- * by supplying the name(s) of the filter(s). By defualt all
- * filters that are found are loaded when the KURIFilter object
- * is created will be used. These names are taken from the
- * enteries in the \".desktop\" files. Here are a couple of
- * examples:
- * <pre>
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "KShortURIFilter" );
- *
- * TQStringList list;
- * list << "KShortURIFilter" << "MyFilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * </pre>
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See @ref KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Return a static instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * This filters the given data based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * This filters the given string based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * @ref loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been dis
- */
- void loadPlugins();
-
-private:
-
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-
-};
-
-#endif
-
diff --git a/python/pykde/extra/kde303/kaccelaction.h b/python/pykde/extra/kde303/kaccelaction.h
deleted file mode 100644
index c1e53f5a..00000000
--- a/python/pykde/extra/kde303/kaccelaction.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/*
- KAccelAction holds information an a given action, such as "Execute Command"
-
- 1) KAccelAction = "Execute Command"
- Default3 = "Alt+F2"
- Default4 = "Meta+Enter;Alt+F2"
- 1) KShortcut = "Meta+Enter"
- 1) KKeySequence = "Meta+Enter"
- 1) KKey = "Meta+Enter"
- 1) Meta+Enter
- 2) Meta+Keypad_Enter
- 2) KShortcut = "Alt+F2"
- 1) KKeySequence = "Alt+F2"
- 1) Alt+F2
- 2) KAccelAction = "Something"
- Default3 = ""
- Default4 = ""
- 1) KShortcut = "Meta+X,Asterisk"
- 1) KKeySequence = "Meta+X,Asterisk"
- 1) KKey = "Meta+X"
- 1) Meta+X
- 2) KKey = "Asterisk"
- 1) Shift+8 (English layout)
- 2) Keypad_Asterisk
-*/
-
-//---------------------------------------------------------------------
-// KAccelAction
-//---------------------------------------------------------------------
-
-class KAccelAction
-{
- public:
- KAccelAction();
- KAccelAction( const KAccelAction& );
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- void clear();
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- KAccelAction& operator=( const KAccelAction& );
-
- const TQString& name() const { return m_sName; }
- const TQString& label() const { return m_sLabel; }
- const TQString& whatsThis() const { return m_sWhatsThis; }
- const KShortcut& shortcut() const { return m_cut; }
- const KShortcut& shortcutDefault() const;
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
- const char* methodSlotPtr() const { return m_psMethodSlot; }
- bool isConfigurable() const { return m_bConfigurable; }
- bool isEnabled() const { return m_bEnabled; }
-
- void setName( const TQString& );
- void setLabel( const TQString& );
- void setWhatsThis( const TQString& );
- bool setShortcut( const KShortcut& rgCuts );
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
- void setConfigurable( bool );
- void setEnabled( bool );
-
- int getID() const { return m_nIDAccel; }
- void setID( int n ) { m_nIDAccel = n; }
- bool isConnected() const;
-
- bool setKeySequence( uint i, const KKeySequence& );
- void clearShortcut();
- bool contains( const KKeySequence& );
-
- TQString toString() const;
- TQString toStringInternal() const;
-
- static bool useFourModifierKeys();
- static void useFourModifierKeys( bool );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-class KAccelActions
-{
- public:
- KAccelActions();
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- void clear();
- bool init( const KAccelActions& );
- bool init( KConfigBase& config, const TQString& sGroup );
-
- void updateShortcuts( KAccelActions& );
-
- int actionIndex( const TQString& sAction ) const;
- KAccelAction* actionPtr( uint );
- const KAccelAction* actionPtr( uint ) const;
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( KKeySequence cut );
- KAccelAction& operator []( uint );
- const KAccelAction& operator []( uint ) const;
-
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
- bool remove( const TQString& sAction );
-
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- void emitKeycodeChanged();
-
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde303/kaccelbase.h b/python/pykde/extra/kde303/kaccelbase.h
deleted file mode 100644
index cd764bc3..00000000
--- a/python/pykde/extra/kde303/kaccelbase.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-class KAccelBasePrivate;
-/**
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * @ref KKeyChooser GUI.
- *
- * A @ref KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * @ref KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for @ref insertItem() is used only
- * in the configuration dialog.
- *<pre>
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *</pre>
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the @ref KStdAccel::Print from above.
- *
- * <pre>
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * </pre>
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * <pre>
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * </pre>
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> @ref readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.20 2002/03/03 21:20:25 lunakl Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * @ref KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with @ref setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
- protected:
- virtual void virtual_hook( int id, void* data );
- private:
- KAccelBasePrivate* d;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde303/kicontheme.h b/python/pykde/extra/kde303/kicontheme.h
deleted file mode 100644
index 29666371..00000000
--- a/python/pykde/extra/kde303/kicontheme.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.19 2002/03/05 23:13:26 rich Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- enum Context { Any, Action, Application, Device, FileSystem, MimeType };
- enum Type { Fixed, Scalable, Threshold };
- enum MatchType { MatchExact, MatchBest };
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=Desktop, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
- enum StdSizes { SizeSmall=16, SizeMedium=32, SizeLarge=48 };
- enum States { DefaultState, ActiveState, DisabledState, LastState };
- enum Overlays { LockOverlay=0x100, ZipOverlay=0x200, LinkOverlay=0x400,
- HiddenOverlay=0x800, OverlayMask = ~0xff };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon.
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the toplevel theme directory.
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- */
- bool isValid() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @ref #KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- */
- static TQString current();
-
- static void reconfigure();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde303/kkeyserver_x11.h b/python/pykde/extra/kde303/kkeyserver_x11.h
deleted file mode 100644
index 279dbd7d..00000000
--- a/python/pykde/extra/kde303/kkeyserver_x11.h
+++ /dev/null
@@ -1,131 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-namespace KKeyServer
-{
- struct CodeMod { int code, mod; };
-
- struct Sym
- {
- public:
- uint m_sym;
-
- Sym()
- { m_sym = 0; }
- Sym( uint sym )
- { m_sym = sym; }
- Sym( const TQString& s )
- { init( s ); }
-
- bool initQt( int keyQt );
- bool init( const TQString& );
-
- int qt() const;
- TQString toStringInternal() const;
- TQString toString() const;
-
- uint getModsRequired() const;
- uint getSymVariation() const;
-
- operator uint() const { return m_sym; }
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- struct Key
- {
- enum { CODE_FOR_QT = 256 };
-
- uint m_code;
- uint m_mod;
- uint m_sym;
-
- bool init( const KKey& key, bool bQt );
-
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- uint code() const { return m_code; }
- uint mod() const { return m_mod; }
- uint sym() const { return m_sym; }
- int keyCodeQt() const { return (int) m_sym; }
-
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- Key& operator =( const KKeyNative& key );
- int compare( const Key& ) const;
-
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- KKey key() const;
- };
-
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- */
- uint modX( KKey::ModFlag );
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- */
- bool keyboardHasWinKey();
- uint modXShift();
- uint modXLock();
- uint modXCtrl();
- uint modXAlt();
- uint modXNumLock();
- uint modXWin();
- uint modXScrollLock();
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- */
- uint accelModMaskX();
-
- bool keyQtToSym( int keyQt, uint& sym );
- bool keyQtToMod( int keyQt, uint& mod );
- bool symToKeyQt( uint sym, int& keyQt );
-
- bool modToModQt( uint mod, int& modQt );
- bool modToModX( uint mod, uint& modX );
- bool modXToModQt( uint modX, int& modQt );
- bool modXToMod( uint modX, uint& mod );
-
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- TQString modToStringInternal( uint mod );
- TQString modToStringUser( uint mod );
-
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-};
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde303/konsole_part.h b/python/pykde/extra/kde303/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde303/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde303/krecentdirs.h b/python/pykde/extra/kde303/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde303/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde303/ksycocafactory.h b/python/pykde/extra/kde303/ksycocafactory.h
deleted file mode 100644
index ff1d43cb..00000000
--- a/python/pykde/extra/kde303/ksycocafactory.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.12 2002/03/03 21:20:26 lunakl Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-// This, instead of a typedef, allows to declare "class ..." in header files
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde303/ktoolbarbutton.h b/python/pykde/extra/kde303/ktoolbarbutton.h
deleted file mode 100644
index c551a4a0..00000000
--- a/python/pykde/extra/kde303/ktoolbarbutton.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.21.2.2 2002/05/26 13:09:06 carewolf Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by @ref KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use @ref setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap);
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over @ref setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if @ref #generate is
- * true. This function is preferred over @ref setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- void setIcon(const TQString &icon, bool /*generate*/ ) { setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon);
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon);
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself. Use @ref
- * toggle for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use @ref setDelayedPopup if you want that
- * behavior. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p The new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setPopup (TQPopupMenu *p, bool toggle = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p the new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setDelayedPopup(TQPopupMenu *p, bool toggle = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitely turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- bool isRaised() const;
- bool isActive() const;
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of @ref KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.21.2.2 2002/05/26 13:09:06 carewolf Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde303/kurifilter.h b/python/pykde/extra/kde303/kurifilter.h
deleted file mode 100644
index 24e09985..00000000
--- a/python/pykde/extra/kde303/kurifilter.h
+++ /dev/null
@@ -1,593 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.23 2002/03/04 04:17:37 lunakl Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-
-#include <kurl.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class TQStringList;
-class KCModule;
-
-/**
-* This is a basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* whenever the application requires more information about the
-* URI than just a filtered version of it. Any application can
-* create an instance of this class and send it to @ref KURIFilter
-* to have the filter plugins fill the necessary information.
-*
-* @sect Example
-* <pre>
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* if( filtered )
-* print ( "URI: %s\n"Filtered URI: %s\n URI Type: %i\n"Was Filtered: %i"
-* text.latin1(), d.uri().url().latin1(), d.uriType(), filtered );
-* </pre>
-*
-* The above code should yield the following output:
-* <pre>
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* </pre>
-*
-* @short A message object for exchanging filtering URI info.
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of URI to be filtered.
- *
- * This enumerator prvoides the return value for
- * @ref uriType. A breif description for each value:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& /*data*/);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * TRUE. You should instead use the result from the
- * @ref KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- bool hasBeenFiltered() const { return m_bFiltered; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins sucessfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See @ref #hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function works only for a local resource and
- * expects the absolute path to the relative URL set in this
- * meta object. If you are extracting the absolute path from
- * a KURL object, make sure you always set the argument below
- * using KURL::path() instead of KURL::url() so that "file:/"
- * would not be appended! Otherwise, the filter might not be
- * able to make correct determination whether the relative URL
- * locally exists!
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& /* abs_path */ );
-
- /**
- * Returns the absolute path if one has already been set.
- */
- TQString absolutePath() const;
-
- /**
- * Returns true if the supplied data has an absolute path.
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Returns true if the current data is a local resource with
- * command line options and arguments.
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource
- */
- TQString iconName();
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- */
- void init( const KURL& url = TQString::null );
-
-private:
- bool m_bFiltered;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All
- * plugins designed to provide URI filtering functionalities
- * should inherit from this abstract class and provide a
- * specific filtering implementation.
- *
- * All inheriting classes need to implement the pure
- * virtual function @ref filterURI. Otherwise, they
- * would also become abstract.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object.
- * @param name the name of the plugin.
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsability of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, @p null if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or @p null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of a URI.
- *
- * The intention of this plugin class is to allow people to extend
- * the functionality of KURL without modifying it directly. This
- * way KURL will remain a generic parser capable of parsing any
- * generic URL that adheres to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI,
- * and returns the filtered version whenever possible. The filters
- * are implemented using plugins to provide easy extensibility
- * of the filtering mechanism. That is, new filters can be added in
- * the future by simply inheriting from @ref KURIFilterPlugin and
- * implementing the @ref KURIFilterPlugin::filterURI method.
- *
- * Use of this plugin-manager class is straight forward. Since
- * it is a singleton object, all you have to do is obtain an instance
- * by doing @p KURIFilter::self() and use any of the public member
- * functions to preform the filtering.
- *
- * @sect Example
- *
- * To simply filter a given string:
- * <pre>
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * </pre>
- *
- * You can alternatively use a KURL:
- * <pre>
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * </pre>
- *
- * If you have a constant string or a constant URL,
- * simply invoke the corresponding function to obtain
- * the filtered string or URL instead of a boolean flag:
- * <pre>
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * </pre>
- *
- * You can also specify only specific filter(s) to be applied
- * by supplying the name(s) of the filter(s). By defualt all
- * filters that are found are loaded when the KURIFilter object
- * is created will be used. These names are taken from the
- * enteries in the \".desktop\" files. Here are a couple of
- * examples:
- * <pre>
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "KShortURIFilter" );
- *
- * TQStringList list;
- * list << "KShortURIFilter" << "MyFilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * </pre>
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See @ref KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Return a static instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * This filters the given data based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * This filters the given string based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * @ref loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been dis
- */
- void loadPlugins();
-
-private:
-
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-
-};
-
-#endif
-
diff --git a/python/pykde/extra/kde310/kaccelaction.h b/python/pykde/extra/kde310/kaccelaction.h
deleted file mode 100644
index 8e422505..00000000
--- a/python/pykde/extra/kde310/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a @ref KShortcut. The user can configure and
- * enable/disable them using @ref KKeyDialog.
- *
- * <pre>
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * </pre>
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using @ref setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see @ref getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of @ref KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde310/kaccelbase.h b/python/pykde/extra/kde310/kaccelbase.h
deleted file mode 100644
index 03fa9c87..00000000
--- a/python/pykde/extra/kde310/kaccelbase.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * @ref KKeyChooser GUI.
- *
- * A @ref KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * @ref KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for @ref insertItem() is used only
- * in the configuration dialog.
- *<pre>
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *</pre>
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the @ref KStdAccel::Print from above.
- *
- * <pre>
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * </pre>
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * <pre>
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * </pre>
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> @ref readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.22 2002/10/06 18:19:39 ellis Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * @ref KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with @ref setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde310/kicontheme.h b/python/pykde/extra/kde310/kicontheme.h
deleted file mode 100644
index bfee160b..00000000
--- a/python/pykde/extra/kde310/kicontheme.h
+++ /dev/null
@@ -1,331 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.26 2002/10/26 22:08:38 tjansen Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=Desktop, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48 };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde310/kkeyserver_x11.h b/python/pykde/extra/kde310/kkeyserver_x11.h
deleted file mode 100644
index 568de854..00000000
--- a/python/pykde/extra/kde310/kkeyserver_x11.h
+++ /dev/null
@@ -1,435 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- struct CodeMod { int code, mod; };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if succesful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if succesful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed @ref KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required @ref KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a @ref KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a @ref KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed @ref KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed @ref KKey::ModFlag modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of @ref KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param sym if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed @ref KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-};
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde310/konsole_part.h b/python/pykde/extra/kde310/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde310/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde310/kpanelmenu.h b/python/pykde/extra/kde310/kpanelmenu.h
deleted file mode 100644
index 734c5051..00000000
--- a/python/pykde/extra/kde310/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <goffioul@imec.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and @ref slotExec(). You also have to provide a factory
- * object in your library, see @ref KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <goffioul@imec.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * @ref slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call @ref setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-//#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
-// K_EXPORT_COMPONENT_FACTORY( \
-// kickermenu_##libname, \
-// KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde310/krecentdirs.h b/python/pykde/extra/kde310/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde310/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde310/ksycocafactory.h b/python/pykde/extra/kde310/ksycocafactory.h
deleted file mode 100644
index 1959edda..00000000
--- a/python/pykde/extra/kde310/ksycocafactory.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde310/ktoolbarbutton.h b/python/pykde/extra/kde310/ktoolbarbutton.h
deleted file mode 100644
index 6fafb1ed..00000000
--- a/python/pykde/extra/kde310/ktoolbarbutton.h
+++ /dev/null
@@ -1,317 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by @ref KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use @ref setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap);
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over @ref setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if @ref #generate is
- * true. This function is preferred over @ref setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- void setIcon(const TQString &icon, bool /*generate*/ ) { setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon);
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon);
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use @ref toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use @ref setDelayedPopup if you want that
- * behavior. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p The new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setPopup (TQPopupMenu *p, bool toggle = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p the new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setDelayedPopup(TQPopupMenu *p, bool toggle = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitely turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of @ref KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde310/kurifilter.h b/python/pykde/extra/kde310/kurifilter.h
deleted file mode 100644
index 6daf7769..00000000
--- a/python/pykde/extra/kde310/kurifilter.h
+++ /dev/null
@@ -1,602 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.27 2002/10/30 09:37:39 neil Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-
-#include <kurl.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class TQStringList;
-class KCModule;
-
-/**
-* This is a basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* whenever the application requires more information about the
-* URI than just a filtered version of it. Any application can
-* create an instance of this class and send it to @ref KURIFilter
-* to have the filter plugins fill the necessary information.
-*
-* @sect Example
-* <pre>
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* if( filtered )
-* print ( "URI: %s\n"Filtered URI: %s\n URI Type: %i\n"Was Filtered: %i"
-* text.latin1(), d.uri().url().latin1(), d.uriType(), filtered );
-* </pre>
-*
-* The above code should yield the following output:
-* <pre>
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* </pre>
-*
-* @short A message object for exchanging filtering URI info.
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of URI to be filtered.
- *
- * This enumerator prvoides the return value for
- * @ref uriType. A brief description for each value:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& /*data*/);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * TRUE. You should instead use the result from the
- * @ref KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- bool hasBeenFiltered() const { return m_bFiltered; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins sucessfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See @ref #hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function works only for a local resource and
- * expects the absolute path to the relative URL set in this
- * meta object. If you are extracting the absolute path from
- * a KURL object, make sure you always set the argument below
- * using KURL::path() instead of KURL::url() so that "file:/"
- * would not be appended! Otherwise, the filter might not be
- * able to make correct determination whether the relative URL
- * locally exists!
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& /* abs_path */ );
-
- /**
- * Returns the absolute path if one has already been set.
- */
- TQString absolutePath() const;
-
- /**
- * Returns true if the supplied data has an absolute path.
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Returns true if the current data is a local resource with
- * command line options and arguments.
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource
- */
- TQString iconName();
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- */
- void init( const KURL& url = TQString::null );
-
-private:
- bool m_bFiltered;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All
- * plugins designed to provide URI filtering functionalities
- * should inherit from this abstract class and provide a
- * specific filtering implementation.
- *
- * All inheriting classes need to implement the pure
- * virtual function @ref filterURI. Otherwise, they
- * would also become abstract.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object.
- * @param name the name of the plugin.
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsability of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, @p null if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or @p null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of a URI.
- *
- * The intention of this plugin class is to allow people to extend
- * the functionality of KURL without modifying it directly. This
- * way KURL will remain a generic parser capable of parsing any
- * generic URL that adheres to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI,
- * and returns the filtered version whenever possible. The filters
- * are implemented using plugins to provide easy extensibility
- * of the filtering mechanism. That is, new filters can be added in
- * the future by simply inheriting from @ref KURIFilterPlugin and
- * implementing the @ref KURIFilterPlugin::filterURI method.
- *
- * Use of this plugin-manager class is straight forward. Since
- * it is a singleton object, all you have to do is obtain an instance
- * by doing @p KURIFilter::self() and use any of the public member
- * functions to preform the filtering.
- *
- * @sect Example
- *
- * To simply filter a given string:
- * <pre>
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * </pre>
- *
- * You can alternatively use a KURL:
- * <pre>
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * </pre>
- *
- * If you have a constant string or a constant URL,
- * simply invoke the corresponding function to obtain
- * the filtered string or URL instead of a boolean flag:
- * <pre>
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * </pre>
- *
- * You can also specify only specific filter(s) to be applied
- * by supplying the name(s) of the filter(s). By defualt all
- * filters that are found are loaded when the KURIFilter object
- * is created will be used. These names are taken from the
- * enteries in the \".desktop\" files. Here are a couple of
- * examples:
- * <pre>
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "KShortURIFilter" );
- *
- * TQStringList list;
- * list << "KShortURIFilter" << "MyFilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * </pre>
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See @ref KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Return a static instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * This filters the given data based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * This filters the given string based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins
- *
- * @since 3.1
- *
- * @return a TQStringList of plugin names
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * @ref loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been dis
- */
- void loadPlugins();
-
-private:
-
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-
-};
-
-#endif
-
diff --git a/python/pykde/extra/kde311/kaccelaction.h b/python/pykde/extra/kde311/kaccelaction.h
deleted file mode 100644
index 8e422505..00000000
--- a/python/pykde/extra/kde311/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a @ref KShortcut. The user can configure and
- * enable/disable them using @ref KKeyDialog.
- *
- * <pre>
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * </pre>
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using @ref setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see @ref getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of @ref KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde311/kaccelbase.h b/python/pykde/extra/kde311/kaccelbase.h
deleted file mode 100644
index 03fa9c87..00000000
--- a/python/pykde/extra/kde311/kaccelbase.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * @ref KKeyChooser GUI.
- *
- * A @ref KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * @ref KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for @ref insertItem() is used only
- * in the configuration dialog.
- *<pre>
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *</pre>
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the @ref KStdAccel::Print from above.
- *
- * <pre>
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * </pre>
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * <pre>
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * </pre>
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> @ref readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.22 2002/10/06 18:19:39 ellis Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * @ref KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with @ref setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde311/kicontheme.h b/python/pykde/extra/kde311/kicontheme.h
deleted file mode 100644
index bfee160b..00000000
--- a/python/pykde/extra/kde311/kicontheme.h
+++ /dev/null
@@ -1,331 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.26 2002/10/26 22:08:38 tjansen Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=Desktop, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48 };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde311/kkeyserver_x11.h b/python/pykde/extra/kde311/kkeyserver_x11.h
deleted file mode 100644
index 568de854..00000000
--- a/python/pykde/extra/kde311/kkeyserver_x11.h
+++ /dev/null
@@ -1,435 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- struct CodeMod { int code, mod; };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if succesful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if succesful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed @ref KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required @ref KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a @ref KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a @ref KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed @ref KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed @ref KKey::ModFlag modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of @ref KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param sym if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed @ref KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-};
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde311/konsole_part.h b/python/pykde/extra/kde311/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde311/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde311/kpanelmenu.h b/python/pykde/extra/kde311/kpanelmenu.h
deleted file mode 100644
index c4ac76e4..00000000
--- a/python/pykde/extra/kde311/kpanelmenu.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <goffioul@imec.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and @ref slotExec(). You also have to provide a factory
- * object in your library, see @ref KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <goffioul@imec.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * @ref slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call @ref setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-
-#endif
diff --git a/python/pykde/extra/kde311/krecentdirs.h b/python/pykde/extra/kde311/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde311/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde311/ksycocafactory.h b/python/pykde/extra/kde311/ksycocafactory.h
deleted file mode 100644
index 1959edda..00000000
--- a/python/pykde/extra/kde311/ksycocafactory.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde311/ktoolbarbutton.h b/python/pykde/extra/kde311/ktoolbarbutton.h
deleted file mode 100644
index 6fafb1ed..00000000
--- a/python/pykde/extra/kde311/ktoolbarbutton.h
+++ /dev/null
@@ -1,317 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by @ref KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use @ref setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap);
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over @ref setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if @ref #generate is
- * true. This function is preferred over @ref setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- void setIcon(const TQString &icon, bool /*generate*/ ) { setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon);
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon);
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use @ref toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use @ref setDelayedPopup if you want that
- * behavior. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p The new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setPopup (TQPopupMenu *p, bool toggle = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p the new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setDelayedPopup(TQPopupMenu *p, bool toggle = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitely turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of @ref KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde311/kurifilter.h b/python/pykde/extra/kde311/kurifilter.h
deleted file mode 100644
index 6daf7769..00000000
--- a/python/pykde/extra/kde311/kurifilter.h
+++ /dev/null
@@ -1,602 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.27 2002/10/30 09:37:39 neil Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-
-#include <kurl.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class TQStringList;
-class KCModule;
-
-/**
-* This is a basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* whenever the application requires more information about the
-* URI than just a filtered version of it. Any application can
-* create an instance of this class and send it to @ref KURIFilter
-* to have the filter plugins fill the necessary information.
-*
-* @sect Example
-* <pre>
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* if( filtered )
-* print ( "URI: %s\n"Filtered URI: %s\n URI Type: %i\n"Was Filtered: %i"
-* text.latin1(), d.uri().url().latin1(), d.uriType(), filtered );
-* </pre>
-*
-* The above code should yield the following output:
-* <pre>
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* </pre>
-*
-* @short A message object for exchanging filtering URI info.
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of URI to be filtered.
- *
- * This enumerator prvoides the return value for
- * @ref uriType. A brief description for each value:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& /*data*/);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * TRUE. You should instead use the result from the
- * @ref KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- bool hasBeenFiltered() const { return m_bFiltered; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins sucessfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See @ref #hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function works only for a local resource and
- * expects the absolute path to the relative URL set in this
- * meta object. If you are extracting the absolute path from
- * a KURL object, make sure you always set the argument below
- * using KURL::path() instead of KURL::url() so that "file:/"
- * would not be appended! Otherwise, the filter might not be
- * able to make correct determination whether the relative URL
- * locally exists!
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& /* abs_path */ );
-
- /**
- * Returns the absolute path if one has already been set.
- */
- TQString absolutePath() const;
-
- /**
- * Returns true if the supplied data has an absolute path.
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Returns true if the current data is a local resource with
- * command line options and arguments.
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource
- */
- TQString iconName();
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- */
- void init( const KURL& url = TQString::null );
-
-private:
- bool m_bFiltered;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All
- * plugins designed to provide URI filtering functionalities
- * should inherit from this abstract class and provide a
- * specific filtering implementation.
- *
- * All inheriting classes need to implement the pure
- * virtual function @ref filterURI. Otherwise, they
- * would also become abstract.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object.
- * @param name the name of the plugin.
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsability of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, @p null if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or @p null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of a URI.
- *
- * The intention of this plugin class is to allow people to extend
- * the functionality of KURL without modifying it directly. This
- * way KURL will remain a generic parser capable of parsing any
- * generic URL that adheres to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI,
- * and returns the filtered version whenever possible. The filters
- * are implemented using plugins to provide easy extensibility
- * of the filtering mechanism. That is, new filters can be added in
- * the future by simply inheriting from @ref KURIFilterPlugin and
- * implementing the @ref KURIFilterPlugin::filterURI method.
- *
- * Use of this plugin-manager class is straight forward. Since
- * it is a singleton object, all you have to do is obtain an instance
- * by doing @p KURIFilter::self() and use any of the public member
- * functions to preform the filtering.
- *
- * @sect Example
- *
- * To simply filter a given string:
- * <pre>
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * </pre>
- *
- * You can alternatively use a KURL:
- * <pre>
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * </pre>
- *
- * If you have a constant string or a constant URL,
- * simply invoke the corresponding function to obtain
- * the filtered string or URL instead of a boolean flag:
- * <pre>
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * </pre>
- *
- * You can also specify only specific filter(s) to be applied
- * by supplying the name(s) of the filter(s). By defualt all
- * filters that are found are loaded when the KURIFilter object
- * is created will be used. These names are taken from the
- * enteries in the \".desktop\" files. Here are a couple of
- * examples:
- * <pre>
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "KShortURIFilter" );
- *
- * TQStringList list;
- * list << "KShortURIFilter" << "MyFilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * </pre>
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See @ref KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Return a static instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * This filters the given data based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * This filters the given string based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins
- *
- * @since 3.1
- *
- * @return a TQStringList of plugin names
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * @ref loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been dis
- */
- void loadPlugins();
-
-private:
-
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-
-};
-
-#endif
-
diff --git a/python/pykde/extra/kde312/kaccelaction.h b/python/pykde/extra/kde312/kaccelaction.h
deleted file mode 100644
index 8e422505..00000000
--- a/python/pykde/extra/kde312/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a @ref KShortcut. The user can configure and
- * enable/disable them using @ref KKeyDialog.
- *
- * <pre>
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * </pre>
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using @ref setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see @ref getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of @ref KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde312/kaccelbase.h b/python/pykde/extra/kde312/kaccelbase.h
deleted file mode 100644
index 03fa9c87..00000000
--- a/python/pykde/extra/kde312/kaccelbase.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * @ref KKeyChooser GUI.
- *
- * A @ref KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * @ref KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for @ref insertItem() is used only
- * in the configuration dialog.
- *<pre>
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *</pre>
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the @ref KStdAccel::Print from above.
- *
- * <pre>
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * </pre>
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * <pre>
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * </pre>
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> @ref readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.22 2002/10/06 18:19:39 ellis Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * @ref KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with @ref setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde312/kicontheme.h b/python/pykde/extra/kde312/kicontheme.h
deleted file mode 100644
index bfee160b..00000000
--- a/python/pykde/extra/kde312/kicontheme.h
+++ /dev/null
@@ -1,331 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.26 2002/10/26 22:08:38 tjansen Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=Desktop, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48 };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde312/kkeyserver_x11.h b/python/pykde/extra/kde312/kkeyserver_x11.h
deleted file mode 100644
index 568de854..00000000
--- a/python/pykde/extra/kde312/kkeyserver_x11.h
+++ /dev/null
@@ -1,435 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- struct CodeMod { int code, mod; };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if succesful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if succesful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed @ref KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required @ref KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a @ref KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a @ref KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed @ref KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed @ref KKey::ModFlag modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of @ref KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param sym if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed @ref KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-};
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde312/konsole_part.h b/python/pykde/extra/kde312/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde312/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde312/kpanelmenu.h b/python/pykde/extra/kde312/kpanelmenu.h
deleted file mode 100644
index 734c5051..00000000
--- a/python/pykde/extra/kde312/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <goffioul@imec.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and @ref slotExec(). You also have to provide a factory
- * object in your library, see @ref KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <goffioul@imec.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * @ref slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call @ref setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-//#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
-// K_EXPORT_COMPONENT_FACTORY( \
-// kickermenu_##libname, \
-// KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde312/krecentdirs.h b/python/pykde/extra/kde312/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde312/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde312/ksycocafactory.h b/python/pykde/extra/kde312/ksycocafactory.h
deleted file mode 100644
index 1959edda..00000000
--- a/python/pykde/extra/kde312/ksycocafactory.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde312/ktoolbarbutton.h b/python/pykde/extra/kde312/ktoolbarbutton.h
deleted file mode 100644
index 6fafb1ed..00000000
--- a/python/pykde/extra/kde312/ktoolbarbutton.h
+++ /dev/null
@@ -1,317 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by @ref KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use @ref setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap);
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over @ref setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if @ref #generate is
- * true. This function is preferred over @ref setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- void setIcon(const TQString &icon, bool /*generate*/ ) { setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon);
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon);
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use @ref toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use @ref setDelayedPopup if you want that
- * behavior. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p The new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setPopup (TQPopupMenu *p, bool toggle = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p the new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setDelayedPopup(TQPopupMenu *p, bool toggle = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitely turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of @ref KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde312/kurifilter.h b/python/pykde/extra/kde312/kurifilter.h
deleted file mode 100644
index 6daf7769..00000000
--- a/python/pykde/extra/kde312/kurifilter.h
+++ /dev/null
@@ -1,602 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.27 2002/10/30 09:37:39 neil Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-
-#include <kurl.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class TQStringList;
-class KCModule;
-
-/**
-* This is a basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* whenever the application requires more information about the
-* URI than just a filtered version of it. Any application can
-* create an instance of this class and send it to @ref KURIFilter
-* to have the filter plugins fill the necessary information.
-*
-* @sect Example
-* <pre>
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* if( filtered )
-* print ( "URI: %s\n"Filtered URI: %s\n URI Type: %i\n"Was Filtered: %i"
-* text.latin1(), d.uri().url().latin1(), d.uriType(), filtered );
-* </pre>
-*
-* The above code should yield the following output:
-* <pre>
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* </pre>
-*
-* @short A message object for exchanging filtering URI info.
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of URI to be filtered.
- *
- * This enumerator prvoides the return value for
- * @ref uriType. A brief description for each value:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& /*data*/);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * TRUE. You should instead use the result from the
- * @ref KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- bool hasBeenFiltered() const { return m_bFiltered; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins sucessfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See @ref #hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function works only for a local resource and
- * expects the absolute path to the relative URL set in this
- * meta object. If you are extracting the absolute path from
- * a KURL object, make sure you always set the argument below
- * using KURL::path() instead of KURL::url() so that "file:/"
- * would not be appended! Otherwise, the filter might not be
- * able to make correct determination whether the relative URL
- * locally exists!
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& /* abs_path */ );
-
- /**
- * Returns the absolute path if one has already been set.
- */
- TQString absolutePath() const;
-
- /**
- * Returns true if the supplied data has an absolute path.
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Returns true if the current data is a local resource with
- * command line options and arguments.
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource
- */
- TQString iconName();
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- */
- void init( const KURL& url = TQString::null );
-
-private:
- bool m_bFiltered;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All
- * plugins designed to provide URI filtering functionalities
- * should inherit from this abstract class and provide a
- * specific filtering implementation.
- *
- * All inheriting classes need to implement the pure
- * virtual function @ref filterURI. Otherwise, they
- * would also become abstract.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object.
- * @param name the name of the plugin.
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsability of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, @p null if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or @p null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of a URI.
- *
- * The intention of this plugin class is to allow people to extend
- * the functionality of KURL without modifying it directly. This
- * way KURL will remain a generic parser capable of parsing any
- * generic URL that adheres to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI,
- * and returns the filtered version whenever possible. The filters
- * are implemented using plugins to provide easy extensibility
- * of the filtering mechanism. That is, new filters can be added in
- * the future by simply inheriting from @ref KURIFilterPlugin and
- * implementing the @ref KURIFilterPlugin::filterURI method.
- *
- * Use of this plugin-manager class is straight forward. Since
- * it is a singleton object, all you have to do is obtain an instance
- * by doing @p KURIFilter::self() and use any of the public member
- * functions to preform the filtering.
- *
- * @sect Example
- *
- * To simply filter a given string:
- * <pre>
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * </pre>
- *
- * You can alternatively use a KURL:
- * <pre>
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * </pre>
- *
- * If you have a constant string or a constant URL,
- * simply invoke the corresponding function to obtain
- * the filtered string or URL instead of a boolean flag:
- * <pre>
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * </pre>
- *
- * You can also specify only specific filter(s) to be applied
- * by supplying the name(s) of the filter(s). By defualt all
- * filters that are found are loaded when the KURIFilter object
- * is created will be used. These names are taken from the
- * enteries in the \".desktop\" files. Here are a couple of
- * examples:
- * <pre>
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "KShortURIFilter" );
- *
- * TQStringList list;
- * list << "KShortURIFilter" << "MyFilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * </pre>
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See @ref KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Return a static instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * This filters the given data based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * This filters the given string based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins
- *
- * @since 3.1
- *
- * @return a TQStringList of plugin names
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * @ref loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been dis
- */
- void loadPlugins();
-
-private:
-
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-
-};
-
-#endif
-
diff --git a/python/pykde/extra/kde313/kaccelaction.h b/python/pykde/extra/kde313/kaccelaction.h
deleted file mode 100644
index 8e422505..00000000
--- a/python/pykde/extra/kde313/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a @ref KShortcut. The user can configure and
- * enable/disable them using @ref KKeyDialog.
- *
- * <pre>
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * </pre>
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using @ref setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see @ref getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of @ref KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde313/kaccelbase.h b/python/pykde/extra/kde313/kaccelbase.h
deleted file mode 100644
index 03fa9c87..00000000
--- a/python/pykde/extra/kde313/kaccelbase.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * @ref KKeyChooser GUI.
- *
- * A @ref KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * @ref KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for @ref insertItem() is used only
- * in the configuration dialog.
- *<pre>
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *</pre>
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the @ref KStdAccel::Print from above.
- *
- * <pre>
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * </pre>
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * <pre>
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * </pre>
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> @ref readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.22 2002/10/06 18:19:39 ellis Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * @ref KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with @ref setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde313/kicontheme.h b/python/pykde/extra/kde313/kicontheme.h
deleted file mode 100644
index bfee160b..00000000
--- a/python/pykde/extra/kde313/kicontheme.h
+++ /dev/null
@@ -1,331 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.26 2002/10/26 22:08:38 tjansen Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=Desktop, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48 };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde313/kkeyserver_x11.h b/python/pykde/extra/kde313/kkeyserver_x11.h
deleted file mode 100644
index 568de854..00000000
--- a/python/pykde/extra/kde313/kkeyserver_x11.h
+++ /dev/null
@@ -1,435 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- struct CodeMod { int code, mod; };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if succesful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if succesful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed @ref KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required @ref KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a @ref KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a @ref KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed @ref KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed @ref KKey::ModFlag modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of @ref KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param sym if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed @ref KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-};
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde313/konsole_part.h b/python/pykde/extra/kde313/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde313/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde313/kpanelmenu.h b/python/pykde/extra/kde313/kpanelmenu.h
deleted file mode 100644
index 734c5051..00000000
--- a/python/pykde/extra/kde313/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <goffioul@imec.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and @ref slotExec(). You also have to provide a factory
- * object in your library, see @ref KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <goffioul@imec.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * @ref slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call @ref setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-//#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
-// K_EXPORT_COMPONENT_FACTORY( \
-// kickermenu_##libname, \
-// KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde313/krecentdirs.h b/python/pykde/extra/kde313/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde313/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde313/ksycocafactory.h b/python/pykde/extra/kde313/ksycocafactory.h
deleted file mode 100644
index 1959edda..00000000
--- a/python/pykde/extra/kde313/ksycocafactory.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde313/ktoolbarbutton.h b/python/pykde/extra/kde313/ktoolbarbutton.h
deleted file mode 100644
index 6fafb1ed..00000000
--- a/python/pykde/extra/kde313/ktoolbarbutton.h
+++ /dev/null
@@ -1,317 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by @ref KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use @ref setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap);
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over @ref setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if @ref #generate is
- * true. This function is preferred over @ref setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- void setIcon(const TQString &icon, bool /*generate*/ ) { setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon);
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon);
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use @ref toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use @ref setDelayedPopup if you want that
- * behavior. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p The new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setPopup (TQPopupMenu *p, bool toggle = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p the new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setDelayedPopup(TQPopupMenu *p, bool toggle = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitely turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of @ref KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde313/kurifilter.h b/python/pykde/extra/kde313/kurifilter.h
deleted file mode 100644
index 6daf7769..00000000
--- a/python/pykde/extra/kde313/kurifilter.h
+++ /dev/null
@@ -1,602 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.27 2002/10/30 09:37:39 neil Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-
-#include <kurl.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class TQStringList;
-class KCModule;
-
-/**
-* This is a basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* whenever the application requires more information about the
-* URI than just a filtered version of it. Any application can
-* create an instance of this class and send it to @ref KURIFilter
-* to have the filter plugins fill the necessary information.
-*
-* @sect Example
-* <pre>
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* if( filtered )
-* print ( "URI: %s\n"Filtered URI: %s\n URI Type: %i\n"Was Filtered: %i"
-* text.latin1(), d.uri().url().latin1(), d.uriType(), filtered );
-* </pre>
-*
-* The above code should yield the following output:
-* <pre>
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* </pre>
-*
-* @short A message object for exchanging filtering URI info.
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of URI to be filtered.
- *
- * This enumerator prvoides the return value for
- * @ref uriType. A brief description for each value:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& /*data*/);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * TRUE. You should instead use the result from the
- * @ref KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- bool hasBeenFiltered() const { return m_bFiltered; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins sucessfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See @ref #hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function works only for a local resource and
- * expects the absolute path to the relative URL set in this
- * meta object. If you are extracting the absolute path from
- * a KURL object, make sure you always set the argument below
- * using KURL::path() instead of KURL::url() so that "file:/"
- * would not be appended! Otherwise, the filter might not be
- * able to make correct determination whether the relative URL
- * locally exists!
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& /* abs_path */ );
-
- /**
- * Returns the absolute path if one has already been set.
- */
- TQString absolutePath() const;
-
- /**
- * Returns true if the supplied data has an absolute path.
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Returns true if the current data is a local resource with
- * command line options and arguments.
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource
- */
- TQString iconName();
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- */
- void init( const KURL& url = TQString::null );
-
-private:
- bool m_bFiltered;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All
- * plugins designed to provide URI filtering functionalities
- * should inherit from this abstract class and provide a
- * specific filtering implementation.
- *
- * All inheriting classes need to implement the pure
- * virtual function @ref filterURI. Otherwise, they
- * would also become abstract.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object.
- * @param name the name of the plugin.
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsability of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, @p null if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or @p null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of a URI.
- *
- * The intention of this plugin class is to allow people to extend
- * the functionality of KURL without modifying it directly. This
- * way KURL will remain a generic parser capable of parsing any
- * generic URL that adheres to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI,
- * and returns the filtered version whenever possible. The filters
- * are implemented using plugins to provide easy extensibility
- * of the filtering mechanism. That is, new filters can be added in
- * the future by simply inheriting from @ref KURIFilterPlugin and
- * implementing the @ref KURIFilterPlugin::filterURI method.
- *
- * Use of this plugin-manager class is straight forward. Since
- * it is a singleton object, all you have to do is obtain an instance
- * by doing @p KURIFilter::self() and use any of the public member
- * functions to preform the filtering.
- *
- * @sect Example
- *
- * To simply filter a given string:
- * <pre>
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * </pre>
- *
- * You can alternatively use a KURL:
- * <pre>
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * </pre>
- *
- * If you have a constant string or a constant URL,
- * simply invoke the corresponding function to obtain
- * the filtered string or URL instead of a boolean flag:
- * <pre>
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * </pre>
- *
- * You can also specify only specific filter(s) to be applied
- * by supplying the name(s) of the filter(s). By defualt all
- * filters that are found are loaded when the KURIFilter object
- * is created will be used. These names are taken from the
- * enteries in the \".desktop\" files. Here are a couple of
- * examples:
- * <pre>
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "KShortURIFilter" );
- *
- * TQStringList list;
- * list << "KShortURIFilter" << "MyFilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * </pre>
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See @ref KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Return a static instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * This filters the given data based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * This filters the given string based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins
- *
- * @since 3.1
- *
- * @return a TQStringList of plugin names
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * @ref loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been dis
- */
- void loadPlugins();
-
-private:
-
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-
-};
-
-#endif
-
diff --git a/python/pykde/extra/kde314/kaccelaction.h b/python/pykde/extra/kde314/kaccelaction.h
deleted file mode 100644
index 8e422505..00000000
--- a/python/pykde/extra/kde314/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a @ref KShortcut. The user can configure and
- * enable/disable them using @ref KKeyDialog.
- *
- * <pre>
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * </pre>
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using @ref setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see @ref getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of @ref KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde314/kaccelbase.h b/python/pykde/extra/kde314/kaccelbase.h
deleted file mode 100644
index 03fa9c87..00000000
--- a/python/pykde/extra/kde314/kaccelbase.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * @ref KKeyChooser GUI.
- *
- * A @ref KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * @ref KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for @ref insertItem() is used only
- * in the configuration dialog.
- *<pre>
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *</pre>
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the @ref KStdAccel::Print from above.
- *
- * <pre>
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * </pre>
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * <pre>
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * </pre>
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> @ref readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.22 2002/10/06 18:19:39 ellis Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * @ref KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with @ref setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde314/kicontheme.h b/python/pykde/extra/kde314/kicontheme.h
deleted file mode 100644
index bfee160b..00000000
--- a/python/pykde/extra/kde314/kicontheme.h
+++ /dev/null
@@ -1,331 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.26 2002/10/26 22:08:38 tjansen Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=Desktop, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48 };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde314/kkeyserver_x11.h b/python/pykde/extra/kde314/kkeyserver_x11.h
deleted file mode 100644
index 48d6c334..00000000
--- a/python/pykde/extra/kde314/kkeyserver_x11.h
+++ /dev/null
@@ -1,435 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- struct CodeMod { int code, mod; };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if succesful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if succesful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed @ref KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required @ref KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a @ref KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a @ref KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed @ref KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed @ref KKey::ModFlag modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of @ref KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param sym if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed @ref KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde314/konsole_part.h b/python/pykde/extra/kde314/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde314/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde314/kpanelmenu.h b/python/pykde/extra/kde314/kpanelmenu.h
deleted file mode 100644
index 032350ad..00000000
--- a/python/pykde/extra/kde314/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <goffioul@imec.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and @ref slotExec(). You also have to provide a factory
- * object in your library, see @ref KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <goffioul@imec.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * @ref slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call @ref setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde314/krecentdirs.h b/python/pykde/extra/kde314/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde314/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde314/ksycocafactory.h b/python/pykde/extra/kde314/ksycocafactory.h
deleted file mode 100644
index 1959edda..00000000
--- a/python/pykde/extra/kde314/ksycocafactory.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde314/ktoolbarbutton.h b/python/pykde/extra/kde314/ktoolbarbutton.h
deleted file mode 100644
index 6fafb1ed..00000000
--- a/python/pykde/extra/kde314/ktoolbarbutton.h
+++ /dev/null
@@ -1,317 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by @ref KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use @ref setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap);
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over @ref setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if @ref #generate is
- * true. This function is preferred over @ref setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- void setIcon(const TQString &icon, bool /*generate*/ ) { setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon);
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon);
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use @ref toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use @ref setDelayedPopup if you want that
- * behavior. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p The new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setPopup (TQPopupMenu *p, bool toggle = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p the new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setDelayedPopup(TQPopupMenu *p, bool toggle = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitely turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of @ref KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde314/kurifilter.h b/python/pykde/extra/kde314/kurifilter.h
deleted file mode 100644
index 4e7ad792..00000000
--- a/python/pykde/extra/kde314/kurifilter.h
+++ /dev/null
@@ -1,602 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.27.2.1 2003/06/06 09:12:16 mueller Exp $"
-
-#include <tqstringlist.h>
-#include <tqobject.h>
-
-#include <kurl.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class TQStringList;
-class KCModule;
-
-/**
-* This is a basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* whenever the application requires more information about the
-* URI than just a filtered version of it. Any application can
-* create an instance of this class and send it to @ref KURIFilter
-* to have the filter plugins fill the necessary information.
-*
-* @sect Example
-* <pre>
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* if( filtered )
-* print ( "URI: %s\n"Filtered URI: %s\n URI Type: %i\n"Was Filtered: %i"
-* text.latin1(), d.uri().url().latin1(), d.uriType(), filtered );
-* </pre>
-*
-* The above code should yield the following output:
-* <pre>
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* </pre>
-*
-* @short A message object for exchanging filtering URI info.
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of URI to be filtered.
- *
- * This enumerator prvoides the return value for
- * @ref uriType. A brief description for each value:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& /*data*/);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * TRUE. You should instead use the result from the
- * @ref KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- bool hasBeenFiltered() const { return m_bFiltered; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins sucessfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See @ref #hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function works only for a local resource and
- * expects the absolute path to the relative URL set in this
- * meta object. If you are extracting the absolute path from
- * a KURL object, make sure you always set the argument below
- * using KURL::path() instead of KURL::url() so that "file:/"
- * would not be appended! Otherwise, the filter might not be
- * able to make correct determination whether the relative URL
- * locally exists!
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& /* abs_path */ );
-
- /**
- * Returns the absolute path if one has already been set.
- */
- TQString absolutePath() const;
-
- /**
- * Returns true if the supplied data has an absolute path.
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Returns true if the current data is a local resource with
- * command line options and arguments.
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource
- */
- TQString iconName();
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- */
- void init( const KURL& url = TQString::null );
-
-private:
- bool m_bFiltered;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All
- * plugins designed to provide URI filtering functionalities
- * should inherit from this abstract class and provide a
- * specific filtering implementation.
- *
- * All inheriting classes need to implement the pure
- * virtual function @ref filterURI. Otherwise, they
- * would also become abstract.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object.
- * @param name the name of the plugin.
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsability of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, @p null if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or @p null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of a URI.
- *
- * The intention of this plugin class is to allow people to extend
- * the functionality of KURL without modifying it directly. This
- * way KURL will remain a generic parser capable of parsing any
- * generic URL that adheres to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI,
- * and returns the filtered version whenever possible. The filters
- * are implemented using plugins to provide easy extensibility
- * of the filtering mechanism. That is, new filters can be added in
- * the future by simply inheriting from @ref KURIFilterPlugin and
- * implementing the @ref KURIFilterPlugin::filterURI method.
- *
- * Use of this plugin-manager class is straight forward. Since
- * it is a singleton object, all you have to do is obtain an instance
- * by doing @p KURIFilter::self() and use any of the public member
- * functions to preform the filtering.
- *
- * @sect Example
- *
- * To simply filter a given string:
- * <pre>
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * </pre>
- *
- * You can alternatively use a KURL:
- * <pre>
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * </pre>
- *
- * If you have a constant string or a constant URL,
- * simply invoke the corresponding function to obtain
- * the filtered string or URL instead of a boolean flag:
- * <pre>
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * </pre>
- *
- * You can also specify only specific filter(s) to be applied
- * by supplying the name(s) of the filter(s). By defualt all
- * filters that are found are loaded when the KURIFilter object
- * is created will be used. These names are taken from the
- * enteries in the \".desktop\" files. Here are a couple of
- * examples:
- * <pre>
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "KShortURIFilter" );
- *
- * TQStringList list;
- * list << "KShortURIFilter" << "MyFilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * </pre>
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See @ref KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Return a static instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * This filters the given data based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * This filters the given string based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins
- *
- * @since 3.1
- *
- * @return a TQStringList of plugin names
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * @ref loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been dis
- */
- void loadPlugins();
-
-private:
-
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-
-};
-
-#endif
-
diff --git a/python/pykde/extra/kde315/kaccelaction.h b/python/pykde/extra/kde315/kaccelaction.h
deleted file mode 100644
index 8e422505..00000000
--- a/python/pykde/extra/kde315/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a @ref KShortcut. The user can configure and
- * enable/disable them using @ref KKeyDialog.
- *
- * <pre>
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * </pre>
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using @ref setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see @ref getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of @ref KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by @ref setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde315/kaccelbase.h b/python/pykde/extra/kde315/kaccelbase.h
deleted file mode 100644
index 03fa9c87..00000000
--- a/python/pykde/extra/kde315/kaccelbase.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * @ref KKeyChooser GUI.
- *
- * A @ref KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * @ref KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for @ref insertItem() is used only
- * in the configuration dialog.
- *<pre>
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *</pre>
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the @ref KStdAccel::Print from above.
- *
- * <pre>
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * </pre>
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * <pre>
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * </pre>
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> @ref readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.22 2002/10/06 18:19:39 ellis Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * @ref KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with @ref setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde315/kicontheme.h b/python/pykde/extra/kde315/kicontheme.h
deleted file mode 100644
index 97cd9eac..00000000
--- a/python/pykde/extra/kde315/kicontheme.h
+++ /dev/null
@@ -1,331 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.26.2.1 2003/09/21 20:10:28 mcamen Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=0, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48 };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See @ref #KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde315/kkeyserver_x11.h b/python/pykde/extra/kde315/kkeyserver_x11.h
deleted file mode 100644
index 48d6c334..00000000
--- a/python/pykde/extra/kde315/kkeyserver_x11.h
+++ /dev/null
@@ -1,435 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- struct CodeMod { int code, mod; };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if succesful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if succesful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed @ref KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required @ref KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a @ref KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a @ref KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed @ref KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param the mask of @ref KKey::ModFlag modifiers
- * @param the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed @ref KKey::ModFlag modifiers.
- * @param the mask of X11 modifiers
- * @param the mask of @ref KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param sym if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed @ref KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed @ref KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde315/konsole_part.h b/python/pykde/extra/kde315/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde315/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde315/kpanelmenu.h b/python/pykde/extra/kde315/kpanelmenu.h
deleted file mode 100644
index 032350ad..00000000
--- a/python/pykde/extra/kde315/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <goffioul@imec.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and @ref slotExec(). You also have to provide a factory
- * object in your library, see @ref KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <goffioul@imec.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * @ref slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call @ref setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde315/krecentdirs.h b/python/pykde/extra/kde315/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde315/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde315/ksycocafactory.h b/python/pykde/extra/kde315/ksycocafactory.h
deleted file mode 100644
index 1959edda..00000000
--- a/python/pykde/extra/kde315/ksycocafactory.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde315/ktoolbarbutton.h b/python/pykde/extra/kde315/ktoolbarbutton.h
deleted file mode 100644
index 6fafb1ed..00000000
--- a/python/pykde/extra/kde315/ktoolbarbutton.h
+++ /dev/null
@@ -1,317 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by @ref KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use @ref setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap);
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap);
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over @ref setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if @ref #generate is
- * true. This function is preferred over @ref setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- void setIcon(const TQString &icon, bool /*generate*/ ) { setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon);
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon);
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use @ref toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use @ref setDelayedPopup if you want that
- * behavior. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p The new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setPopup (TQPopupMenu *p, bool toggle = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second. You can also make the popup-menu
- * "sticky", i.e. visible until a selection is made or the mouse is
- * clikced elsewhere, by simply setting the second argument to true.
- * This "sticky" button feature allows you to make a selection without
- * having to press and hold down the mouse while making a selection.
- *
- * @param p the new popup menu
- * @param toggle if true, makes the button "sticky" (toggled)
- */
- void setDelayedPopup(TQPopupMenu *p, bool toggle = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitely turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of @ref KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.26 2002/09/28 15:16:22 tjansen Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde315/kurifilter.h b/python/pykde/extra/kde315/kurifilter.h
deleted file mode 100644
index 4e7ad792..00000000
--- a/python/pykde/extra/kde315/kurifilter.h
+++ /dev/null
@@ -1,602 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.27.2.1 2003/06/06 09:12:16 mueller Exp $"
-
-#include <tqstringlist.h>
-#include <tqobject.h>
-
-#include <kurl.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class TQStringList;
-class KCModule;
-
-/**
-* This is a basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* whenever the application requires more information about the
-* URI than just a filtered version of it. Any application can
-* create an instance of this class and send it to @ref KURIFilter
-* to have the filter plugins fill the necessary information.
-*
-* @sect Example
-* <pre>
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* if( filtered )
-* print ( "URI: %s\n"Filtered URI: %s\n URI Type: %i\n"Was Filtered: %i"
-* text.latin1(), d.uri().url().latin1(), d.uriType(), filtered );
-* </pre>
-*
-* The above code should yield the following output:
-* <pre>
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* </pre>
-*
-* @short A message object for exchanging filtering URI info.
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of URI to be filtered.
- *
- * This enumerator prvoides the return value for
- * @ref uriType. A brief description for each value:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& /*data*/);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * TRUE. You should instead use the result from the
- * @ref KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- bool hasBeenFiltered() const { return m_bFiltered; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins sucessfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See @ref #hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function works only for a local resource and
- * expects the absolute path to the relative URL set in this
- * meta object. If you are extracting the absolute path from
- * a KURL object, make sure you always set the argument below
- * using KURL::path() instead of KURL::url() so that "file:/"
- * would not be appended! Otherwise, the filter might not be
- * able to make correct determination whether the relative URL
- * locally exists!
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& /* abs_path */ );
-
- /**
- * Returns the absolute path if one has already been set.
- */
- TQString absolutePath() const;
-
- /**
- * Returns true if the supplied data has an absolute path.
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Returns true if the current data is a local resource with
- * command line options and arguments.
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource
- */
- TQString iconName();
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- */
- void init( const KURL& url = TQString::null );
-
-private:
- bool m_bFiltered;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All
- * plugins designed to provide URI filtering functionalities
- * should inherit from this abstract class and provide a
- * specific filtering implementation.
- *
- * All inheriting classes need to implement the pure
- * virtual function @ref filterURI. Otherwise, they
- * would also become abstract.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object.
- * @param name the name of the plugin.
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsability of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, @p null if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or @p null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of a URI.
- *
- * The intention of this plugin class is to allow people to extend
- * the functionality of KURL without modifying it directly. This
- * way KURL will remain a generic parser capable of parsing any
- * generic URL that adheres to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI,
- * and returns the filtered version whenever possible. The filters
- * are implemented using plugins to provide easy extensibility
- * of the filtering mechanism. That is, new filters can be added in
- * the future by simply inheriting from @ref KURIFilterPlugin and
- * implementing the @ref KURIFilterPlugin::filterURI method.
- *
- * Use of this plugin-manager class is straight forward. Since
- * it is a singleton object, all you have to do is obtain an instance
- * by doing @p KURIFilter::self() and use any of the public member
- * functions to preform the filtering.
- *
- * @sect Example
- *
- * To simply filter a given string:
- * <pre>
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * </pre>
- *
- * You can alternatively use a KURL:
- * <pre>
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * </pre>
- *
- * If you have a constant string or a constant URL,
- * simply invoke the corresponding function to obtain
- * the filtered string or URL instead of a boolean flag:
- * <pre>
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * </pre>
- *
- * You can also specify only specific filter(s) to be applied
- * by supplying the name(s) of the filter(s). By defualt all
- * filters that are found are loaded when the KURIFilter object
- * is created will be used. These names are taken from the
- * enteries in the \".desktop\" files. Here are a couple of
- * examples:
- * <pre>
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "KShortURIFilter" );
- *
- * TQStringList list;
- * list << "KShortURIFilter" << "MyFilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * </pre>
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See @ref KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Return a static instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * This filters the given data based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * This filters the given string based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * This filters the given URL based on the specified
- * filter list. If the list is empty all avaliable
- * filter plugins would be used. If not, only those
- * given in the list are used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list filters to be used
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins
- *
- * @since 3.1
- *
- * @return a TQStringList of plugin names
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * @ref loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been dis
- */
- void loadPlugins();
-
-private:
-
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-
-};
-
-#endif
-
diff --git a/python/pykde/extra/kde320/configwidget.h b/python/pykde/extra/kde320/configwidget.h
deleted file mode 100644
index e289743a..00000000
--- a/python/pykde/extra/kde320/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde320/kaccelaction.h b/python/pykde/extra/kde320/kaccelaction.h
deleted file mode 100644
index 0418297c..00000000
--- a/python/pykde/extra/kde320/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde320/kaccelbase.h b/python/pykde/extra/kde320/kaccelbase.h
deleted file mode 100644
index e2ec66e9..00000000
--- a/python/pykde/extra/kde320/kaccelbase.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.26 2003/08/16 19:44:57 coolo Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde320/kicontheme.h b/python/pykde/extra/kde320/kicontheme.h
deleted file mode 100644
index 4c15c2d9..00000000
--- a/python/pykde/extra/kde320/kicontheme.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.29 2003/11/02 14:50:34 carewolf Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=0, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde320/kkeyserver_x11.h b/python/pykde/extra/kde320/kkeyserver_x11.h
deleted file mode 100644
index 1271f506..00000000
--- a/python/pykde/extra/kde320/kkeyserver_x11.h
+++ /dev/null
@@ -1,433 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde320/konsole_part.h b/python/pykde/extra/kde320/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde320/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde320/kpanelmenu.h b/python/pykde/extra/kde320/kpanelmenu.h
deleted file mode 100644
index 1803e808..00000000
--- a/python/pykde/extra/kde320/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <goffioul@imec.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <goffioul@imec.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde320/krecentdirs.h b/python/pykde/extra/kde320/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde320/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde320/ksharedptr.h b/python/pykde/extra/kde320/ksharedptr.h
deleted file mode 100644
index 8189276a..00000000
--- a/python/pykde/extra/kde320/ksharedptr.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
- */
-class KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers perfectly. So just
- * use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
- */
-template< class T >
-struct KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->KShared::_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->KShared::_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->KShared::_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->KShared::_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->KShared::_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->KShared::_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->KShared::_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->KShared::_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde320/ksycocafactory.h b/python/pykde/extra/kde320/ksycocafactory.h
deleted file mode 100644
index 2a114ee0..00000000
--- a/python/pykde/extra/kde320/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde320/ktoolbarbutton.h b/python/pykde/extra/kde320/ktoolbarbutton.h
deleted file mode 100644
index 5b7a85f9..00000000
--- a/python/pykde/extra/kde320/ktoolbarbutton.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.34 2003/09/09 12:40:58 bhards Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.34 2003/09/09 12:40:58 bhards Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde320/kurifilter.h b/python/pykde/extra/kde320/kurifilter.h
deleted file mode 100644
index 834bff8a..00000000
--- a/python/pykde/extra/kde320/kurifilter.h
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.41 2003/08/30 08:56:21 raabe Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-#include <kdemacros.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde320/selectdialog.h b/python/pykde/extra/kde320/selectdialog.h
deleted file mode 100644
index 680d48ef..00000000
--- a/python/pykde/extra/kde320/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde321/configwidget.h b/python/pykde/extra/kde321/configwidget.h
deleted file mode 100644
index e289743a..00000000
--- a/python/pykde/extra/kde321/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde321/kaccelaction.h b/python/pykde/extra/kde321/kaccelaction.h
deleted file mode 100644
index 0418297c..00000000
--- a/python/pykde/extra/kde321/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde321/kaccelbase.h b/python/pykde/extra/kde321/kaccelbase.h
deleted file mode 100644
index e2ec66e9..00000000
--- a/python/pykde/extra/kde321/kaccelbase.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.26 2003/08/16 19:44:57 coolo Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde321/kicontheme.h b/python/pykde/extra/kde321/kicontheme.h
deleted file mode 100644
index 4c15c2d9..00000000
--- a/python/pykde/extra/kde321/kicontheme.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.29 2003/11/02 14:50:34 carewolf Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=0, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde321/kkeyserver_x11.h b/python/pykde/extra/kde321/kkeyserver_x11.h
deleted file mode 100644
index 1271f506..00000000
--- a/python/pykde/extra/kde321/kkeyserver_x11.h
+++ /dev/null
@@ -1,433 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde321/konsole_part.h b/python/pykde/extra/kde321/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde321/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde321/kpanelmenu.h b/python/pykde/extra/kde321/kpanelmenu.h
deleted file mode 100644
index 1803e808..00000000
--- a/python/pykde/extra/kde321/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <goffioul@imec.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <goffioul@imec.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde321/krecentdirs.h b/python/pykde/extra/kde321/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde321/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde321/ksharedptr.h b/python/pykde/extra/kde321/ksharedptr.h
deleted file mode 100644
index e8dc8774..00000000
--- a/python/pykde/extra/kde321/ksharedptr.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
- */
-class KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers perfectly. So just
- * use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
- */
-template< class T >
-struct KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde321/ksycocafactory.h b/python/pykde/extra/kde321/ksycocafactory.h
deleted file mode 100644
index 2a114ee0..00000000
--- a/python/pykde/extra/kde321/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde321/ktoolbarbutton.h b/python/pykde/extra/kde321/ktoolbarbutton.h
deleted file mode 100644
index 5b7a85f9..00000000
--- a/python/pykde/extra/kde321/ktoolbarbutton.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.34 2003/09/09 12:40:58 bhards Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.34 2003/09/09 12:40:58 bhards Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde321/kurifilter.h b/python/pykde/extra/kde321/kurifilter.h
deleted file mode 100644
index 834bff8a..00000000
--- a/python/pykde/extra/kde321/kurifilter.h
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.41 2003/08/30 08:56:21 raabe Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-#include <kdemacros.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde321/selectdialog.h b/python/pykde/extra/kde321/selectdialog.h
deleted file mode 100644
index 680d48ef..00000000
--- a/python/pykde/extra/kde321/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde322/configwidget.h b/python/pykde/extra/kde322/configwidget.h
deleted file mode 100644
index e289743a..00000000
--- a/python/pykde/extra/kde322/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde322/kaccelaction.h b/python/pykde/extra/kde322/kaccelaction.h
deleted file mode 100644
index 0418297c..00000000
--- a/python/pykde/extra/kde322/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde322/kaccelbase.h b/python/pykde/extra/kde322/kaccelbase.h
deleted file mode 100644
index e2ec66e9..00000000
--- a/python/pykde/extra/kde322/kaccelbase.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.26 2003/08/16 19:44:57 coolo Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde322/kicontheme.h b/python/pykde/extra/kde322/kicontheme.h
deleted file mode 100644
index 4c15c2d9..00000000
--- a/python/pykde/extra/kde322/kicontheme.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.29 2003/11/02 14:50:34 carewolf Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=0, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde322/kkeyserver_x11.h b/python/pykde/extra/kde322/kkeyserver_x11.h
deleted file mode 100644
index 1271f506..00000000
--- a/python/pykde/extra/kde322/kkeyserver_x11.h
+++ /dev/null
@@ -1,433 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde322/konsole_part.h b/python/pykde/extra/kde322/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde322/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde322/kpanelmenu.h b/python/pykde/extra/kde322/kpanelmenu.h
deleted file mode 100644
index 1803e808..00000000
--- a/python/pykde/extra/kde322/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <goffioul@imec.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <goffioul@imec.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde322/krecentdirs.h b/python/pykde/extra/kde322/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde322/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde322/ksharedptr.h b/python/pykde/extra/kde322/ksharedptr.h
deleted file mode 100644
index e8dc8774..00000000
--- a/python/pykde/extra/kde322/ksharedptr.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
- */
-class KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers perfectly. So just
- * use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
- */
-template< class T >
-struct KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde322/ksycocafactory.h b/python/pykde/extra/kde322/ksycocafactory.h
deleted file mode 100644
index 2a114ee0..00000000
--- a/python/pykde/extra/kde322/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde322/ktoolbarbutton.h b/python/pykde/extra/kde322/ktoolbarbutton.h
deleted file mode 100644
index 5b7a85f9..00000000
--- a/python/pykde/extra/kde322/ktoolbarbutton.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.34 2003/09/09 12:40:58 bhards Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.34 2003/09/09 12:40:58 bhards Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde322/kurifilter.h b/python/pykde/extra/kde322/kurifilter.h
deleted file mode 100644
index 834bff8a..00000000
--- a/python/pykde/extra/kde322/kurifilter.h
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.41 2003/08/30 08:56:21 raabe Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-#include <kdemacros.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde322/selectdialog.h b/python/pykde/extra/kde322/selectdialog.h
deleted file mode 100644
index 680d48ef..00000000
--- a/python/pykde/extra/kde322/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde323/configwidget.h b/python/pykde/extra/kde323/configwidget.h
deleted file mode 100644
index e289743a..00000000
--- a/python/pykde/extra/kde323/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde323/kaccelaction.h b/python/pykde/extra/kde323/kaccelaction.h
deleted file mode 100644
index 0418297c..00000000
--- a/python/pykde/extra/kde323/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde323/kaccelbase.h b/python/pykde/extra/kde323/kaccelbase.h
deleted file mode 100644
index e2ec66e9..00000000
--- a/python/pykde/extra/kde323/kaccelbase.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.26 2003/08/16 19:44:57 coolo Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde323/kicontheme.h b/python/pykde/extra/kde323/kicontheme.h
deleted file mode 100644
index 4c15c2d9..00000000
--- a/python/pykde/extra/kde323/kicontheme.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.29 2003/11/02 14:50:34 carewolf Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=0, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde323/kkeyserver_x11.h b/python/pykde/extra/kde323/kkeyserver_x11.h
deleted file mode 100644
index 1271f506..00000000
--- a/python/pykde/extra/kde323/kkeyserver_x11.h
+++ /dev/null
@@ -1,433 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde323/konsole_part.h b/python/pykde/extra/kde323/konsole_part.h
deleted file mode 100644
index 6aba7064..00000000
--- a/python/pykde/extra/kde323/konsole_part.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde323/kpanelmenu.h b/python/pykde/extra/kde323/kpanelmenu.h
deleted file mode 100644
index 1803e808..00000000
--- a/python/pykde/extra/kde323/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <goffioul@imec.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <goffioul@imec.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde323/krecentdirs.h b/python/pykde/extra/kde323/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde323/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde323/ksharedptr.h b/python/pykde/extra/kde323/ksharedptr.h
deleted file mode 100644
index e8dc8774..00000000
--- a/python/pykde/extra/kde323/ksharedptr.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
- */
-class KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers perfectly. So just
- * use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.22 2003/08/20 08:01:42 coolo Exp $
- */
-template< class T >
-struct KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde323/ksycocafactory.h b/python/pykde/extra/kde323/ksycocafactory.h
deleted file mode 100644
index 2a114ee0..00000000
--- a/python/pykde/extra/kde323/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde323/ktoolbarbutton.h b/python/pykde/extra/kde323/ktoolbarbutton.h
deleted file mode 100644
index 5b7a85f9..00000000
--- a/python/pykde/extra/kde323/ktoolbarbutton.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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.
-*/
-
-// $Id: ktoolbarbutton.h,v 1.34 2003/09/09 12:40:58 bhards Exp $
-#ifndef _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.34 2003/09/09 12:40:58 bhards Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde323/kurifilter.h b/python/pykde/extra/kde323/kurifilter.h
deleted file mode 100644
index 834bff8a..00000000
--- a/python/pykde/extra/kde323/kurifilter.h
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.41 2003/08/30 08:56:21 raabe Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-#include <kdemacros.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde323/selectdialog.h b/python/pykde/extra/kde323/selectdialog.h
deleted file mode 100644
index 680d48ef..00000000
--- a/python/pykde/extra/kde323/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde330/configwidget.h b/python/pykde/extra/kde330/configwidget.h
deleted file mode 100644
index e289743a..00000000
--- a/python/pykde/extra/kde330/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde330/kaccelaction.h b/python/pykde/extra/kde330/kaccelaction.h
deleted file mode 100644
index 0418297c..00000000
--- a/python/pykde/extra/kde330/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde330/kaccelbase.h b/python/pykde/extra/kde330/kaccelbase.h
deleted file mode 100644
index e2ec66e9..00000000
--- a/python/pykde/extra/kde330/kaccelbase.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.26 2003/08/16 19:44:57 coolo Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde330/kicontheme.h b/python/pykde/extra/kde330/kicontheme.h
deleted file mode 100644
index 82cd82bc..00000000
--- a/python/pykde/extra/kde330/kicontheme.h
+++ /dev/null
@@ -1,336 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.30 2004/01/25 21:50:41 aseigo Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=0, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// slightly larger small icons for toolbars, panels, etc
- SizeSmallMedium=22,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde330/kkeyserver_x11.h b/python/pykde/extra/kde330/kkeyserver_x11.h
deleted file mode 100644
index 1271f506..00000000
--- a/python/pykde/extra/kde330/kkeyserver_x11.h
+++ /dev/null
@@ -1,433 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde330/konsole_part.h b/python/pykde/extra/kde330/konsole_part.h
deleted file mode 100644
index e264732c..00000000
--- a/python/pykde/extra/kde330/konsole_part.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
- void slotSetEncoding();
- void slotFontChanged();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
- KSelectAction* selectSetEncoding;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
- int n_encoding;
-
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};
-
-//////////////////////////////////////////////////////////////////////
-*/
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde330/kpanelmenu.h b/python/pykde/extra/kde330/kpanelmenu.h
deleted file mode 100644
index 4186156b..00000000
--- a/python/pykde/extra/kde330/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <kdeprint@swing.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <kdeprint@swing.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @param parent parent object
- * @param name name of the object
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde330/krecentdirs.h b/python/pykde/extra/kde330/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde330/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde330/ksharedptr.h b/python/pykde/extra/kde330/ksharedptr.h
deleted file mode 100644
index da710a32..00000000
--- a/python/pykde/extra/kde330/ksharedptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
- */
-class KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers virtually perfectly.
- * So just use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * WARNING: Please note that this class template provides an implicit
- * conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
- */
-template< class T >
-struct KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde330/ksycocafactory.h b/python/pykde/extra/kde330/ksycocafactory.h
deleted file mode 100644
index 2a114ee0..00000000
--- a/python/pykde/extra/kde330/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde330/ktoolbarbutton.h b/python/pykde/extra/kde330/ktoolbarbutton.h
deleted file mode 100644
index f6b899fb..00000000
--- a/python/pykde/extra/kde330/ktoolbarbutton.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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 _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- * @param _instance the instance to use for this button
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.36 2004/03/18 02:50:16 bmeyer Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde330/kurifilter.h b/python/pykde/extra/kde330/kurifilter.h
deleted file mode 100644
index 834bff8a..00000000
--- a/python/pykde/extra/kde330/kurifilter.h
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.41 2003/08/30 08:56:21 raabe Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-#include <kdemacros.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde330/selectdialog.h b/python/pykde/extra/kde330/selectdialog.h
deleted file mode 100644
index 680d48ef..00000000
--- a/python/pykde/extra/kde330/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde331/configwidget.h b/python/pykde/extra/kde331/configwidget.h
deleted file mode 100644
index e289743a..00000000
--- a/python/pykde/extra/kde331/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde331/kaccelaction.h b/python/pykde/extra/kde331/kaccelaction.h
deleted file mode 100644
index 0418297c..00000000
--- a/python/pykde/extra/kde331/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde331/kaccelbase.h b/python/pykde/extra/kde331/kaccelbase.h
deleted file mode 100644
index e2ec66e9..00000000
--- a/python/pykde/extra/kde331/kaccelbase.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.26 2003/08/16 19:44:57 coolo Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde331/kicontheme.h b/python/pykde/extra/kde331/kicontheme.h
deleted file mode 100644
index 591a5e5e..00000000
--- a/python/pykde/extra/kde331/kicontheme.h
+++ /dev/null
@@ -1,338 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.31 2004/05/31 17:18:02 montanaro Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=0, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// slightly larger small icons for toolbars, panels, etc
- SizeSmallMedium=22,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64,
- /// enormous (ugh!) sized icons for iconviews
- SizeEnormous=128
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde331/kkeyserver_x11.h b/python/pykde/extra/kde331/kkeyserver_x11.h
deleted file mode 100644
index 1271f506..00000000
--- a/python/pykde/extra/kde331/kkeyserver_x11.h
+++ /dev/null
@@ -1,433 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde331/konsole_part.h b/python/pykde/extra/kde331/konsole_part.h
deleted file mode 100644
index e264732c..00000000
--- a/python/pykde/extra/kde331/konsole_part.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
- void slotSetEncoding();
- void slotFontChanged();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
- KSelectAction* selectSetEncoding;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
- int n_encoding;
-
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};
-
-//////////////////////////////////////////////////////////////////////
-*/
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde331/kpanelmenu.h b/python/pykde/extra/kde331/kpanelmenu.h
deleted file mode 100644
index 4186156b..00000000
--- a/python/pykde/extra/kde331/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <kdeprint@swing.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <kdeprint@swing.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @param parent parent object
- * @param name name of the object
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde331/krecentdirs.h b/python/pykde/extra/kde331/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde331/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde331/ksharedptr.h b/python/pykde/extra/kde331/ksharedptr.h
deleted file mode 100644
index da710a32..00000000
--- a/python/pykde/extra/kde331/ksharedptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
- */
-class KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers virtually perfectly.
- * So just use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * WARNING: Please note that this class template provides an implicit
- * conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
- */
-template< class T >
-struct KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde331/ksycocafactory.h b/python/pykde/extra/kde331/ksycocafactory.h
deleted file mode 100644
index 2a114ee0..00000000
--- a/python/pykde/extra/kde331/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde331/ktoolbarbutton.h b/python/pykde/extra/kde331/ktoolbarbutton.h
deleted file mode 100644
index f6b899fb..00000000
--- a/python/pykde/extra/kde331/ktoolbarbutton.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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 _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- * @param _instance the instance to use for this button
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.36 2004/03/18 02:50:16 bmeyer Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde331/kurifilter.h b/python/pykde/extra/kde331/kurifilter.h
deleted file mode 100644
index 834bff8a..00000000
--- a/python/pykde/extra/kde331/kurifilter.h
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.41 2003/08/30 08:56:21 raabe Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-#include <kdemacros.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde331/selectdialog.h b/python/pykde/extra/kde331/selectdialog.h
deleted file mode 100644
index 680d48ef..00000000
--- a/python/pykde/extra/kde331/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde332/configwidget.h b/python/pykde/extra/kde332/configwidget.h
deleted file mode 100644
index e289743a..00000000
--- a/python/pykde/extra/kde332/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde332/kaccelaction.h b/python/pykde/extra/kde332/kaccelaction.h
deleted file mode 100644
index 0418297c..00000000
--- a/python/pykde/extra/kde332/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde332/kaccelbase.h b/python/pykde/extra/kde332/kaccelbase.h
deleted file mode 100644
index e2ec66e9..00000000
--- a/python/pykde/extra/kde332/kaccelbase.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver_x11.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- * @version $Id: kaccelbase.h,v 1.26 2003/08/16 19:44:57 coolo Exp $
- */
-
-class KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde332/kicontheme.h b/python/pykde/extra/kde332/kicontheme.h
deleted file mode 100644
index 73167a0f..00000000
--- a/python/pykde/extra/kde332/kicontheme.h
+++ /dev/null
@@ -1,338 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * $Id: kicontheme.h,v 1.31 2004/05/31 17:18:02 montanaro Exp $
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group an an icon.
- */
- enum Group { NoGroup=-1, Desktop=0, FirstGroup=0, Toolbar,
- MainToolbar, Small, Panel, LastGroup, User };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// slightly larger small icons for toolbars, panels, etc
- SizeSmallMedium=22,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64,
- /// enormous (ugh!) sized icons for iconviews
- SizeEnormous=128
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a fileis a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
-// KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde332/kkeyserver_x11.h b/python/pykde/extra/kde332/kkeyserver_x11.h
deleted file mode 100644
index 1271f506..00000000
--- a/python/pykde/extra/kde332/kkeyserver_x11.h
+++ /dev/null
@@ -1,433 +0,0 @@
-#ifndef _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system (X11) specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde332/konsole_part.h b/python/pykde/extra/kde332/konsole_part.h
deleted file mode 100644
index e264732c..00000000
--- a/python/pykde/extra/kde332/konsole_part.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
- void slotSetEncoding();
- void slotFontChanged();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
- KSelectAction* selectSetEncoding;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
- int n_encoding;
-
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};
-
-//////////////////////////////////////////////////////////////////////
-*/
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde332/kpanelmenu.h b/python/pykde/extra/kde332/kpanelmenu.h
deleted file mode 100644
index 4186156b..00000000
--- a/python/pykde/extra/kde332/kpanelmenu.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <kdeprint@swing.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- * @author The kicker maintainer, Michael Goffioul <kdeprint@swing.be>
- */
-class KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @param parent parent object
- * @param name name of the object
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde332/krecentdirs.h b/python/pykde/extra/kde332/krecentdirs.h
deleted file mode 100644
index 61a50706..00000000
--- a/python/pykde/extra/kde332/krecentdirs.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde332/ksharedptr.h b/python/pykde/extra/kde332/ksharedptr.h
deleted file mode 100644
index da710a32..00000000
--- a/python/pykde/extra/kde332/ksharedptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
- */
-class KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers virtually perfectly.
- * So just use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * WARNING: Please note that this class template provides an implicit
- * conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
- *
- * @author Waldo Bastian <bastian@kde.org>
- * @version $Id: ksharedptr.h,v 1.23 2004/02/04 12:16:03 raabe Exp $
- */
-template< class T >
-struct KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde332/ksycocafactory.h b/python/pykde/extra/kde332/ksycocafactory.h
deleted file mode 100644
index 2a114ee0..00000000
--- a/python/pykde/extra/kde332/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde332/ktoolbarbutton.h b/python/pykde/extra/kde332/ktoolbarbutton.h
deleted file mode 100644
index f6b899fb..00000000
--- a/python/pykde/extra/kde332/ktoolbarbutton.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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 _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- * @param _instance the instance to use for this button
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- void clicked(int);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.36 2004/03/18 02:50:16 bmeyer Exp $
-*/
-class KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde332/kurifilter.h b/python/pykde/extra/kde332/kurifilter.h
deleted file mode 100644
index 834bff8a..00000000
--- a/python/pykde/extra/kde332/kurifilter.h
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__ "$Id: kurifilter.h,v 1.41 2003/08/30 08:56:21 raabe Exp $"
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-#include <kdemacros.h>
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde332/selectdialog.h b/python/pykde/extra/kde332/selectdialog.h
deleted file mode 100644
index 680d48ef..00000000
--- a/python/pykde/extra/kde332/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde340/configwidget.h b/python/pykde/extra/kde340/configwidget.h
deleted file mode 100644
index 47917edd..00000000
--- a/python/pykde/extra/kde340/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class KRESOURCES_EXPORT ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde340/kaccelaction.h b/python/pykde/extra/kde340/kaccelaction.h
deleted file mode 100644
index b868ee6f..00000000
--- a/python/pykde/extra/kde340/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KDECORE_EXPORT KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KDECORE_EXPORT KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde340/kaccelbase.h b/python/pykde/extra/kde340/kaccelbase.h
deleted file mode 100644
index 0238c63a..00000000
--- a/python/pykde/extra/kde340/kaccelbase.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- */
-
-class KDECORE_EXPORT KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde340/kicontheme.h b/python/pykde/extra/kde340/kicontheme.h
deleted file mode 100644
index a22019f7..00000000
--- a/python/pykde/extra/kde340/kicontheme.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-#include "kdelibs_export.h"
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group of the icon.
- */
- enum Group {
- /// No group
- NoGroup=-1,
- /// Desktop icons
- Desktop=0,
- /// First group
- FirstGroup=0,
- /// Toolbar icons
- Toolbar,
- /// Main toolbar icons
- MainToolbar,
- /// Small icons
- Small,
- /// Panel (Kicker) icons
- Panel,
- /// Last group
- LastGroup,
- /// User icons
- User
- };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// slightly larger small icons for toolbars, panels, etc
- SizeSmallMedium=22,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64,
- /// enormous sized icons for iconviews
- SizeEnormous=128
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a file is a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
-// KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde340/kkeyserver.h b/python/pykde/extra/kde340/kkeyserver.h
deleted file mode 100644
index ef673ea9..00000000
--- a/python/pykde/extra/kde340/kkeyserver.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_H
-#define _KKEYSERVER_H
-
-//FOR COMPATIBILITY
-#include "kkeyserver_x11.h"
-
-#endif // !_KKEYSERVER_H
diff --git a/python/pykde/extra/kde340/kkeyserver_x11.h b/python/pykde/extra/kde340/kkeyserver_x11.h
deleted file mode 100644
index 47d3bbaa..00000000
--- a/python/pykde/extra/kde340/kkeyserver_x11.h
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct KDECORE_EXPORT Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct KDECORE_EXPORT Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct KDECORE_EXPORT Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- KDECORE_EXPORT bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- KDECORE_EXPORT uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- KDECORE_EXPORT bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- KDECORE_EXPORT uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- KDECORE_EXPORT bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- KDECORE_EXPORT bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- //wrapped for win32
- KDECORE_EXPORT bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the Qt-compatible button state to x11 modifier.
- */
- KDECORE_EXPORT int qtButtonStateToMod( Qt::ButtonState s );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- KDECORE_EXPORT TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- KDECORE_EXPORT TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde340/konsole_part.h b/python/pykde/extra/kde340/konsole_part.h
deleted file mode 100644
index 51c49f5e..00000000
--- a/python/pykde/extra/kde340/konsole_part.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
- void slotSetEncoding();
- void slotFontChanged();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
- KSelectAction* selectSetEncoding;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
- int n_encoding;
-
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde340/kpanelmenu.h b/python/pykde/extra/kde340/kpanelmenu.h
deleted file mode 100644
index de0b065e..00000000
--- a/python/pykde/extra/kde340/kpanelmenu.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <kdeprint@swing.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the %KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @author The kicker maintainers, Michael Goffioul <kdeprint@swing.be>
- */
-class KDEUI_EXPORT KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @param parent parent object
- * @param name name of the object
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde340/krecentdirs.h b/python/pykde/extra/kde340/krecentdirs.h
deleted file mode 100644
index 439fb6fe..00000000
--- a/python/pykde/extra/kde340/krecentdirs.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-#include <kdelibs_export.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KIO_EXPORT KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde340/ksharedptr.h b/python/pykde/extra/kde340/ksharedptr.h
deleted file mode 100644
index ada08413..00000000
--- a/python/pykde/extra/kde340/ksharedptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-#include "kdelibs_export.h"
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-class KDECORE_EXPORT KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers virtually perfectly.
- * So just use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * WARNING: Please note that this class template provides an implicit
- * conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-template< class T >
-class KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde340/ksycocafactory.h b/python/pykde/extra/kde340/ksycocafactory.h
deleted file mode 100644
index 536da286..00000000
--- a/python/pykde/extra/kde340/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KDECORE_EXPORT KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde340/ktoolbarbutton.h b/python/pykde/extra/kde340/ktoolbarbutton.h
deleted file mode 100644
index 297c296b..00000000
--- a/python/pykde/extra/kde340/ktoolbarbutton.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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 _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KDEUI_EXPORT KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- * @param _instance the instance to use for this button
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- /**
- * Emitted when the toolbar button is clicked (with LMB or MMB)
- */
- void clicked(int);
- /**
- * Emitted when the toolbar button is clicked (with any mouse button)
- * @param state makes it possible to find out which button was pressed,
- * and whether any keyboard modifiers were held.
- * @since 3.4
- */
- void buttonClicked(int, Qt::ButtonState state);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- /// @since 3.4
- void mousePressEvent( TQMouseEvent * );
- /// @since 3.4
- void mouseReleaseEvent( TQMouseEvent * );
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.39 2004/12/22 14:08:36 faure Exp $
-*/
-class KDEUI_EXPORT KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde340/kurifilter.h b/python/pykde/extra/kde340/kurifilter.h
deleted file mode 100644
index 61c8aca6..00000000
--- a/python/pykde/extra/kde340/kurifilter.h
+++ /dev/null
@@ -1,647 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-
-#ifdef Q_OS_WIN
-#undef ERROR
-#endif
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KIO_EXPORT KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KIO_EXPORT KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KIO_EXPORT KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KIO_EXPORT KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde340/selectdialog.h b/python/pykde/extra/kde340/selectdialog.h
deleted file mode 100644
index 987dcb68..00000000
--- a/python/pykde/extra/kde340/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class KRESOURCES_EXPORT SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde341/configwidget.h b/python/pykde/extra/kde341/configwidget.h
deleted file mode 100644
index 47917edd..00000000
--- a/python/pykde/extra/kde341/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class KRESOURCES_EXPORT ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde341/kaccelaction.h b/python/pykde/extra/kde341/kaccelaction.h
deleted file mode 100644
index b868ee6f..00000000
--- a/python/pykde/extra/kde341/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KDECORE_EXPORT KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KDECORE_EXPORT KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde341/kaccelbase.h b/python/pykde/extra/kde341/kaccelbase.h
deleted file mode 100644
index 0238c63a..00000000
--- a/python/pykde/extra/kde341/kaccelbase.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- */
-
-class KDECORE_EXPORT KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde341/kicontheme.h b/python/pykde/extra/kde341/kicontheme.h
deleted file mode 100644
index a22019f7..00000000
--- a/python/pykde/extra/kde341/kicontheme.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-#include "kdelibs_export.h"
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group of the icon.
- */
- enum Group {
- /// No group
- NoGroup=-1,
- /// Desktop icons
- Desktop=0,
- /// First group
- FirstGroup=0,
- /// Toolbar icons
- Toolbar,
- /// Main toolbar icons
- MainToolbar,
- /// Small icons
- Small,
- /// Panel (Kicker) icons
- Panel,
- /// Last group
- LastGroup,
- /// User icons
- User
- };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// slightly larger small icons for toolbars, panels, etc
- SizeSmallMedium=22,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64,
- /// enormous sized icons for iconviews
- SizeEnormous=128
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a file is a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
-// KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde341/kkeyserver.h b/python/pykde/extra/kde341/kkeyserver.h
deleted file mode 100644
index ef673ea9..00000000
--- a/python/pykde/extra/kde341/kkeyserver.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_H
-#define _KKEYSERVER_H
-
-//FOR COMPATIBILITY
-#include "kkeyserver_x11.h"
-
-#endif // !_KKEYSERVER_H
diff --git a/python/pykde/extra/kde341/kkeyserver_x11.h b/python/pykde/extra/kde341/kkeyserver_x11.h
deleted file mode 100644
index 47d3bbaa..00000000
--- a/python/pykde/extra/kde341/kkeyserver_x11.h
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct KDECORE_EXPORT Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct KDECORE_EXPORT Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct KDECORE_EXPORT Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- KDECORE_EXPORT bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- KDECORE_EXPORT uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- KDECORE_EXPORT bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXScrollLock();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- KDECORE_EXPORT uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- KDECORE_EXPORT bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- KDECORE_EXPORT bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- //wrapped for win32
- KDECORE_EXPORT bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the Qt-compatible button state to x11 modifier.
- */
- KDECORE_EXPORT int qtButtonStateToMod( Qt::ButtonState s );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- KDECORE_EXPORT TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- KDECORE_EXPORT TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde341/konsole_part.h b/python/pykde/extra/kde341/konsole_part.h
deleted file mode 100644
index 51c49f5e..00000000
--- a/python/pykde/extra/kde341/konsole_part.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
- void slotSetEncoding();
- void slotFontChanged();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
- KSelectAction* selectSetEncoding;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
- int n_encoding;
-
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde341/kpanelmenu.h b/python/pykde/extra/kde341/kpanelmenu.h
deleted file mode 100644
index de0b065e..00000000
--- a/python/pykde/extra/kde341/kpanelmenu.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <kdeprint@swing.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the %KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @author The kicker maintainers, Michael Goffioul <kdeprint@swing.be>
- */
-class KDEUI_EXPORT KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @param parent parent object
- * @param name name of the object
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde341/krecentdirs.h b/python/pykde/extra/kde341/krecentdirs.h
deleted file mode 100644
index 439fb6fe..00000000
--- a/python/pykde/extra/kde341/krecentdirs.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-#include <kdelibs_export.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KIO_EXPORT KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde341/ksharedptr.h b/python/pykde/extra/kde341/ksharedptr.h
deleted file mode 100644
index ada08413..00000000
--- a/python/pykde/extra/kde341/ksharedptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-#include "kdelibs_export.h"
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-class KDECORE_EXPORT KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers virtually perfectly.
- * So just use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * WARNING: Please note that this class template provides an implicit
- * conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-template< class T >
-class KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde341/ksycocafactory.h b/python/pykde/extra/kde341/ksycocafactory.h
deleted file mode 100644
index 536da286..00000000
--- a/python/pykde/extra/kde341/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KDECORE_EXPORT KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde341/ktoolbarbutton.h b/python/pykde/extra/kde341/ktoolbarbutton.h
deleted file mode 100644
index 297c296b..00000000
--- a/python/pykde/extra/kde341/ktoolbarbutton.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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 _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KDEUI_EXPORT KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- * @param _instance the instance to use for this button
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- /**
- * Emitted when the toolbar button is clicked (with LMB or MMB)
- */
- void clicked(int);
- /**
- * Emitted when the toolbar button is clicked (with any mouse button)
- * @param state makes it possible to find out which button was pressed,
- * and whether any keyboard modifiers were held.
- * @since 3.4
- */
- void buttonClicked(int, Qt::ButtonState state);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- /// @since 3.4
- void mousePressEvent( TQMouseEvent * );
- /// @since 3.4
- void mouseReleaseEvent( TQMouseEvent * );
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h,v 1.39 2004/12/22 14:08:36 faure Exp $
-*/
-class KDEUI_EXPORT KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde341/kurifilter.h b/python/pykde/extra/kde341/kurifilter.h
deleted file mode 100644
index 61c8aca6..00000000
--- a/python/pykde/extra/kde341/kurifilter.h
+++ /dev/null
@@ -1,647 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-
-#ifdef Q_OS_WIN
-#undef ERROR
-#endif
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KIO_EXPORT KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KIO_EXPORT KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KIO_EXPORT KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KIO_EXPORT KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde341/selectdialog.h b/python/pykde/extra/kde341/selectdialog.h
deleted file mode 100644
index 987dcb68..00000000
--- a/python/pykde/extra/kde341/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class KRESOURCES_EXPORT SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde342/configwidget.h b/python/pykde/extra/kde342/configwidget.h
deleted file mode 100644
index 47917edd..00000000
--- a/python/pykde/extra/kde342/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class KRESOURCES_EXPORT ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde342/kaccelaction.h b/python/pykde/extra/kde342/kaccelaction.h
deleted file mode 100644
index b868ee6f..00000000
--- a/python/pykde/extra/kde342/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KDECORE_EXPORT KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KDECORE_EXPORT KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde342/kaccelbase.h b/python/pykde/extra/kde342/kaccelbase.h
deleted file mode 100644
index 0238c63a..00000000
--- a/python/pykde/extra/kde342/kaccelbase.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- */
-
-class KDECORE_EXPORT KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde342/kicontheme.h b/python/pykde/extra/kde342/kicontheme.h
deleted file mode 100644
index fe0d9d6a..00000000
--- a/python/pykde/extra/kde342/kicontheme.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-#include "kdelibs_export.h"
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group of the icon.
- */
- enum Group {
- /// No group
- NoGroup=-1,
- /// Desktop icons
- Desktop=0,
- /// First group
- FirstGroup=0,
- /// Toolbar icons
- Toolbar,
- /// Main toolbar icons
- MainToolbar,
- /// Small icons
- Small,
- /// Panel (Kicker) icons
- Panel,
- /// Last group
- LastGroup,
- /// User icons
- User
- };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// slightly larger small icons for toolbars, panels, etc
- SizeSmallMedium=22,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64,
- /// enormous sized icons for iconviews
- SizeEnormous=128
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a file is a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
-// KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde342/kkeyserver.h b/python/pykde/extra/kde342/kkeyserver.h
deleted file mode 100644
index ef673ea9..00000000
--- a/python/pykde/extra/kde342/kkeyserver.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_H
-#define _KKEYSERVER_H
-
-//FOR COMPATIBILITY
-#include "kkeyserver_x11.h"
-
-#endif // !_KKEYSERVER_H
diff --git a/python/pykde/extra/kde342/kkeyserver_x11.h b/python/pykde/extra/kde342/kkeyserver_x11.h
deleted file mode 100644
index 23ee47dc..00000000
--- a/python/pykde/extra/kde342/kkeyserver_x11.h
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct KDECORE_EXPORT Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct KDECORE_EXPORT Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct KDECORE_EXPORT Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- KDECORE_EXPORT bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- KDECORE_EXPORT uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- KDECORE_EXPORT bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXScrollLock();
-
- /**
- * Returns the X11 Mode_switch modifier mask/flag.
- * @return the X11 Mode_switch modifier mask/flag.
- * @see accelModMaskX()
- * @since 3.5
- */
- KDECORE_EXPORT uint modXModeSwitch();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- KDECORE_EXPORT uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- KDECORE_EXPORT bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- KDECORE_EXPORT bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- //wrapped for win32
- KDECORE_EXPORT bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the Qt-compatible button state to x11 modifier.
- */
- KDECORE_EXPORT int qtButtonStateToMod( Qt::ButtonState s );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- KDECORE_EXPORT TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- KDECORE_EXPORT TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde342/konsole_part.h b/python/pykde/extra/kde342/konsole_part.h
deleted file mode 100644
index 51c49f5e..00000000
--- a/python/pykde/extra/kde342/konsole_part.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
- void slotSetEncoding();
- void slotFontChanged();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
- KSelectAction* selectSetEncoding;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
- int n_encoding;
-
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde342/kpanelmenu.h b/python/pykde/extra/kde342/kpanelmenu.h
deleted file mode 100644
index de0b065e..00000000
--- a/python/pykde/extra/kde342/kpanelmenu.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <kdeprint@swing.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the %KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @author The kicker maintainers, Michael Goffioul <kdeprint@swing.be>
- */
-class KDEUI_EXPORT KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @param parent parent object
- * @param name name of the object
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde342/krecentdirs.h b/python/pykde/extra/kde342/krecentdirs.h
deleted file mode 100644
index 439fb6fe..00000000
--- a/python/pykde/extra/kde342/krecentdirs.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-#include <kdelibs_export.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KIO_EXPORT KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde342/ksharedptr.h b/python/pykde/extra/kde342/ksharedptr.h
deleted file mode 100644
index ada08413..00000000
--- a/python/pykde/extra/kde342/ksharedptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-#include "kdelibs_export.h"
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-class KDECORE_EXPORT KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers virtually perfectly.
- * So just use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * WARNING: Please note that this class template provides an implicit
- * conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-template< class T >
-class KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde342/ksycocafactory.h b/python/pykde/extra/kde342/ksycocafactory.h
deleted file mode 100644
index 536da286..00000000
--- a/python/pykde/extra/kde342/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KDECORE_EXPORT KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde342/ktoolbarbutton.h b/python/pykde/extra/kde342/ktoolbarbutton.h
deleted file mode 100644
index 743c8bc8..00000000
--- a/python/pykde/extra/kde342/ktoolbarbutton.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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 _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KDEUI_EXPORT KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- * @param _instance the instance to use for this button
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- /**
- * Emitted when the toolbar button is clicked (with LMB or MMB)
- */
- void clicked(int);
- /**
- * Emitted when the toolbar button is clicked (with any mouse button)
- * @param state makes it possible to find out which button was pressed,
- * and whether any keyboard modifiers were held.
- * @since 3.4
- */
- void buttonClicked(int, Qt::ButtonState state);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- /// @since 3.4
- void mousePressEvent( TQMouseEvent * );
- /// @since 3.4
- void mouseReleaseEvent( TQMouseEvent * );
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h 372745 2004-12-22 14:08:36Z dfaure $
-*/
-class KDEUI_EXPORT KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde342/kurifilter.h b/python/pykde/extra/kde342/kurifilter.h
deleted file mode 100644
index 61c8aca6..00000000
--- a/python/pykde/extra/kde342/kurifilter.h
+++ /dev/null
@@ -1,647 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-
-#ifdef Q_OS_WIN
-#undef ERROR
-#endif
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KIO_EXPORT KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KIO_EXPORT KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KIO_EXPORT KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KIO_EXPORT KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde342/selectdialog.h b/python/pykde/extra/kde342/selectdialog.h
deleted file mode 100644
index 987dcb68..00000000
--- a/python/pykde/extra/kde342/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class KRESOURCES_EXPORT SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde343/configwidget.h b/python/pykde/extra/kde343/configwidget.h
deleted file mode 100644
index 47917edd..00000000
--- a/python/pykde/extra/kde343/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class KRESOURCES_EXPORT ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde343/kaccelaction.h b/python/pykde/extra/kde343/kaccelaction.h
deleted file mode 100644
index b868ee6f..00000000
--- a/python/pykde/extra/kde343/kaccelaction.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KDECORE_EXPORT KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param configurable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName,
- m_sLabel,
- m_sWhatsThis;
- KShortcut m_cut;
- KShortcut m_cutDefault3, m_cutDefault4;
- const TQObject* m_pObjSlot;
- const char* m_psMethodSlot;
- bool m_bConfigurable,
- m_bEnabled;
- int m_nIDAccel;
- uint m_nConnections;
-
- void incConnections();
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KDECORE_EXPORT KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param aAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- KAccelBase* m_pKAccelBase;
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated, m_nSize;
-
- void resize( uint );
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde343/kaccelbase.h b/python/pykde/extra/kde343/kaccelbase.h
deleted file mode 100644
index 0238c63a..00000000
--- a/python/pykde/extra/kde343/kaccelbase.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- */
-
-class KDECORE_EXPORT KAccelBase
-{
- public:
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
- enum Signal { KEYCODE_CHANGED };
-
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- uint actionCount() const;
- KAccelActions& actions();
- bool isEnabled() const;
-
- KAccelAction* actionPtr( const TQString& sAction );
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- KAccelAction* actionPtr( const KKey& key );
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- const TQString& configGroup() const { return m_sConfigGroup; }
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- bool getAutoUpdate() { return m_bAutoUpdate; }
- // return value of AutoUpdate flag before this call.
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde343/kicontheme.h b/python/pykde/extra/kde343/kicontheme.h
deleted file mode 100644
index fe0d9d6a..00000000
--- a/python/pykde/extra/kde343/kicontheme.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-#include "kdelibs_export.h"
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group of the icon.
- */
- enum Group {
- /// No group
- NoGroup=-1,
- /// Desktop icons
- Desktop=0,
- /// First group
- FirstGroup=0,
- /// Toolbar icons
- Toolbar,
- /// Main toolbar icons
- MainToolbar,
- /// Small icons
- Small,
- /// Panel (Kicker) icons
- Panel,
- /// Last group
- LastGroup,
- /// User icons
- User
- };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// slightly larger small icons for toolbars, panels, etc
- SizeSmallMedium=22,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64,
- /// enormous sized icons for iconviews
- SizeEnormous=128
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a file is a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
-// KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde343/kkeyserver.h b/python/pykde/extra/kde343/kkeyserver.h
deleted file mode 100644
index ef673ea9..00000000
--- a/python/pykde/extra/kde343/kkeyserver.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_H
-#define _KKEYSERVER_H
-
-//FOR COMPATIBILITY
-#include "kkeyserver_x11.h"
-
-#endif // !_KKEYSERVER_H
diff --git a/python/pykde/extra/kde343/kkeyserver_x11.h b/python/pykde/extra/kde343/kkeyserver_x11.h
deleted file mode 100644
index 23ee47dc..00000000
--- a/python/pykde/extra/kde343/kkeyserver_x11.h
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct KDECORE_EXPORT Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct KDECORE_EXPORT Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct KDECORE_EXPORT Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- KDECORE_EXPORT bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- KDECORE_EXPORT uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- KDECORE_EXPORT bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXScrollLock();
-
- /**
- * Returns the X11 Mode_switch modifier mask/flag.
- * @return the X11 Mode_switch modifier mask/flag.
- * @see accelModMaskX()
- * @since 3.5
- */
- KDECORE_EXPORT uint modXModeSwitch();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- KDECORE_EXPORT uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- KDECORE_EXPORT bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- KDECORE_EXPORT bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- //wrapped for win32
- KDECORE_EXPORT bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the Qt-compatible button state to x11 modifier.
- */
- KDECORE_EXPORT int qtButtonStateToMod( Qt::ButtonState s );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- KDECORE_EXPORT TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- KDECORE_EXPORT TQString modToStringUser( uint mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde343/konsole_part.h b/python/pykde/extra/kde343/konsole_part.h
deleted file mode 100644
index 51c49f5e..00000000
--- a/python/pykde/extra/kde343/konsole_part.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 __KONSOLE_PART_H__
-#define __KONSOLE_PART_H__
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited();
- void receivedData( const TQString& s );
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
- void slotProcessExited();
- void slotReceivedData( const TQString& s );
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
- void updateTitle();
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int,int);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotWordSeps();
- void fontNotFound();
- void slotSetEncoding();
- void slotFontChanged();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
- void setFont(int fontno);
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
-// ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
-
- KSelectAction* selectBell;
- KSelectAction* selectFont;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
- KSelectAction* selectSetEncoding;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
- TQString fontNotFound_par;
-
- bool b_framevis:1;
- bool b_histEnabled:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_font;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
- int n_encoding;
-
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde343/kpanelmenu.h b/python/pykde/extra/kde343/kpanelmenu.h
deleted file mode 100644
index de0b065e..00000000
--- a/python/pykde/extra/kde343/kpanelmenu.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <kdeprint@swing.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the %KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @author The kicker maintainers, Michael Goffioul <kdeprint@swing.be>
- */
-class KDEUI_EXPORT KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @param parent parent object
- * @param name name of the object
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde343/krecentdirs.h b/python/pykde/extra/kde343/krecentdirs.h
deleted file mode 100644
index 439fb6fe..00000000
--- a/python/pykde/extra/kde343/krecentdirs.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-#include <kdelibs_export.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KIO_EXPORT KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde343/ksharedptr.h b/python/pykde/extra/kde343/ksharedptr.h
deleted file mode 100644
index ada08413..00000000
--- a/python/pykde/extra/kde343/ksharedptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-#include "kdelibs_export.h"
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-class KDECORE_EXPORT KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers virtually perfectly.
- * So just use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * WARNING: Please note that this class template provides an implicit
- * conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-template< class T >
-class KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde343/ksycocafactory.h b/python/pykde/extra/kde343/ksycocafactory.h
deleted file mode 100644
index 536da286..00000000
--- a/python/pykde/extra/kde343/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KDECORE_EXPORT KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde343/ktoolbarbutton.h b/python/pykde/extra/kde343/ktoolbarbutton.h
deleted file mode 100644
index 743c8bc8..00000000
--- a/python/pykde/extra/kde343/ktoolbarbutton.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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 _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KDEUI_EXPORT KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- * @param _instance the instance to use for this button
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- /**
- * Emitted when the toolbar button is clicked (with LMB or MMB)
- */
- void clicked(int);
- /**
- * Emitted when the toolbar button is clicked (with any mouse button)
- * @param state makes it possible to find out which button was pressed,
- * and whether any keyboard modifiers were held.
- * @since 3.4
- */
- void buttonClicked(int, Qt::ButtonState state);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- /// @since 3.4
- void mousePressEvent( TQMouseEvent * );
- /// @since 3.4
- void mouseReleaseEvent( TQMouseEvent * );
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h 372745 2004-12-22 14:08:36Z dfaure $
-*/
-class KDEUI_EXPORT KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde343/kurifilter.h b/python/pykde/extra/kde343/kurifilter.h
deleted file mode 100644
index 61c8aca6..00000000
--- a/python/pykde/extra/kde343/kurifilter.h
+++ /dev/null
@@ -1,647 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-
-#ifdef Q_OS_WIN
-#undef ERROR
-#endif
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KIO_EXPORT KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KIO_EXPORT KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KIO_EXPORT KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KIO_EXPORT KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *m_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde343/selectdialog.h b/python/pykde/extra/kde343/selectdialog.h
deleted file mode 100644
index 987dcb68..00000000
--- a/python/pykde/extra/kde343/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class KRESOURCES_EXPORT SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde350/configwidget.h b/python/pykde/extra/kde350/configwidget.h
deleted file mode 100644
index 47917edd..00000000
--- a/python/pykde/extra/kde350/configwidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- This file is part of libkresources.
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.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 KRESOURCES_CONFIGWIDGET_H
-#define KRESOURCES_CONFIGWIDGET_H
-
-#include "resource.h"
-
-#include <kconfig.h>
-
-#include <tqwidget.h>
-
-namespace KRES {
-
-class KRESOURCES_EXPORT ConfigWidget : public QWidget
-{
- Q_OBJECT
- public:
- ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
-
- /**
- Sets the widget to 'edit' mode. Reimplement this method if you are
- interested in the mode change (to disable some GUI element for
- example). By default the widget is in 'create new' mode.
- */
- virtual void setInEditMode( bool value );
-
- public slots:
- virtual void loadSettings( Resource *resource ) = 0;
- virtual void saveSettings( Resource *resource ) = 0;
-
- signals:
- void setReadOnly( bool value );
-
- protected:
- Resource *mResource;
-};
-
-}
-#endif
diff --git a/python/pykde/extra/kde350/kaccelaction.h b/python/pykde/extra/kde350/kaccelaction.h
deleted file mode 100644
index d55e4517..00000000
--- a/python/pykde/extra/kde350/kaccelaction.h
+++ /dev/null
@@ -1,576 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KDECORE_EXPORT KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param enable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName /**< Name of accel. @sa setName() */,
- m_sLabel /**< Label of accel. User-visible. */,
- m_sWhatsThis /**< WhatsThis help for accel. User-visible. */;
- KShortcut m_cut /**< Shortcut actually assigned. */;
- KShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */,
- m_cutDefault4 /**< Default shortcur in 4-modifier layout */;
- const TQObject* m_pObjSlot /**< Object we will send signals to. */;
- const char* m_psMethodSlot /**< Slot we send signals to, in m_pObjSlot */;
- bool m_bConfigurable /**< Can this accel be configured by the user? */,
- m_bEnabled /**< Is this accel enabled? */;
- int m_nIDAccel /**< Id of this accel, from the list of IDs */;
- uint m_nConnections /**< Number of connections to this accel. */ ;
-
- /** @internal Increment the number of connections to this accel. */
- void incConnections();
- /** @internal Decrement the number of connections to this accel (bouded by zero). */
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KDECORE_EXPORT KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param sAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param sAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sAction the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param rgCutDefaults3 the default shortcut for 3 modifier systems
- * @param rgCutDefaults4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled if true the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- /** Base object that proxies signals from us. */
- KAccelBase* m_pKAccelBase;
- /** Array of actions we're hanging on to. */
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated /**< Allocated size of the array. */,
- m_nSize /**< Amount in use. */ ;
-
- /**
- * Resize the list to the given number @p new_size of entries.
- * @todo Can you make it smaller?
- * @todo Implementation seems to break m_nSize.
- */
- void resize( uint new_size );
- /** Add a action to this collection. @todo Document ownership. */
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde350/kaccelbase.h b/python/pykde/extra/kde350/kaccelbase.h
deleted file mode 100644
index babf304b..00000000
--- a/python/pykde/extra/kde350/kaccelbase.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- */
-
-class KDECORE_EXPORT KAccelBase
-{
- public:
- /** Initialization mode of the KAccelBase, used in constructor. */
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
-
- /** Enum for kinds of signals which may be emitted. */
- enum Signal { KEYCODE_CHANGED };
-
- /** Constructor. @p fInitCode should be a bitwise OR of
- * values from the Init enum.
- */
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- /** Returns number of actions in this handler. */
- uint actionCount() const;
- /** Returns a list of all the actions in this handler. */
- KAccelActions& actions();
- /** Returns whether this accelerator handler is enabled or not. */
- bool isEnabled() const;
-
- /** Returns a pointer to the KAccelAction named @p sAction. */
- KAccelAction* actionPtr( const TQString& sAction );
- /** Const version of the above. */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- /** Returns a pointer to the KAccelAction associated with
- * the key @p key. This function takes into account the
- * key mapping defined in the constructor.
- *
- * May return 0 if no (or more than one)
- * action is associated with the key.
- */
- KAccelAction* actionPtr( const KKey& key );
- /** Basically the same as above, except a KKeyServer::Key
- * already has a key mapping defined (either NATIVE_KEYS or not).
- */
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- /** Returns the name of the configuration group these
- * accelerators are stored in. The default is "Shortcuts".
- */
- const TQString& configGroup() const { return m_sConfigGroup; }
- /** Set the group (in the configuration file) for storing
- * accelerators.
- */
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- /** Returns whether autoupdate is enabled for these accelerators. */
- bool getAutoUpdate() { return m_bAutoUpdate; }
- /** Enables (or disables) autoupdate for these accelerators.
- * @return the value of autoupdate before the call.
- */
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- virtual bool isEnabledInternal() const;
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde350/kicontheme.h b/python/pykde/extra/kde350/kicontheme.h
deleted file mode 100644
index 9c08f9c6..00000000
--- a/python/pykde/extra/kde350/kicontheme.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-#include "kdelibs_export.h"
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group of the icon.
- */
- enum Group {
- /// No group
- NoGroup=-1,
- /// Desktop icons
- Desktop=0,
- /// First group
- FirstGroup=0,
- /// Toolbar icons
- Toolbar,
- /// Main toolbar icons
- MainToolbar,
- /// Small icons
- Small,
- /// Panel (Kicker) icons
- Panel,
- /// Last group
- LastGroup,
- /// User icons
- User
- };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// slightly larger small icons for toolbars, panels, etc
- SizeSmallMedium=22,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64,
- /// enormous sized icons for iconviews
- SizeEnormous=128
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a file is a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde350/kkeyserver.h b/python/pykde/extra/kde350/kkeyserver.h
deleted file mode 100644
index ef673ea9..00000000
--- a/python/pykde/extra/kde350/kkeyserver.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_H
-#define _KKEYSERVER_H
-
-//FOR COMPATIBILITY
-#include "kkeyserver_x11.h"
-
-#endif // !_KKEYSERVER_H
diff --git a/python/pykde/extra/kde350/kkeyserver_x11.h b/python/pykde/extra/kde350/kkeyserver_x11.h
deleted file mode 100644
index dbca533e..00000000
--- a/python/pykde/extra/kde350/kkeyserver_x11.h
+++ /dev/null
@@ -1,477 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct KDECORE_EXPORT Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct KDECORE_EXPORT Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct KDECORE_EXPORT Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- KDECORE_EXPORT bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- KDECORE_EXPORT uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- KDECORE_EXPORT bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXScrollLock();
-
- /**
- * Returns the X11 Mode_switch modifier mask/flag.
- * @return the X11 Mode_switch modifier mask/flag.
- * @see accelModMaskX()
- * @since 3.5
- */
- KDECORE_EXPORT uint modXModeSwitch();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- KDECORE_EXPORT uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- KDECORE_EXPORT bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- KDECORE_EXPORT bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- //wrapped for win32
- KDECORE_EXPORT bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the Qt-compatible button state to x11 modifier.
- */
- KDECORE_EXPORT int qtButtonStateToMod( Qt::ButtonState s );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- KDECORE_EXPORT TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- KDECORE_EXPORT TQString modToStringUser( uint mod );
-
- /**
- * Converts the modifier given as user-readable string
- * to KKey::ModFlag modifier, or 0.
- * @internal
- * @since 3.5
- */
- KDECORE_EXPORT uint stringUserToMod( const TQString& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde350/konsole_part.h b/python/pykde/extra/kde350/konsole_part.h
deleted file mode 100644
index d526c1a6..00000000
--- a/python/pykde/extra/kde350/konsole_part.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/* -*- C++ -*-
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 KONSOLE_PART_H
-#define KONSOLE_PART_H
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class KActionMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface, public ExtTerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited( KProcess * );
- void receivedData( const TQString& s );
- void forkedChild();
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
-// void updateTitle(TESession*);
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
- void applyProperties();
- void setSettingsMenuEnabled( bool );
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int /*columns*/, int /*lines*/);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotUseKonsoleSettings();
- void slotWordSeps();
- void slotSetEncoding();
- void biggerFont();
- void smallerFont();
-
- void autoShowShell();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
- // ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KActionCollection* actions;
- KActionCollection* settingsActions;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
- KToggleAction* m_useKonsoleSettings;
-
- KSelectAction* selectBell;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
- KSelectAction* selectSetEncoding;
-
- KActionMenu* m_fontsizes;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
-
- bool b_framevis:1;
- bool b_histEnabled:1;
- bool b_useKonsoleSettings:1;
- bool b_autoDestroy:1;
- bool b_autoStartShell:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
- int n_encoding;
-
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void newSession();
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
- void setAutoDestroy( bool );
- void setAutoStartShell( bool );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde350/kpanelmenu.h b/python/pykde/extra/kde350/kpanelmenu.h
deleted file mode 100644
index de0b065e..00000000
--- a/python/pykde/extra/kde350/kpanelmenu.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <kdeprint@swing.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the %KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @author The kicker maintainers, Michael Goffioul <kdeprint@swing.be>
- */
-class KDEUI_EXPORT KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @param parent parent object
- * @param name name of the object
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde350/krecentdirs.h b/python/pykde/extra/kde350/krecentdirs.h
deleted file mode 100644
index 439fb6fe..00000000
--- a/python/pykde/extra/kde350/krecentdirs.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- c++ -*-
- * Copyright (C)2000 Waldo Bastian <bastian@kde.org>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifndef __KRECENTDIRS_H
-#define __KRECENTDIRS_H
-
-#include <tqstringlist.h>
-
-#include <kdelibs_export.h>
-
-/**
- * The goal of this class is to make sure that, when the user needs to
- * specify a file via the file selection dialog, this dialog will start
- * in the directory most likely to contain the desired files.
- *
- * This works as follows: Each time the file selection dialog is
- * shown, the programmer can specify a "file-class". The file-dialog will
- * then start with the directory associated with this file-class. When
- * the dialog closes, the directory currently shown in the file-dialog
- * will be associated with the file-class.
- *
- * A file-class can either start with ':' or with '::'. If it starts with
- * a single ':' the file-class is specific to the current application.
- * If the file-class starts with '::' it is global to all applications.
- */
-class KIO_EXPORT KRecentDirs
-{
-public:
- /**
- * Returns a list of directories associated with this file-class.
- * The most recently used directory is at the front of the list.
- */
- static TQStringList list(const TQString &fileClass);
-
- /**
- * Returns the most recently used directory accociated with this file-class.
- */
- static TQString dir(const TQString &fileClass);
-
- /**
- * Associates @p directory with @p fileClass
- */
- static void add(const TQString &fileClass, const TQString &directory);
-};
-
-#endif
diff --git a/python/pykde/extra/kde350/ksharedptr.h b/python/pykde/extra/kde350/ksharedptr.h
deleted file mode 100644
index ada08413..00000000
--- a/python/pykde/extra/kde350/ksharedptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-#include "kdelibs_export.h"
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-class KDECORE_EXPORT KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers virtually perfectly.
- * So just use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * WARNING: Please note that this class template provides an implicit
- * conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-template< class T >
-class KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde350/ksycocafactory.h b/python/pykde/extra/kde350/ksycocafactory.h
deleted file mode 100644
index 536da286..00000000
--- a/python/pykde/extra/kde350/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KDECORE_EXPORT KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde350/ktoolbarbutton.h b/python/pykde/extra/kde350/ktoolbarbutton.h
deleted file mode 100644
index eab46983..00000000
--- a/python/pykde/extra/kde350/ktoolbarbutton.h
+++ /dev/null
@@ -1,330 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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 _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KDEUI_EXPORT KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- * @param _instance the instance to use for this button
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- /**
- * Emitted when the toolbar button is clicked (with LMB or MMB)
- */
- void clicked(int);
- /**
- * Emitted when the toolbar button is clicked (with any mouse button)
- * @param state makes it possible to find out which button was pressed,
- * and whether any keyboard modifiers were held.
- * @since 3.4
- */
- void buttonClicked(int, Qt::ButtonState state);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- bool event(TQEvent *e);
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- /// @since 3.4
- void mousePressEvent( TQMouseEvent * );
- /// @since 3.4
- void mouseReleaseEvent( TQMouseEvent * );
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h 465272 2005-09-29 09:47:40Z mueller $
-*/
-class KDEUI_EXPORT KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde350/kurifilter.h b/python/pykde/extra/kde350/kurifilter.h
deleted file mode 100644
index 47332947..00000000
--- a/python/pykde/extra/kde350/kurifilter.h
+++ /dev/null
@@ -1,647 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-
-#ifdef Q_OS_WIN
-#undef ERROR
-#endif
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KIO_EXPORT KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KIO_EXPORT KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KIO_EXPORT KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KIO_EXPORT KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *s_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde350/selectdialog.h b/python/pykde/extra/kde350/selectdialog.h
deleted file mode 100644
index 987dcb68..00000000
--- a/python/pykde/extra/kde350/selectdialog.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of libkresources.
-
- Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
- Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
- Copyright (c) 2003 Cornelius Schumacher <schumacher@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 KRESOURCES_SELECTDIALOG_H
-#define KRESOURCES_SELECTDIALOG_H
-
-#include <tqobject.h>
-#include <tqptrlist.h>
-#include <tqmap.h>
-
-#include <kdialog.h>
-
-class KListBox;
-
-namespace KRES {
-
-class Resource;
-
-/**
- * Dialog for selecting a resource.
- *
- * Example:
- *
- * \code
- *
- * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
- *
- * KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
- * if ( !res ) {
- * // no resource selected
- * } else {
- * // do something with resource
- * }
- * \endcode
- */
-class KRESOURCES_EXPORT SelectDialog
-{
- public:
- /**
- * Constructor.
- * @param list The list of available resources
- * @param parent The parent widget
- * @param name The name of the dialog
- */
- SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
- const char *name = 0);
-
- /**
- * Returns selected resource.
- */
- Resource *resource();
-
- /**
- * Opens a dialog showing the available resources and returns the resource the
- * user has selected. Returns 0, if the dialog was canceled.
- */
- static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
-
- private:
- KListBox *mResourceId;
-
- TQMap<int, Resource*> mResourceMap;
-};
-
-}
-
-#endif
diff --git a/python/pykde/extra/kde351/kaccelaction.h b/python/pykde/extra/kde351/kaccelaction.h
deleted file mode 100644
index d55e4517..00000000
--- a/python/pykde/extra/kde351/kaccelaction.h
+++ /dev/null
@@ -1,576 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KDECORE_EXPORT KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param enable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName /**< Name of accel. @sa setName() */,
- m_sLabel /**< Label of accel. User-visible. */,
- m_sWhatsThis /**< WhatsThis help for accel. User-visible. */;
- KShortcut m_cut /**< Shortcut actually assigned. */;
- KShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */,
- m_cutDefault4 /**< Default shortcur in 4-modifier layout */;
- const TQObject* m_pObjSlot /**< Object we will send signals to. */;
- const char* m_psMethodSlot /**< Slot we send signals to, in m_pObjSlot */;
- bool m_bConfigurable /**< Can this accel be configured by the user? */,
- m_bEnabled /**< Is this accel enabled? */;
- int m_nIDAccel /**< Id of this accel, from the list of IDs */;
- uint m_nConnections /**< Number of connections to this accel. */ ;
-
- /** @internal Increment the number of connections to this accel. */
- void incConnections();
- /** @internal Decrement the number of connections to this accel (bouded by zero). */
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KDECORE_EXPORT KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param sAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param sAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sAction the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param rgCutDefaults3 the default shortcut for 3 modifier systems
- * @param rgCutDefaults4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled if true the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- /** Base object that proxies signals from us. */
- KAccelBase* m_pKAccelBase;
- /** Array of actions we're hanging on to. */
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated /**< Allocated size of the array. */,
- m_nSize /**< Amount in use. */ ;
-
- /**
- * Resize the list to the given number @p new_size of entries.
- * @todo Can you make it smaller?
- * @todo Implementation seems to break m_nSize.
- */
- void resize( uint new_size );
- /** Add a action to this collection. @todo Document ownership. */
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde351/kaccelbase.h b/python/pykde/extra/kde351/kaccelbase.h
deleted file mode 100644
index babf304b..00000000
--- a/python/pykde/extra/kde351/kaccelbase.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- */
-
-class KDECORE_EXPORT KAccelBase
-{
- public:
- /** Initialization mode of the KAccelBase, used in constructor. */
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
-
- /** Enum for kinds of signals which may be emitted. */
- enum Signal { KEYCODE_CHANGED };
-
- /** Constructor. @p fInitCode should be a bitwise OR of
- * values from the Init enum.
- */
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- /** Returns number of actions in this handler. */
- uint actionCount() const;
- /** Returns a list of all the actions in this handler. */
- KAccelActions& actions();
- /** Returns whether this accelerator handler is enabled or not. */
- bool isEnabled() const;
-
- /** Returns a pointer to the KAccelAction named @p sAction. */
- KAccelAction* actionPtr( const TQString& sAction );
- /** Const version of the above. */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- /** Returns a pointer to the KAccelAction associated with
- * the key @p key. This function takes into account the
- * key mapping defined in the constructor.
- *
- * May return 0 if no (or more than one)
- * action is associated with the key.
- */
- KAccelAction* actionPtr( const KKey& key );
- /** Basically the same as above, except a KKeyServer::Key
- * already has a key mapping defined (either NATIVE_KEYS or not).
- */
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- /** Returns the name of the configuration group these
- * accelerators are stored in. The default is "Shortcuts".
- */
- const TQString& configGroup() const { return m_sConfigGroup; }
- /** Set the group (in the configuration file) for storing
- * accelerators.
- */
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- /** Returns whether autoupdate is enabled for these accelerators. */
- bool getAutoUpdate() { return m_bAutoUpdate; }
- /** Enables (or disables) autoupdate for these accelerators.
- * @return the value of autoupdate before the call.
- */
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- virtual bool isEnabledInternal() const;
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde351/kicontheme.h b/python/pykde/extra/kde351/kicontheme.h
deleted file mode 100644
index 4befb226..00000000
--- a/python/pykde/extra/kde351/kicontheme.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-#include "kdelibs_export.h"
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group of the icon.
- */
- enum Group {
- /// No group
- NoGroup=-1,
- /// Desktop icons
- Desktop=0,
- /// First group
- FirstGroup=0,
- /// Toolbar icons
- Toolbar,
- /// Main toolbar icons
- MainToolbar,
- /// Small icons
- Small,
- /// Panel (Kicker) icons
- Panel,
- /// Last group
- LastGroup,
- /// User icons
- User
- };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// slightly larger small icons for toolbars, panels, etc
- SizeSmallMedium=22,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64,
- /// enormous sized icons for iconviews
- SizeEnormous=128
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a file is a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde351/kkeyserver.h b/python/pykde/extra/kde351/kkeyserver.h
deleted file mode 100644
index ef673ea9..00000000
--- a/python/pykde/extra/kde351/kkeyserver.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_H
-#define _KKEYSERVER_H
-
-//FOR COMPATIBILITY
-#include "kkeyserver_x11.h"
-
-#endif // !_KKEYSERVER_H
diff --git a/python/pykde/extra/kde351/kkeyserver_x11.h b/python/pykde/extra/kde351/kkeyserver_x11.h
deleted file mode 100644
index dbca533e..00000000
--- a/python/pykde/extra/kde351/kkeyserver_x11.h
+++ /dev/null
@@ -1,477 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct KDECORE_EXPORT Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct KDECORE_EXPORT Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct KDECORE_EXPORT Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- KDECORE_EXPORT bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- KDECORE_EXPORT uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- KDECORE_EXPORT bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXScrollLock();
-
- /**
- * Returns the X11 Mode_switch modifier mask/flag.
- * @return the X11 Mode_switch modifier mask/flag.
- * @see accelModMaskX()
- * @since 3.5
- */
- KDECORE_EXPORT uint modXModeSwitch();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- KDECORE_EXPORT uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- KDECORE_EXPORT bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- KDECORE_EXPORT bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- //wrapped for win32
- KDECORE_EXPORT bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the Qt-compatible button state to x11 modifier.
- */
- KDECORE_EXPORT int qtButtonStateToMod( Qt::ButtonState s );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- KDECORE_EXPORT TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- KDECORE_EXPORT TQString modToStringUser( uint mod );
-
- /**
- * Converts the modifier given as user-readable string
- * to KKey::ModFlag modifier, or 0.
- * @internal
- * @since 3.5
- */
- KDECORE_EXPORT uint stringUserToMod( const TQString& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde351/konsole_part.h b/python/pykde/extra/kde351/konsole_part.h
deleted file mode 100644
index d526c1a6..00000000
--- a/python/pykde/extra/kde351/konsole_part.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/* -*- C++ -*-
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 KONSOLE_PART_H
-#define KONSOLE_PART_H
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class KActionMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface, public ExtTerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited( KProcess * );
- void receivedData( const TQString& s );
- void forkedChild();
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
-// void updateTitle(TESession*);
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
- void applyProperties();
- void setSettingsMenuEnabled( bool );
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int /*columns*/, int /*lines*/);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotUseKonsoleSettings();
- void slotWordSeps();
- void slotSetEncoding();
- void biggerFont();
- void smallerFont();
-
- void autoShowShell();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
- // ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KActionCollection* actions;
- KActionCollection* settingsActions;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
- KToggleAction* m_useKonsoleSettings;
-
- KSelectAction* selectBell;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
- KSelectAction* selectSetEncoding;
-
- KActionMenu* m_fontsizes;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
-
- bool b_framevis:1;
- bool b_histEnabled:1;
- bool b_useKonsoleSettings:1;
- bool b_autoDestroy:1;
- bool b_autoStartShell:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
- int n_encoding;
-
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void newSession();
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
- void setAutoDestroy( bool );
- void setAutoStartShell( bool );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde351/kpanelmenu.h b/python/pykde/extra/kde351/kpanelmenu.h
deleted file mode 100644
index de0b065e..00000000
--- a/python/pykde/extra/kde351/kpanelmenu.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <kdeprint@swing.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the %KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @author The kicker maintainers, Michael Goffioul <kdeprint@swing.be>
- */
-class KDEUI_EXPORT KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @param parent parent object
- * @param name name of the object
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde351/ksharedptr.h b/python/pykde/extra/kde351/ksharedptr.h
deleted file mode 100644
index ada08413..00000000
--- a/python/pykde/extra/kde351/ksharedptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-#include "kdelibs_export.h"
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-class KDECORE_EXPORT KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers virtually perfectly.
- * So just use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * WARNING: Please note that this class template provides an implicit
- * conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-template< class T >
-class KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde351/ksycocafactory.h b/python/pykde/extra/kde351/ksycocafactory.h
deleted file mode 100644
index 536da286..00000000
--- a/python/pykde/extra/kde351/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KDECORE_EXPORT KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde351/ktoolbarbutton.h b/python/pykde/extra/kde351/ktoolbarbutton.h
deleted file mode 100644
index eab46983..00000000
--- a/python/pykde/extra/kde351/ktoolbarbutton.h
+++ /dev/null
@@ -1,330 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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 _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KDEUI_EXPORT KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- * @param _instance the instance to use for this button
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- /**
- * Emitted when the toolbar button is clicked (with LMB or MMB)
- */
- void clicked(int);
- /**
- * Emitted when the toolbar button is clicked (with any mouse button)
- * @param state makes it possible to find out which button was pressed,
- * and whether any keyboard modifiers were held.
- * @since 3.4
- */
- void buttonClicked(int, Qt::ButtonState state);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- bool event(TQEvent *e);
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- /// @since 3.4
- void mousePressEvent( TQMouseEvent * );
- /// @since 3.4
- void mouseReleaseEvent( TQMouseEvent * );
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h 465272 2005-09-29 09:47:40Z mueller $
-*/
-class KDEUI_EXPORT KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde351/kurifilter.h b/python/pykde/extra/kde351/kurifilter.h
deleted file mode 100644
index 47332947..00000000
--- a/python/pykde/extra/kde351/kurifilter.h
+++ /dev/null
@@ -1,647 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-
-#ifdef Q_OS_WIN
-#undef ERROR
-#endif
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KIO_EXPORT KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KIO_EXPORT KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KIO_EXPORT KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KIO_EXPORT KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *s_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde352/kaccelaction.h b/python/pykde/extra/kde352/kaccelaction.h
deleted file mode 100644
index d55e4517..00000000
--- a/python/pykde/extra/kde352/kaccelaction.h
+++ /dev/null
@@ -1,576 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KDECORE_EXPORT KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param enable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName /**< Name of accel. @sa setName() */,
- m_sLabel /**< Label of accel. User-visible. */,
- m_sWhatsThis /**< WhatsThis help for accel. User-visible. */;
- KShortcut m_cut /**< Shortcut actually assigned. */;
- KShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */,
- m_cutDefault4 /**< Default shortcur in 4-modifier layout */;
- const TQObject* m_pObjSlot /**< Object we will send signals to. */;
- const char* m_psMethodSlot /**< Slot we send signals to, in m_pObjSlot */;
- bool m_bConfigurable /**< Can this accel be configured by the user? */,
- m_bEnabled /**< Is this accel enabled? */;
- int m_nIDAccel /**< Id of this accel, from the list of IDs */;
- uint m_nConnections /**< Number of connections to this accel. */ ;
-
- /** @internal Increment the number of connections to this accel. */
- void incConnections();
- /** @internal Decrement the number of connections to this accel (bouded by zero). */
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KDECORE_EXPORT KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param sAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param sAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sAction the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param rgCutDefaults3 the default shortcut for 3 modifier systems
- * @param rgCutDefaults4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled if true the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- /** Base object that proxies signals from us. */
- KAccelBase* m_pKAccelBase;
- /** Array of actions we're hanging on to. */
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated /**< Allocated size of the array. */,
- m_nSize /**< Amount in use. */ ;
-
- /**
- * Resize the list to the given number @p new_size of entries.
- * @todo Can you make it smaller?
- * @todo Implementation seems to break m_nSize.
- */
- void resize( uint new_size );
- /** Add a action to this collection. @todo Document ownership. */
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde352/kaccelbase.h b/python/pykde/extra/kde352/kaccelbase.h
deleted file mode 100644
index babf304b..00000000
--- a/python/pykde/extra/kde352/kaccelbase.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- */
-
-class KDECORE_EXPORT KAccelBase
-{
- public:
- /** Initialization mode of the KAccelBase, used in constructor. */
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
-
- /** Enum for kinds of signals which may be emitted. */
- enum Signal { KEYCODE_CHANGED };
-
- /** Constructor. @p fInitCode should be a bitwise OR of
- * values from the Init enum.
- */
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- /** Returns number of actions in this handler. */
- uint actionCount() const;
- /** Returns a list of all the actions in this handler. */
- KAccelActions& actions();
- /** Returns whether this accelerator handler is enabled or not. */
- bool isEnabled() const;
-
- /** Returns a pointer to the KAccelAction named @p sAction. */
- KAccelAction* actionPtr( const TQString& sAction );
- /** Const version of the above. */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- /** Returns a pointer to the KAccelAction associated with
- * the key @p key. This function takes into account the
- * key mapping defined in the constructor.
- *
- * May return 0 if no (or more than one)
- * action is associated with the key.
- */
- KAccelAction* actionPtr( const KKey& key );
- /** Basically the same as above, except a KKeyServer::Key
- * already has a key mapping defined (either NATIVE_KEYS or not).
- */
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- /** Returns the name of the configuration group these
- * accelerators are stored in. The default is "Shortcuts".
- */
- const TQString& configGroup() const { return m_sConfigGroup; }
- /** Set the group (in the configuration file) for storing
- * accelerators.
- */
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- /** Returns whether autoupdate is enabled for these accelerators. */
- bool getAutoUpdate() { return m_bAutoUpdate; }
- /** Enables (or disables) autoupdate for these accelerators.
- * @return the value of autoupdate before the call.
- */
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- virtual bool isEnabledInternal() const;
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde352/kicontheme.h b/python/pykde/extra/kde352/kicontheme.h
deleted file mode 100644
index 4befb226..00000000
--- a/python/pykde/extra/kde352/kicontheme.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-#include "kdelibs_export.h"
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group of the icon.
- */
- enum Group {
- /// No group
- NoGroup=-1,
- /// Desktop icons
- Desktop=0,
- /// First group
- FirstGroup=0,
- /// Toolbar icons
- Toolbar,
- /// Main toolbar icons
- MainToolbar,
- /// Small icons
- Small,
- /// Panel (Kicker) icons
- Panel,
- /// Last group
- LastGroup,
- /// User icons
- User
- };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// slightly larger small icons for toolbars, panels, etc
- SizeSmallMedium=22,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64,
- /// enormous sized icons for iconviews
- SizeEnormous=128
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a file is a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde352/kkeyserver.h b/python/pykde/extra/kde352/kkeyserver.h
deleted file mode 100644
index ef673ea9..00000000
--- a/python/pykde/extra/kde352/kkeyserver.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_H
-#define _KKEYSERVER_H
-
-//FOR COMPATIBILITY
-#include "kkeyserver_x11.h"
-
-#endif // !_KKEYSERVER_H
diff --git a/python/pykde/extra/kde352/kkeyserver_x11.h b/python/pykde/extra/kde352/kkeyserver_x11.h
deleted file mode 100644
index dbca533e..00000000
--- a/python/pykde/extra/kde352/kkeyserver_x11.h
+++ /dev/null
@@ -1,477 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct KDECORE_EXPORT Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct KDECORE_EXPORT Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct KDECORE_EXPORT Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- KDECORE_EXPORT bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- KDECORE_EXPORT uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- KDECORE_EXPORT bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXScrollLock();
-
- /**
- * Returns the X11 Mode_switch modifier mask/flag.
- * @return the X11 Mode_switch modifier mask/flag.
- * @see accelModMaskX()
- * @since 3.5
- */
- KDECORE_EXPORT uint modXModeSwitch();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- KDECORE_EXPORT uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- KDECORE_EXPORT bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- KDECORE_EXPORT bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- //wrapped for win32
- KDECORE_EXPORT bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the Qt-compatible button state to x11 modifier.
- */
- KDECORE_EXPORT int qtButtonStateToMod( Qt::ButtonState s );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- KDECORE_EXPORT TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- KDECORE_EXPORT TQString modToStringUser( uint mod );
-
- /**
- * Converts the modifier given as user-readable string
- * to KKey::ModFlag modifier, or 0.
- * @internal
- * @since 3.5
- */
- KDECORE_EXPORT uint stringUserToMod( const TQString& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde352/konsole_part.h b/python/pykde/extra/kde352/konsole_part.h
deleted file mode 100644
index d526c1a6..00000000
--- a/python/pykde/extra/kde352/konsole_part.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/* -*- C++ -*-
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 KONSOLE_PART_H
-#define KONSOLE_PART_H
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class KActionMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface, public ExtTerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited( KProcess * );
- void receivedData( const TQString& s );
- void forkedChild();
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
-// void updateTitle(TESession*);
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
- void applyProperties();
- void setSettingsMenuEnabled( bool );
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int /*columns*/, int /*lines*/);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotUseKonsoleSettings();
- void slotWordSeps();
- void slotSetEncoding();
- void biggerFont();
- void smallerFont();
-
- void autoShowShell();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
- // ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KActionCollection* actions;
- KActionCollection* settingsActions;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
- KToggleAction* m_useKonsoleSettings;
-
- KSelectAction* selectBell;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
- KSelectAction* selectSetEncoding;
-
- KActionMenu* m_fontsizes;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
-
- bool b_framevis:1;
- bool b_histEnabled:1;
- bool b_useKonsoleSettings:1;
- bool b_autoDestroy:1;
- bool b_autoStartShell:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
- int n_encoding;
-
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void newSession();
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
- void setAutoDestroy( bool );
- void setAutoStartShell( bool );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde352/kpanelmenu.h b/python/pykde/extra/kde352/kpanelmenu.h
deleted file mode 100644
index de0b065e..00000000
--- a/python/pykde/extra/kde352/kpanelmenu.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <kdeprint@swing.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the %KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @author The kicker maintainers, Michael Goffioul <kdeprint@swing.be>
- */
-class KDEUI_EXPORT KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @param parent parent object
- * @param name name of the object
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde352/ksharedptr.h b/python/pykde/extra/kde352/ksharedptr.h
deleted file mode 100644
index ada08413..00000000
--- a/python/pykde/extra/kde352/ksharedptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-#include "kdelibs_export.h"
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-class KDECORE_EXPORT KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers virtually perfectly.
- * So just use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * WARNING: Please note that this class template provides an implicit
- * conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-template< class T >
-class KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde352/ksycocafactory.h b/python/pykde/extra/kde352/ksycocafactory.h
deleted file mode 100644
index 536da286..00000000
--- a/python/pykde/extra/kde352/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KDECORE_EXPORT KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde352/ktoolbarbutton.h b/python/pykde/extra/kde352/ktoolbarbutton.h
deleted file mode 100644
index eab46983..00000000
--- a/python/pykde/extra/kde352/ktoolbarbutton.h
+++ /dev/null
@@ -1,330 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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 _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KDEUI_EXPORT KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- * @param _instance the instance to use for this button
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- /**
- * Emitted when the toolbar button is clicked (with LMB or MMB)
- */
- void clicked(int);
- /**
- * Emitted when the toolbar button is clicked (with any mouse button)
- * @param state makes it possible to find out which button was pressed,
- * and whether any keyboard modifiers were held.
- * @since 3.4
- */
- void buttonClicked(int, Qt::ButtonState state);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- bool event(TQEvent *e);
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- /// @since 3.4
- void mousePressEvent( TQMouseEvent * );
- /// @since 3.4
- void mouseReleaseEvent( TQMouseEvent * );
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h 465272 2005-09-29 09:47:40Z mueller $
-*/
-class KDEUI_EXPORT KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde352/kurifilter.h b/python/pykde/extra/kde352/kurifilter.h
deleted file mode 100644
index 47332947..00000000
--- a/python/pykde/extra/kde352/kurifilter.h
+++ /dev/null
@@ -1,647 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-
-#ifdef Q_OS_WIN
-#undef ERROR
-#endif
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KIO_EXPORT KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KIO_EXPORT KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KIO_EXPORT KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KIO_EXPORT KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *s_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif
diff --git a/python/pykde/extra/kde353/kaccelaction.h b/python/pykde/extra/kde353/kaccelaction.h
deleted file mode 100644
index d55e4517..00000000
--- a/python/pykde/extra/kde353/kaccelaction.h
+++ /dev/null
@@ -1,576 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001,2002 Ellis Whitehead <ellis@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 _KACCELACTION_H
-#define _KACCELACTION_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-
-#include <kshortcut.h>
-
-class KAccelBase;
-
-class TQObject;
-class KConfig;
-class KConfigBase;
-
-/**
- * @internal
- * A KAccelAction prepresents an action that can be executed using
- * an accelerator key. Each KAccelAction has a name, a label, a
- * "What's this" string and a KShortcut. The user can configure and
- * enable/disable them using KKeyDialog.
- *
- * \code
- * 1) KAccelAction = "Run Command"
- * Default3 = "Alt+F2"
- * Default4 = "Meta+Enter;Alt+F2"
- * 1) KShortcut = "Meta+Enter"
- * 1) KKeySequence = "Meta+Enter"
- * 1) KKey = "Meta+Enter"
- * 1) Meta+Enter
- * 2) Meta+Keypad_Enter
- * 2) KShortcut = "Alt+F2"
- * 1) KKeySequence = "Alt+F2"
- * 1) Alt+F2
- * 2) KAccelAction = "Something"
- * Default3 = ""
- * Default4 = ""
- * 1) KShortcut = "Meta+X,Asterisk"
- * 1) KKeySequence = "Meta+X,Asterisk"
- * 1) KKey = "Meta+X"
- * 1) Meta+X
- * 2) KKey = "Asterisk"
- * 1) Shift+8 (English layout)
- * 2) Keypad_Asterisk
- * \endcode
- * @short An accelerator action
- * @see KAccel
- * @see KGlobalAccel
- * @see KKeyChooser
- * @see KKeyDialog
- */
-class KDECORE_EXPORT KAccelAction
-{
- public:
- /**
- * Creates an empty KAccelAction.
- * @see clear()
- */
- KAccelAction();
-
- /**
- * Copy constructor.
- */
- KAccelAction( const KAccelAction& );
-
- /**
- * Creates a new KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- */
- KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
- ~KAccelAction();
-
- /**
- * Clears the accelerator.
- */
- void clear();
-
- /**
- * Re-initialized the KAccelAction.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param cutDef3 the default shortcut for 3 modifier systems
- * @param cutDef4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled true if the accelerator should be enabled
- * @return true if successful, false otherwise
- */
- bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& cutDef3, const KShortcut& cutDef4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable, bool bEnabled );
-
- /**
- * Copies this KAccelAction.
- */
- KAccelAction& operator=( const KAccelAction& );
-
- /**
- * Returns the name of the accelerator action.
- * @return the name of the accelerator action, can be null if not
- * set
- */
- const TQString& name() const { return m_sName; }
-
- /**
- * Returns the label of the accelerator action.
- * @return the label of the accelerator action, can be null if
- * not set
- */
- const TQString& label() const { return m_sLabel; }
-
- /**
- * Returns the What's This text of the accelerator action.
- * @return the What's This text of the accelerator action, can be
- * null if not set
- */
- const TQString& whatsThis() const { return m_sWhatsThis; }
-
- /**
- * The shortcut that is actually used (may be used configured).
- * @return the shortcut of the KAccelAction, can be null if not set
- * @see shortcutDefault()
- */
- const KShortcut& shortcut() const { return m_cut; }
-
- /**
- * The default shortcut for this system.
- * @return the default shortcut on this system, can be null if not set
- * @see shortcut()
- * @see shortcutDefault3()
- * @see shortcutDefault4()
- */
- const KShortcut& shortcutDefault() const;
-
- /**
- * The default shortcut for 3 modifier systems.
- * @return the default shortcut for 3 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault4()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
-
- /**
- * The default shortcut for 4 modifier systems.
- * @return the default shortcut for 4 modifier systems, can be null
- * if not set
- * @see shortcutDefault()
- * @see shortcutDefault3()
- * @see useFourModifierKeys()
- */
- const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
-
- /**
- * Returns the receiver of signals.
- * @return the receiver of signals (can be 0 if not set)
- */
- const TQObject* objSlotPtr() const { return m_pObjSlot; }
-
- /**
- * Returns the slot for the signal.
- * @return the slot for the signal
- */
- const char* methodSlotPtr() const { return m_psMethodSlot; }
-
- /**
- * Checks whether the user can configure the action.
- * @return true if configurable, false otherwise
- */
- bool isConfigurable() const { return m_bConfigurable; }
-
- /**
- * Checks whether the action is enabled.
- * @return true if enabled, false otherwise
- */
- bool isEnabled() const { return m_bEnabled; }
-
- /**
- * Sets the name of the accelerator action.
- * @param name the new name
- */
- void setName( const TQString& name );
-
- /**
- * Sets the user-readable label of the accelerator action.
- * @param label the new label (i18n!)
- */
- void setLabel( const TQString& label );
-
- /**
- * Sets the What's This text for the accelerator action.
- * @param whatsThis the new What's This text (i18n!)
- */
- void setWhatsThis( const TQString& whatsThis );
-
- /**
- * Sets the new shortcut of the accelerator action.
- * @param rgCuts the shortcut to set
- * @return true if successful, false otherwise
- */
- bool setShortcut( const KShortcut& rgCuts );
-
- /**
- * Sets the slot of the accelerator action.
- * @param pObjSlot the receiver object of the signal
- * @param psMethodSlot the slot for the signal
- */
- void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
-
- /**
- * Enables or disabled configuring the action.
- * @param configurable true to enable configurability, false to disable
- */
- void setConfigurable( bool configurable );
-
- /**
- * Enables or disabled the action.
- * @param enable true to enable the action, false to disable
- */
- void setEnabled( bool enable );
-
- /**
- * Retrieves the id set using setID.
- * @return the id of the accelerator action
- */
- int getID() const { return m_nIDAccel; }
-
- /**
- * Allows you to set an id that will be used as the action
- * signal's argument.
- *
- * @param n the new id
- * @see getID()
- */
- void setID( int n ) { m_nIDAccel = n; }
-
- /**
- * Checkes whether the action is connected (emits signals).
- * @return true if connected, false otherwise
- */
- bool isConnected() const;
-
- /**
- * Sets a key sequence of the action's shortcut.
- * @param i the position of the sequence
- * @param keySeq the new new sequence
- * @return true if successful, false otherwise
- * @see KShortcut::setSeq()
- */
- bool setKeySequence( uint i, const KKeySequence &keySeq );
-
- /**
- * Clears the action's shortcut. It will not contain any sequences after
- * calling this method.
- * @see KShortcut::clear()
- */
- void clearShortcut();
-
- /**
- * Checks whether the action's shortcut contains the given key sequence.
- * @param keySeq the key sequence to check
- * @return true if the shortcut contains the given sequence
- * @see KShortcut::contains()
- */
- bool contains( const KKeySequence &keySeq );
-
- /**
- * Returns the string representation of the action's shortcut.
- * @return the string representation of the action's shortcut.
- * @see KShortcut::toString()
- */
- TQString toString() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns true if four modifier keys will be used.
- * @return true if four modifier keys will be used.
- */
- static bool useFourModifierKeys();
-
- /**
- * Selects 3 or 4 modifier default shortcuts.
- * @param use true to use 4 modifier shortcuts, false to use
- * 3 modifier shortcuts
- */
- static void useFourModifierKeys( bool use );
-
- protected:
- TQString m_sName /**< Name of accel. @sa setName() */,
- m_sLabel /**< Label of accel. User-visible. */,
- m_sWhatsThis /**< WhatsThis help for accel. User-visible. */;
- KShortcut m_cut /**< Shortcut actually assigned. */;
- KShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */,
- m_cutDefault4 /**< Default shortcur in 4-modifier layout */;
- const TQObject* m_pObjSlot /**< Object we will send signals to. */;
- const char* m_psMethodSlot /**< Slot we send signals to, in m_pObjSlot */;
- bool m_bConfigurable /**< Can this accel be configured by the user? */,
- m_bEnabled /**< Is this accel enabled? */;
- int m_nIDAccel /**< Id of this accel, from the list of IDs */;
- uint m_nConnections /**< Number of connections to this accel. */ ;
-
- /** @internal Increment the number of connections to this accel. */
- void incConnections();
- /** @internal Decrement the number of connections to this accel (bouded by zero). */
- void decConnections();
-
- private:
- static int g_bUseFourModifierKeys;
- class KAccelActionPrivate* d;
-
- friend class KAccelActions;
- friend class KAccelBase;
-};
-
-//---------------------------------------------------------------------
-// KAccelActions
-//---------------------------------------------------------------------
-
-/**
- * @internal
- * This class represents a collection of KAccelAction objects.
- *
- * @short A collection of accelerator actions
- * @see KAccelAction
- */
-class KDECORE_EXPORT KAccelActions
-{
- public:
- /**
- * Creates a new, empty KAccelActions object.
- */
- KAccelActions();
-
- /**
- * Copy constructor (deep copy).
- */
- KAccelActions( const KAccelActions& );
- virtual ~KAccelActions();
-
- /**
- * Removes all items from this collection.
- */
- void clear();
-
- /**
- * Initializes this object with the given actions.
- * It will make a deep copy of all actions.
- * @param actions the actions to copy
- * @return true if successful, false otherwise
- */
- bool init( const KAccelActions &actions );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param config the configuration file to load from
- * @param sGroup the group in the configuration file
- * @return true if successful, false otherwise
- */
- bool init( KConfigBase& config, const TQString& sGroup );
-
- /**
- * Updates the shortcuts of all actions in this object
- * with the shortcuts from the given object.
- * @param shortcuts the collection that contains the new
- * shortcuts
- */
- void updateShortcuts( KAccelActions &shortcuts );
-
- /**
- * Retrieves the index of the action with the given name.
- * @param sAction the action to search
- * @return the index of the action, or -1 if not found
- */
- int actionIndex( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- KAccelAction* actionPtr( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see count()
- */
- const KAccelAction* actionPtr( uint index ) const;
-
- /**
- * Returns the action with the given name.
- * @param sAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- KAccelAction* actionPtr( const TQString& sAction );
-
- /**
- * Returns the action with the given name.
- * @param sAction the name of the action to search
- * @return the KAccelAction with the given name, or 0
- * if not found
- */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
-
- /**
- * Returns the action with the given key sequence.
- * @param cut the sequence to search for
- * @return the KAccelAction with the given sequence, or 0
- * if not found
- */
- KAccelAction* actionPtr( KKeySequence cut );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- KAccelAction& operator []( uint index );
-
- /**
- * Returns the action with the given @p index.
- * @param index the index of an action. You must not
- * use an index that is too high.
- * @return the KAccelAction with the given index
- * @see actionPtr()
- * @see count()
- */
- const KAccelAction& operator []( uint index ) const;
-
- /**
- * Inserts an action into the collection.
- * @param sAction the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @param sWhatsThis the What's This text (18n!)
- * @param rgCutDefaults3 the default shortcut for 3 modifier systems
- * @param rgCutDefaults4 the default shortcut for 4 modifier systems
- * @param pObjSlot the receiver of a signal when the key has been
- * pressed
- * @param psMethodSlot the slot to connect for key presses. Receives
- * an int, as set by setID(), as only argument
- * @param bConfigurable if true the user can configure the shortcut
- * @param bEnabled if true the accelerator should be enabled
- * @return the new action
- */
- KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
- bool bConfigurable = true, bool bEnabled = true );
-
- /**
- * Inserts an action into the collection.
- * @param sName the name of the accelerator
- * @param sLabel the label of the accelerator (i18n!)
- * @return the new action
- */
- KAccelAction* insert( const TQString& sName, const TQString& sLabel );
-
- /**
- * Removes the given action.
- * @param sAction the name of the action.
- * @return true if successful, false otherwise
- */
- bool remove( const TQString& sAction );
-
- /**
- * Loads the actions from the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to load from
- * @return true if successful, false otherwise
- */
- bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
-
- /**
- * Writes the actions to the given configuration file.
- *
- * @param sConfigGroup the group in the configuration file
- * @param pConfig the configuration file to save to
- * @param bWriteAll true to write all actions
- * @param bGlobal true to write to the global configuration file
- * @return true if successful, false otherwise
- */
- bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
- bool bWriteAll = false, bool bGlobal = false ) const;
-
- /**
- * Emit a keycodeChanged signal.
- */
- void emitKeycodeChanged();
-
- /**
- * Returns the number of actions in the collection.
- * @return the number of actions
- */
- uint count() const;
-
- protected:
- /** Base object that proxies signals from us. */
- KAccelBase* m_pKAccelBase;
- /** Array of actions we're hanging on to. */
- KAccelAction** m_prgActions;
- uint m_nSizeAllocated /**< Allocated size of the array. */,
- m_nSize /**< Amount in use. */ ;
-
- /**
- * Resize the list to the given number @p new_size of entries.
- * @todo Can you make it smaller?
- * @todo Implementation seems to break m_nSize.
- */
- void resize( uint new_size );
- /** Add a action to this collection. @todo Document ownership. */
- void insertPtr( KAccelAction* );
-
- private:
- class KAccelActionsPrivate* d;
-
- KAccelActions( KAccelBase* );
- void initPrivate( KAccelBase* );
- KAccelActions& operator =( KAccelActions& );
-
- friend class KAccelBase;
-};
-
-#endif // _KACCELACTION_H
diff --git a/python/pykde/extra/kde353/kaccelbase.h b/python/pykde/extra/kde353/kaccelbase.h
deleted file mode 100644
index babf304b..00000000
--- a/python/pykde/extra/kde353/kaccelbase.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Ellis Whitehead <ellis@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 _KACCELBASE_H
-#define _KACCELBASE_H
-
-#include <tqmap.h>
-#include <tqptrvector.h>
-#include <tqstring.h>
-#include <tqvaluevector.h>
-#include <tqvaluelist.h>
-
-#include "kaccelaction.h"
-#include "kkeyserver.h"
-
-class TQPopupMenu;
-class TQWidget;
-
-//----------------------------------------------------
-
-/**
- * @internal
- * Handle keyboard accelerators.
- *
- * Allow an user to configure
- * key bindings through application configuration files or through the
- * KKeyChooser GUI.
- *
- * A KAccel contains a list of accelerator items. Each accelerator item
- * consists of an action name and a keyboard code combined with modifiers
- * (Shift, Ctrl and Alt.)
- *
- * For example, "Ctrl+P" could be a shortcut for printing a document. The key
- * codes are listed in ckey.h. "Print" could be the action name for printing.
- * The action name identifies the key binding in configuration files and the
- * KKeyChooser GUI.
- *
- * When pressed, an accelerator key calls the slot to which it has been
- * connected. Accelerator items can be connected so that a key will activate
- * two different slots.
- *
- * A KAccel object handles key events sent to its parent widget and to all
- * children of this parent widget.
- *
- * Key binding reconfiguration during run time can be prevented by specifying
- * that an accelerator item is not configurable when it is inserted. A special
- * group of non-configurable key bindings are known as the
- * standard accelerators.
- *
- * The standard accelerators appear repeatedly in applications for
- * standard document actions such as printing and saving. Convenience methods are
- * available to insert and connect these accelerators which are configurable on
- * a desktop-wide basis.
- *
- * It is possible for a user to choose to have no key associated with
- * an action.
- *
- * The translated first argument for insertItem() is used only
- * in the configuration dialog.
- *\code
- * KAccel *a = new KAccel( myWindow );
- * // Insert an action "Scroll Up" which is associated with the "Up" key:
- * a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
- * // Insert an action "Scroll Down" which is not associated with any key:
- * a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
- * // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
- * // is done automatially with the
- * // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
- *
- * a->readSettings();
- *\endcode
- *
- * If a shortcut has a menu entry as well, you could insert them like
- * this. The example is again the KStdAccel::Print from above.
- *
- * \code
- * int id;
- * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
- * a->changeMenuAccel(popup, id, KStdAccel::Print );
- * \endcode
- *
- * If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
- * it might be a good idea to insert the standard action before as
- * a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
- * as well, so that the user can easily find the corresponding function.
- *
- * This technique works for other actions as well. Your "scroll up" function
- * in a menu could be done with
- *
- * \code
- * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
- * a->changeMenuAccel(popup, id, "Scroll Up" );
- * \endcode
- *
- * Please keep the order right: First insert all functions in the
- * acceleratior, then call a -> readSettings() and @em then build your
- * menu structure.
- *
- * @short Configurable key binding support.
- */
-
-class KDECORE_EXPORT KAccelBase
-{
- public:
- /** Initialization mode of the KAccelBase, used in constructor. */
- enum Init { QT_KEYS = 0x00, NATIVE_KEYS = 0x01 };
-
- /** Enum for kinds of signals which may be emitted. */
- enum Signal { KEYCODE_CHANGED };
-
- /** Constructor. @p fInitCode should be a bitwise OR of
- * values from the Init enum.
- */
- KAccelBase( int fInitCode );
- virtual ~KAccelBase();
-
- /** Returns number of actions in this handler. */
- uint actionCount() const;
- /** Returns a list of all the actions in this handler. */
- KAccelActions& actions();
- /** Returns whether this accelerator handler is enabled or not. */
- bool isEnabled() const;
-
- /** Returns a pointer to the KAccelAction named @p sAction. */
- KAccelAction* actionPtr( const TQString& sAction );
- /** Const version of the above. */
- const KAccelAction* actionPtr( const TQString& sAction ) const;
- /** Returns a pointer to the KAccelAction associated with
- * the key @p key. This function takes into account the
- * key mapping defined in the constructor.
- *
- * May return 0 if no (or more than one)
- * action is associated with the key.
- */
- KAccelAction* actionPtr( const KKey& key );
- /** Basically the same as above, except a KKeyServer::Key
- * already has a key mapping defined (either NATIVE_KEYS or not).
- */
- KAccelAction* actionPtr( const KKeyServer::Key& key );
-
- /** Returns the name of the configuration group these
- * accelerators are stored in. The default is "Shortcuts".
- */
- const TQString& configGroup() const { return m_sConfigGroup; }
- /** Set the group (in the configuration file) for storing
- * accelerators.
- */
- void setConfigGroup( const TQString& group );
- void setConfigGlobal( bool global );
- virtual void setEnabled( bool bEnabled ) = 0;
- /** Returns whether autoupdate is enabled for these accelerators. */
- bool getAutoUpdate() { return m_bAutoUpdate; }
- /** Enables (or disables) autoupdate for these accelerators.
- * @return the value of autoupdate before the call.
- */
- bool setAutoUpdate( bool bAuto );
-
-// Procedures for manipulating Actions.
- //void clearActions();
-
- KAccelAction* insert( const TQString& sName, const TQString& sDesc );
- KAccelAction* insert(
- const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
- const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const TQObject* pObjSlot, const char* psMethodSlot,
- bool bConfigurable = true, bool bEnabled = true );
- bool remove( const TQString& sAction );
- bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
-
- bool updateConnections();
-
- bool setShortcut( const TQString& sAction, const KShortcut& cut );
-
-// Modify individual Action sub-items
- bool setActionEnabled( const TQString& sAction, bool bEnable );
-
- /**
- * Read all key associations from @p config, or (if @p config
- * is zero) from the application's configuration file
- * KGlobal::config().
- *
- * The group in which the configuration is stored can be
- * set with setConfigGroup().
- */
- void readSettings( KConfigBase* pConfig = 0 );
-
- /**
- * Write the current configurable associations to @p config,
- * or (if @p config is zero) to the application's
- * configuration file.
- */
- void writeSettings( KConfigBase* pConfig = 0 ) const;
-
- TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
-
- // Protected methods
- protected:
- void slotRemoveAction( KAccelAction* );
-
- struct X;
- void createKeyList( TQValueVector<struct X>& rgKeys );
- bool insertConnection( KAccelAction* );
- bool removeConnection( KAccelAction* );
-
- virtual bool emitSignal( Signal ) = 0;
- virtual bool connectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool connectKey( const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( KAccelAction&, const KKeyServer::Key& ) = 0;
- virtual bool disconnectKey( const KKeyServer::Key& ) = 0;
-
- protected:
- virtual bool isEnabledInternal() const;
- struct ActionInfo
- {
- KAccelAction* pAction;
- uint iSeq, iVariation;
- //ActionInfo* pInfoNext; // nil if only one action uses this key.
-
- ActionInfo() { pAction = 0; iSeq = 0xffff; iVariation = 0xffff; }
- ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
- { pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
- };
- typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
-
- KAccelActions m_rgActions;
- KKeyToActionMap m_mapKeyToAction;
- TQValueList<KAccelAction*> m_rgActionsNonUnique;
- bool m_bNativeKeys; // Use native key codes instead of Qt codes
- bool m_bEnabled;
- bool m_bConfigIsGlobal;
- TQString m_sConfigGroup;
- bool m_bAutoUpdate;
- KAccelAction* mtemp_pActionRemoving;
-
- private:
- KAccelBase& operator =( const KAccelBase& );
-
- friend class KAccelActions;
-};
-
-#endif // _KACCELBASE_H
diff --git a/python/pykde/extra/kde353/kicontheme.h b/python/pykde/extra/kde353/kicontheme.h
deleted file mode 100644
index 4befb226..00000000
--- a/python/pykde/extra/kde353/kicontheme.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/* vi: ts=8 sts=4 sw=4
- *
- * This file is part of the KDE project, module kdecore.
- * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
- * Antonio Larrosa <larrosa@kde.org>
- *
- * This is free software; it comes under the GNU Library General
- * Public License, version 2. See the file "COPYING.LIB" for the
- * exact licensing terms.
- *
- */
-
-#ifndef __KIconTheme_h_Included__
-#define __KIconTheme_h_Included__
-
-#include <tqstring.h>
-#include <tqstringlist.h>
-#include <tqptrlist.h>
-#include "kdelibs_export.h"
-
-class KConfig;
-//class KIconThemeDir;
-
-class KIconThemePrivate;
-
-class KIconPrivate;
-
-/**
- * One icon as found by KIconTheme. Also serves as a namespace containing
- * icon related constants.
- * @see KIconEffect
- * @see KIconTheme
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIcon
-{
-public:
- KIcon() { size = 0; }
-
- /**
- * Return true if this icon is valid, false otherwise.
- */
- bool isValid() const { return size != 0; }
-
- /**
- * Defines the context of the icon.
- */
- enum Context {
- Any, ///< Some icon with unknown purpose.
- Action, ///< An action icon (e.g. 'save', 'print').
- Application, ///< An icon that represents an application.
- Device, ///< An icon that represents a device.
- FileSystem, ///< An icon that represents a file system.
- MimeType ///< An icon that represents a mime type (or file type).
- };
-
- /**
- * The type of the icon.
- */
- enum Type {
- Fixed, ///< Fixed-size icon.
- Scalable, ///< Scalable-size icon.
- Threshold ///< A threshold icon.
- };
-
- /**
- * The type of a match.
- */
- enum MatchType {
- MatchExact, ///< Only try to find an exact match.
- MatchBest ///< Take the best match if there is no exact match.
-
- };
-
- // if you add a group here, make sure to change the config reading in
- // KIconLoader too
- /**
- * The group of the icon.
- */
- enum Group {
- /// No group
- NoGroup=-1,
- /// Desktop icons
- Desktop=0,
- /// First group
- FirstGroup=0,
- /// Toolbar icons
- Toolbar,
- /// Main toolbar icons
- MainToolbar,
- /// Small icons
- Small,
- /// Panel (Kicker) icons
- Panel,
- /// Last group
- LastGroup,
- /// User icons
- User
- };
-
- /**
- * These are the standard sizes for icons.
- */
- enum StdSizes {
- /// small icons for menu entries
- SizeSmall=16,
- /// slightly larger small icons for toolbars, panels, etc
- SizeSmallMedium=22,
- /// medium sized icons for the desktop
- SizeMedium=32,
- /// large sized icons for the panel
- SizeLarge=48,
- /// huge sized icons for iconviews
- SizeHuge=64,
- /// enormous sized icons for iconviews
- SizeEnormous=128
- };
-
- /**
- * Defines the possible states of an icon.
- */
- enum States { DefaultState, ///< The default state.
- ActiveState, ///< Icon is active.
- DisabledState, ///< Icon is disabled.
- LastState ///< Last state (last constant)
- };
-
- /**
- * This defines an overlay, a semi-transparent image that is
- * projected onto the icon. They are used to show that the file
- * represented by the icon is, for example, locked, zipped or hidden.
- */
- enum Overlays {
- LockOverlay=0x100, ///< a file is locked
- ZipOverlay=0x200, ///< a file is zipped
- LinkOverlay=0x400, ///< a file is a link
- HiddenOverlay=0x800, ///< a file is hidden
- ShareOverlay=0x1000, ///< a file is shared
- OverlayMask = ~0xff
- };
-
- /**
- * The size in pixels of the icon.
- */
- int size;
-
- /**
- * The context of the icon.
- */
- Context context;
-
- /**
- * The type of the icon: Fixed, Scalable or Threshold.
- **/
- Type type;
-
- /**
- * The threshold in case type == Threshold
- */
- int threshold;
-
- /**
- * The full path of the icon.
- */
- TQString path;
-
-private:
- KIconPrivate *d;
-};
-
-inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
-inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
-
-/**
- * Class to use/access icon themes in KDE. This class is used by the
- * iconloader but can be used by others too.
- * @see KIconLoader
- */
-class KDECORE_EXPORT KIconTheme
-{
-public:
- /**
- * Load an icon theme by name.
- * @param name the name of the theme (e.g. "hicolor" or "keramik")
- * @param appName the name of the application. Can be null. This argument
- * allows applications to have themed application icons.
- */
- KIconTheme(const TQString& name, const TQString& appName=TQString::null);
- ~KIconTheme();
-
- /**
- * The stylized name of the icon theme.
- * @return the (human-readable) name of the theme
- */
- TQString name() const { return mName; }
-
- /**
- * A description for the icon theme.
- * @return a human-readable description of the theme, TQString::null
- * if there is none
- */
- TQString description() const { return mDesc; }
-
- /**
- * Return the name of the "example" icon. This can be used to
- * present the theme to the user.
- * @return the name of the example icon, TQString::null if there is none
- */
- TQString example() const;
-
- /**
- * Return the name of the screenshot.
- * @return the name of the screenshot, TQString::null if there is none
- */
- TQString screenshot() const;
-
- /**
- * Returns the name of this theme's link overlay.
- * @return the name of the link overlay
- */
- TQString linkOverlay() const;
-
- /**
- * Returns the name of this theme's zip overlay.
- * @return the name of the zip overlay
- */
- TQString zipOverlay() const;
-
- /**
- * Returns the name of this theme's lock overlay.
- * @return the name of the lock overlay
- */
- TQString lockOverlay() const;
-
- /**
- * Returns the name of this theme's share overlay.
- * @return the name of the share overlay
- * @since 3.1
- */
- TQString shareOverlay () const;
-
- /**
- * Returns the toplevel theme directory.
- * @return the directory of the theme
- */
- TQString dir() const { return mDir; }
-
- /**
- * The themes this icon theme falls back on.
- * @return a list of icon themes that are used as fall-backs
- */
- TQStringList inherits() const { return mInherits; }
-
- /**
- * The icon theme exists?
- * @return true if the icon theme is valid
- */
- bool isValid() const;
-
- /**
- * The icon theme should be hidden to the user?
- * @return true if the icon theme is hidden
- * @since 3.1
- */
- bool isHidden() const;
-
- /**
- * The minimum display depth required for this theme. This can either
- * be 8 or 32.
- * @return the minimum bpp (8 or 32)
- */
- int depth() const { return mDepth; }
-
- /**
- * The default size of this theme for a certain icon group.
- * @param group The icon group. See KIcon::Group.
- * @return The default size in pixels for the given icon group.
- */
- int defaultSize(KIcon::Group group) const;
-
- /**
- * Query available sizes for a group.
- * @param group The icon group. See KIcon::Group.
- * @return a list of available sized for the given group
- */
- TQValueList<int> querySizes(KIcon::Group group) const;
-
- /**
- * Query available icons for a size and context.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
-
- /**
- * Query available icons for a context and preferred size.
- * @param size the size of the icons
- * @param context the context of the icons
- * @return the list of icon names
- */
- TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
-
-
- /**
- * Lookup an icon in the theme.
- * @param name The name of the icon, without extension.
- * @param size The desired size of the icon.
- * @param match The matching mode. KIcon::MatchExact returns an icon
- * only if matches exactly. KIcon::MatchBest returns the best matching
- * icon.
- * @return A KIcon class that describes the icon. If an icon is found,
- * @see KIcon::isValid will return true, and false otherwise.
- */
- KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
-
- /**
- * List all icon themes installed on the system, global and local.
- * @return the list of all icon themes
- */
- static TQStringList list();
-
- /**
- * Returns the current icon theme.
- * @return the name of the current theme
- */
- static TQString current();
-
- /**
- * Reconfigure the theme.
- */
- static void reconfigure();
-
- /**
- * Returns the default icon theme.
- * @return the name of the default theme name
- * @since 3.1
- */
- static TQString defaultThemeName();
-
-private:
- int mDefSize[8];
- TQValueList<int> mSizes[8];
-
- int mDepth;
- TQString mDir, mName, mDesc;
- TQStringList mInherits;
-// TQPtrList<KIconThemeDir> mDirs;
- KIconThemePrivate *d;
-
- static TQString *_theme;
- static TQStringList *_theme_list;
-};
-
-#endif
diff --git a/python/pykde/extra/kde353/kkeyserver.h b/python/pykde/extra/kde353/kkeyserver.h
deleted file mode 100644
index ef673ea9..00000000
--- a/python/pykde/extra/kde353/kkeyserver.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_H
-#define _KKEYSERVER_H
-
-//FOR COMPATIBILITY
-#include "kkeyserver_x11.h"
-
-#endif // !_KKEYSERVER_H
diff --git a/python/pykde/extra/kde353/kkeyserver_x11.h b/python/pykde/extra/kde353/kkeyserver_x11.h
deleted file mode 100644
index dbca533e..00000000
--- a/python/pykde/extra/kde353/kkeyserver_x11.h
+++ /dev/null
@@ -1,477 +0,0 @@
-/*
- Copyright (C) 2001 Ellis Whitehead <ellis@kde.org>
-
- Win32 port:
- Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
-
- 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 _KKEYSERVER_X11_H
-#define _KKEYSERVER_X11_H
-
-#include "kshortcut.h"
-#include "kkeynative.h"
-
-/**
- * A collection of functions for the conversion of key presses and
- * their modifiers from the window system specific format
- * to the generic format and vice-versa.
- */
-namespace KKeyServer
-{
- /**
- * Supplement enum KKey::ModFlag
- * @since 3.1
- */
- enum ExtraModFlag { MODE_SWITCH = 0x2000 };
-
- /**
- * Represents a key symbol.
- * @see KKey
- * @see KKeyServer
- */
- struct KDECORE_EXPORT Sym
- {
- public:
- /// the actual value of the symbol
- uint m_sym;
-
- /// Creates a null symbol.
- Sym()
- { m_sym = 0; }
- /**
- * Creates asymbol with the given value.
- * @param sym the value
- */
- Sym( uint sym )
- { m_sym = sym; }
- /**
- * Creates a symbol from the given string description.
- * @param s the description of the symbol
- * @see toString()
- */
- Sym( const TQString& s )
- { init( s ); }
-
- /**
- * Initializes the symbol with the given Qt key code.
- * @param keyQt the qt key code
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- bool initQt( int keyQt );
-
- /**
- * Initializes the key with the given string description.
- * @param s the string description
- * @return true if successful, false otherwise
- * @see toString()
- */
- bool init( const TQString &s );
-
- /**
- * Returns the qt key code of the symbol.
- * @return the qt key code
- */
- int qt() const;
-
- /**
- * @internal
- */
- TQString toStringInternal() const;
-
- /**
- * Returns the string representation of the symbol.
- * @return the string representation of the symbol
- */
- TQString toString() const;
-
- /**
- * Returns the mods that are required for this symbol as
- * ORed KKey::ModFlag's. For example, Break requires a
- * Ctrl to be valid.
- * @return the required KKey::ModFlag's
- * @see KKey::ModFlag
- */
- uint getModsRequired() const;
-
- /**
- * TODO: please find out what this method does and document it
- */
- uint getSymVariation() const;
-
- /**
- * Casts the symbol to its integer representation.
- */
- operator uint() const { return m_sym; }
-
- /**
- * Overloaded operator to convert ints to Sym.
- */
- Sym& operator =( uint sym ) { m_sym = sym; return *this; }
-
- private:
- TQString toString( bool bUserSpace ) const;
-
- static void capitalizeKeyname( TQString& );
- };
-
- /**
- * Represents a key press.
- * @see KKey
- */
- struct KDECORE_EXPORT Key
- {
- /// Code for native Keys in Qt
- enum { CODE_FOR_QT = 256 };
-
- /// The code of the key
- uint m_code;
-
- /// The modifiers of the key
- uint m_mod;
-
- /// The symbol of the key
- uint m_sym;
-
- /**
- * Initializes the key with a KKey.
- * @param key the key to get the data from
- * @param bQt true to take the Qt keycode, false
- * for the native key code
- * @see Qt::Key
- * @see KKeyNative
- */
- bool init( const KKey& key, bool bQt );
-
- /**
- * Checks whether the key code is a native code.
- * @return true if native code of the window system,
- * false if it is a Qt keycode
- * @see Qt::Key
- * @see KKeyNative
- */
- bool isNative() const { return m_code != CODE_FOR_QT; }
-
- /**
- * Returns the code of the key.
- * @return the code of the key
- */
- uint code() const { return m_code; }
-
- /**
- * Returns the modifiers of the key.
- * @return the modifiers of the key
- */
- uint mod() const { return m_mod; }
-
- /**
- * Returns the symbol of the key.
- * @return the symbol of the key
- */
- uint sym() const { return m_sym; }
-
- /**
- * Returns the qt key code.
- * @return the qt key code
- */
- int keyCodeQt() const { return (int) m_sym; }
-
- /**
- * Sets the qt key code.
- * @param keyQt the qt key code
- */
- void setKeycodeQt( int keyQt )
- { m_code = CODE_FOR_QT; m_sym = keyQt; }
-
- /**
- * Initializes this key with a KKeyNative.
- * @return this key
- */
- Key& operator =( const KKeyNative& key );
-
- /**
- * Compares this key with the given Key object. Returns a
- * negative number if the given Key is larger, 0 if they
- * are equal and a positive number this Key is larger. The
- * returned value is the difference between the symbol, modifier
- * or code, whatever is non-zero first.
- *
- * @param key the key to compare with this key
- * @return a negative number if the given Key is larger, 0 if
- * they are equal and a positive number this Key is larger
- */
- int compare( const Key& key ) const;
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator ==( const Key& b ) const
- { return compare( b ) == 0; }
-
- /**
- * Compares the symbol, modifiers and code of both keys.
- * @see compare()
- */
- bool operator <( const Key& b ) const
- { return compare( b ) < 0; }
-
- /**
- * Converts this Key to a KKey.
- * @return the KKey
- */
- KKey key() const;
- };
-
- /**
- * TODO: please document this class
- */
- struct KDECORE_EXPORT Variations
- {
- enum { MAX_VARIATIONS = 4 };
-
- Key m_rgkey[MAX_VARIATIONS];
- uint m_nVariations;
-
- Variations() { m_nVariations = 0; }
-
- void init( const KKey&, bool bQt );
-
- uint count() const { return m_nVariations; }
- const Key& key( uint i ) const { return m_rgkey[i]; }
- };
-
- /// TODO: please document
- KDECORE_EXPORT bool initializeMods();
-
- /**
- * Returns the equivalent X modifier mask of the given modifier flag.
- * @param modFlag the generic flags to check
- * @return the window system specific flags
- */
- KDECORE_EXPORT uint modX( KKey::ModFlag modFlag );
-
- /**
- * Returns true if the current keyboard layout supports the Win key.
- * Specifically, whether the Super or Meta keys are assigned to an X modifier.
- * @return true if the keyboard has a Win key
- * @see modXWin()
- */
- KDECORE_EXPORT bool keyboardHasWinKey();
-
- /**
- * Returns the X11 Shift modifier mask/flag.
- * @return the X11 Shift modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXShift();
-
- /**
- * Returns the X11 Lock modifier mask/flag.
- * @return the X11 Lock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXLock();
-
- /**
- * Returns the X11 Ctrl modifier mask/flag.
- * @return the X11 Ctrl modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXCtrl();
-
- /**
- * Returns the X11 Alt (Mod1) modifier mask/flag.
- * @return the X11 Alt (Mod1) modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXAlt();
-
- /**
- * Returns the X11 NumLock modifier mask/flag.
- * @return the X11 NumLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXNumLock();
-
- /**
- * Returns the X11 Win (Mod3) modifier mask/flag.
- * @return the X11 Win (Mod3) modifier mask/flag.
- * @see keyboardHasWinKey()
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXWin();
-
- /**
- * Returns the X11 ScrollLock modifier mask/flag.
- * @return the X11 ScrollLock modifier mask/flag.
- * @see accelModMaskX()
- */
- KDECORE_EXPORT uint modXScrollLock();
-
- /**
- * Returns the X11 Mode_switch modifier mask/flag.
- * @return the X11 Mode_switch modifier mask/flag.
- * @see accelModMaskX()
- * @since 3.5
- */
- KDECORE_EXPORT uint modXModeSwitch();
-
- /**
- * Returns bitwise OR'ed mask containing Shift, Ctrl, Alt, and
- * Win (if available).
- * @see modXShift()
- * @see modXLock()
- * @see modXCtrl()
- * @see modXAlt()
- * @see modXNumLock()
- * @see modXWin()
- * @see modXScrollLock()
- */
- KDECORE_EXPORT uint accelModMaskX();
-
- /**
- * Extracts the symbol from the given Qt key and
- * converts it to a symbol.
- * @param keyQt the qt key code
- * @param sym if successful, the symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool keyQtToSym( int keyQt, uint& sym );
-
- /**
- * Extracts the modifiers from the given Qt key and
- * converts them in a mask of ORed KKey::ModFlag modifiers.
- * @param keyQt the qt key code
- * @param mod if successful, the modifiers will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- KDECORE_EXPORT bool keyQtToMod( int keyQt, uint& mod );
-
- /**
- * Converts the given symbol to a Qt key code.
- * @param sym the symbol
- * @param keyQt if successful, the qt key code will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool symToKeyQt( uint sym, int& keyQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modQt the mask of Qt key code modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see KKey
- */
- KDECORE_EXPORT bool modToModQt( uint mod, int& modQt );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to
- * a mask of ORed X11 modifiers.
- * @param mod the mask of KKey::ModFlag modifiers
- * @param modX the mask of X11 modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modToModX( uint mod, uint& modX );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed Qt key code modifiers.
- * @param modX the mask of X11 modifiers
- * @param modQt the mask of Qt key code modifiers will be written here
- * if successful
- * @return true if successful, false otherwise
- * @see Qt::Key
- */
- //wrapped for win32
- KDECORE_EXPORT bool modXToModQt( uint modX, int& modQt );
-
- /**
- * Converts the Qt-compatible button state to x11 modifier.
- */
- KDECORE_EXPORT int qtButtonStateToMod( Qt::ButtonState s );
-
- /**
- * Converts the mask of ORed X11 modifiers to
- * a mask of ORed KKey::ModFlag modifiers.
- * @param modX the mask of X11 modifiers
- * @param mod the mask of KKey::ModFlag modifiers will be written here,
- * if successful
- * @return true if successful, false otherwise
- * @see KKey
- */
- KDECORE_EXPORT bool modXToMod( uint modX, uint& mod );
-
- /**
- * Converts a X11 key code and a mask of ORed X11 modifiers
- * into a X11 symbol.
- * converts it to a symbol.
- * @param codeX the X11 key code
- * @param modX the mask of ORed X11 modifiers
- * @param symX if successful, the X11 symbol will be written here
- * @return true if successful, false otherwise
- * @see Qt::Key
- * @see Sym
- */
- KDECORE_EXPORT bool codeXToSym( uchar codeX, uint modX, uint& symX );
-
- /**
- * @internal
- */
- KDECORE_EXPORT TQString modToStringInternal( uint mod );
-
- /**
- * Converts the mask of ORed KKey::ModFlag modifiers to a
- * user-readable string.
- * @param mod the mask of ORed KKey::ModFlag modifiers
- * @return the user-readable string
- */
- KDECORE_EXPORT TQString modToStringUser( uint mod );
-
- /**
- * Converts the modifier given as user-readable string
- * to KKey::ModFlag modifier, or 0.
- * @internal
- * @since 3.5
- */
- KDECORE_EXPORT uint stringUserToMod( const TQString& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT bool stringToSymMod( const TQString&, uint& sym, uint& mod );
-
- /**
- * @internal
- * Unimplemented?
- */
- KDECORE_EXPORT void keyQtToKeyX( uint keyCombQt, unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
-}
-
-#endif // !_KKEYSERVER_X11_H
diff --git a/python/pykde/extra/kde353/konsole_part.h b/python/pykde/extra/kde353/konsole_part.h
deleted file mode 100644
index d526c1a6..00000000
--- a/python/pykde/extra/kde353/konsole_part.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/* -*- C++ -*-
- This file is part of the KDE system
- Copyright (C) 1999,2000 Boloni Laszlo
-
- This program 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 program 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 KONSOLE_PART_H
-#define KONSOLE_PART_H
-
-#include <kparts/browserextension.h>
-#include <kparts/factory.h>
-
-
-#include <kdialogbase.h>
-
-#include <kde_terminal_interface.h>
-
-//#include "schema.h"
-//#include "session.h"
-
-class KInstance;
-class konsoleBrowserExtension;
-class TQPushButton;
-class TQSpinBox;
-class KPopupMenu;
-class KActionMenu;
-class TQCheckBox;
-class KRootPixmap;
-class KToggleAction;
-class KSelectAction;
-
-namespace KParts { class GUIActivateEvent; }
-
-class konsoleFactory : public KParts::Factory
-{
- Q_OBJECT
-public:
- konsoleFactory();
- virtual ~konsoleFactory();
-
- virtual KParts::Part* createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0,
- TQObject* parent = 0, const char* name = 0,
- const char* classname = "KParts::Part",
- const TQStringList &args = TQStringList());
-
- static KInstance *instance();
-
- private:
- static KInstance *s_instance;
- static KAboutData *s_aboutData;
-};
-
-//////////////////////////////////////////////////////////////////////
-
-class konsolePart: public KParts::ReadOnlyPart, public TerminalInterface, public ExtTerminalInterface
-{
- Q_OBJECT
- public:
- konsolePart(TQWidget *parentWidget, const char *widgetName, TQObject * parent, const char *name, const char *classname = 0);
- virtual ~konsolePart();
-
-signals:
- void processExited( KProcess * );
- void receivedData( const TQString& s );
- void forkedChild();
- protected:
- virtual bool openURL( const KURL & url );
- virtual bool openFile() {return false;} // never used
- virtual bool closeURL() {return true;}
- virtual void guiActivateEvent( KParts::GUIActivateEvent * event );
-
- protected slots:
- void showShell();
-
-// void doneSession(TESession*);
- void sessionDestroyed();
-// void configureRequest(TEWidget*,int,int x,int y);
-// void updateTitle(TESession*);
- void enableMasterModeConnections();
-
- private slots:
- void emitOpenURLRequest(const TQString &url);
-
- void readProperties();
- void saveProperties();
- void applyProperties();
- void setSettingsMenuEnabled( bool );
-
- void sendSignal(int n);
- void closeCurrentSession();
-
- void notifySize(int /*columns*/, int /*lines*/);
-
- void slotToggleFrame();
- void slotSelectScrollbar();
- void slotSelectFont();
- void schema_menu_check();
- void keytab_menu_activated(int item);
- void updateSchemaMenu();
- void setSchema(int n);
- void pixmap_menu_activated(int item);
- void schema_menu_activated(int item);
- void slotHistoryType();
- void slotSelectBell();
- void slotSelectLineSpacing();
- void slotBlinkingCursor();
- void slotUseKonsoleSettings();
- void slotWordSeps();
- void slotSetEncoding();
- void biggerFont();
- void smallerFont();
-
- void autoShowShell();
-
- private:
- konsoleBrowserExtension *m_extension;
- KURL currentURL;
-
- void makeGUI();
- void applySettingsToGUI();
-
-// void setSchema(ColorSchema* s);
- void updateKeytabMenu();
-
- bool doOpenStream( const TQString& );
- bool doWriteStream( const TQByteArray& );
- bool doCloseStream();
-
- TQWidget* parentWidget;
-// TEWidget* te;
-// TESession* se;
- // ColorSchemaList* colors;
- KRootPixmap* rootxpm;
-
- KActionCollection* actions;
- KActionCollection* settingsActions;
-
- KToggleAction* blinkingCursor;
- KToggleAction* showFrame;
- KToggleAction* m_useKonsoleSettings;
-
- KSelectAction* selectBell;
- KSelectAction* selectLineSpacing;
- KSelectAction* selectScrollbar;
- KSelectAction* selectSetEncoding;
-
- KActionMenu* m_fontsizes;
-
- KPopupMenu* m_keytab;
- KPopupMenu* m_schema;
- KPopupMenu* m_signals;
- KPopupMenu* m_options;
- KPopupMenu* m_popupMenu;
-
- TQFont defaultFont;
-
- TQString pmPath; // pixmap path
- TQString s_schema;
- TQString s_kconfigSchema;
- TQString s_word_seps; // characters that are considered part of a word
-
- bool b_framevis:1;
- bool b_histEnabled:1;
- bool b_useKonsoleSettings:1;
- bool b_autoDestroy:1;
- bool b_autoStartShell:1;
-
- int curr_schema; // current schema no
- int n_bell;
- int n_keytab;
- int n_render;
- int n_scroll;
- unsigned m_histSize;
- bool m_runningShell;
- bool m_streamEnabled;
- int n_encoding;
-
-public:
- // these are the implementations for the TermEmuInterface
- // functions...
- void startProgram( const TQString& program,
- const TQStrList& args );
- void newSession();
- void showShellInDir( const TQString& dir );
- void sendInput( const TQString& text );
- void setAutoDestroy( bool );
- void setAutoStartShell( bool );
-};
-
-//////////////////////////////////////////////////////////////////////
-
-/*class HistoryTypeDialog : public KDialogBase
-{
- Q_OBJECT
-public:
- HistoryTypeDialog(const HistoryType& histType,
- unsigned int histSize,
- TQWidget *parent);
-
-public slots:
- void slotDefault();
- void slotSetUnlimited();
- void slotHistEnable(bool);
-
- unsigned int nbLines() const;
- bool isOn() const;
-
-protected:
- TQCheckBox* m_btnEnable;
- TQSpinBox* m_size;
- TQPushButton* m_setUnlimited;
-};*/
-
-//////////////////////////////////////////////////////////////////////
-
-class konsoleBrowserExtension : public KParts::BrowserExtension
-{
- Q_OBJECT
- friend class konsolePart;
- public:
- konsoleBrowserExtension(konsolePart *parent);
- virtual ~konsoleBrowserExtension();
-
- void emitOpenURLRequest(const KURL &url);
-};
-
-#endif
diff --git a/python/pykde/extra/kde353/kpanelmenu.h b/python/pykde/extra/kde353/kpanelmenu.h
deleted file mode 100644
index de0b065e..00000000
--- a/python/pykde/extra/kde353/kpanelmenu.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*****************************************************************
-
-Copyright (c) 1996-2000 the kicker authors. See file AUTHORS.
- (c) 2001 Michael Goffioul <kdeprint@swing.be>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************************************/
-
-#ifndef __KPANELMENU_H__
-#define __KPANELMENU_H__
-
-#include <tqstring.h>
-#include <kpopupmenu.h>
-#include <kgenericfactory.h>
-
-class KPanelMenuPrivate;
-
-/**
- * @short Base class to build dynamically loaded menu entries for the K-menu, or the panel.
- *
- * This class allows to build menu entries that will be dynamically added either to
- * the K-menu, or to the panel as a normal button. These dynamic menus are located
- * in shared libraries that will be loaded at runtime by Kicker (the %KDE panel).
- *
- * To build such a menu, you have to inherit this class and implement the pure virtual
- * functions #initialize() and slotExec(). You also have to provide a factory
- * object in your library, see KLibFactory. This factory is only used to construct
- * the menu object.
- *
- * Finally, you also have to provide a desktop file describing your dynamic menu. The
- * relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the
- * library name without any extension). This desktop file has to be installed in
- * $KDEDIR/share/apps/kicker/menuext/.
- *
- * @author The kicker maintainers, Michael Goffioul <kdeprint@swing.be>
- */
-class KDEUI_EXPORT KPanelMenu : public KPopupMenu
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a KPanelMenu object. This is the normal constructor to use when
- * building extrernal menu entries.
- */
- KPanelMenu(TQWidget *parent=0, const char *name=0);
- /**
- * Constructor used internally by Kicker. You don't really want to use it.
- * @param startDir a directory to associate with this menu
- * @param parent parent object
- * @param name name of the object
- * @see path(), setPath()
- */
- KPanelMenu(const TQString &startDir, TQWidget *parent=0, const char *name=0);
- /**
- * Destructor.
- */
- virtual ~KPanelMenu();
-
- /**
- * Get the directory path associated with this menu, or TQString::null if
- * there's no such associated path.
- * @return the associated directory path
- * @see setPath()
- */
- const TQString& path() const;
- /**
- * Set a directory path to be associated with this menu.
- * @param p the directory path
- * @see path()
- */
- void setPath(const TQString &p);
- /**
- * Tell if the menu has been initialized, that is it already contains items.
- * This is useful when you need to know if you have to clear the menu, or to
- * fill it.
- * @return the initial state
- * @see setInitialized(), initialize()
- */
- bool initialized() const;
- /**
- * Set the initial state. Set it to true when you menu is filled with the items
- * you want.
- * @param on the initial state
- * @see initialized(), initialize()
- */
- void setInitialized(bool on);
-
- /**
- * Disable the automatic clearing of the menu. Kicker uses a cache system for
- * its menus. After a specific configurable delay, the menu will be cleared.
- * Use this function if you want to disable kicker's cache system, and avoid
- * the clearing of your menu.
- */
- void disableAutoClear();
-
-public slots:
- /**
- * Reinitialize the menu: the menu is first cleared, the initial state is set
- * to false, and finally #initialize() is called. Use this if you want to
- * refill your menu immediately.
- */
- void reinitialize();
- /**
- * Deinitialize the menu: the menu is cleared and the initialized state is set to
- * false. #initialize() is NOT called. It will be called before the menu is
- * next shown, however. Use this slot if you want a delayed reinitialization.
- * @since 3.1
- */
- void deinitialize();
-
-protected slots:
- /**
- * This slot is called just before the menu is shown. This allows your menu
- * to update itself if needed. However you should instead re-implement
- * #initialize to provide this feature. This function is responsible for
- * the cache system handling, so if you re-implement it, you should call
- * the base function also. Calls #initialize().
- * @see disableAutoClear()
- */
- virtual void slotAboutToShow();
- /**
- * This is slot is called when an item from the menu has been selected. Your
- * applet is then supposed to perform some action. You must re-implement this
- * function.
- * @param id the ID associated with the selected item
- */
- virtual void slotExec(int id) = 0;
- /**
- * This slots is called to initialize the menu. It is called automatically by
- * slotAboutToShow(). By re-implementing this functions, you can reconstruct
- * the menu before it is being shown. At the end of this function, you should
- * call setInitialize() with true to tell the system that the menu is OK.
- * You applet must re-implement this function.
- * @see slotAboutToShow(), initialized(), setInitialized()
- */
- virtual void initialize() = 0;
- /**
- * Clears the menu, and update the initial state accordingly.
- * @see initialized()
- */
- void slotClear();
-
-protected:
- /**
- * Re-implemented for internal reasons.
- */
- virtual void hideEvent(TQHideEvent *ev);
- /**
- * For internal use only. Used by constructors.
- */
- void init(const TQString& path = TQString::null);
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- void internalInitialize();
- KPanelMenuPrivate *d;
-};
-
-#define K_EXPORT_KICKER_MENUEXT( libname, classname ) \
- K_EXPORT_COMPONENT_FACTORY( \
- kickermenu_##libname, \
- KGenericFactory<classname>("libkickermenu_" #libname) )
-
-#endif
diff --git a/python/pykde/extra/kde353/ksharedptr.h b/python/pykde/extra/kde353/ksharedptr.h
deleted file mode 100644
index ada08413..00000000
--- a/python/pykde/extra/kde353/ksharedptr.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (c) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation.
-
- 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 KSharedPTR_H
-#define KSharedPTR_H
-
-#include "kdelibs_export.h"
-
-/**
- * Reference counting for shared objects. If you derive your object
- * from this class, then you may use it in conjunction with
- * KSharedPtr to control the lifetime of your object.
- *
- * Specifically, all classes that derive from KShared have an internal
- * counter keeping track of how many other objects have a reference to
- * their object. If used with KSharedPtr, then your object will
- * not be deleted until all references to the object have been
- * released.
- *
- * You should probably not ever use any of the methods in this class
- * directly -- let the KSharedPtr take care of that. Just derive
- * your class from KShared and forget about it.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-class KDECORE_EXPORT KShared {
-public:
- /**
- * Standard constructor. This will initialize the reference count
- * on this object to 0.
- */
- KShared() : count(0) { }
-
- /**
- * Copy constructor. This will @em not actually copy the objects
- * but it will initialize the reference count on this object to 0.
- */
- KShared( const KShared & ) : count(0) { }
-
- /**
- * Overloaded assignment operator.
- */
- KShared &operator=(const KShared & ) { return *this; }
-
- /**
- * Increases the reference count by one.
- */
- void _KShared_ref() const { count++; }
-
- /**
- * Releases a reference (decreases the reference count by one). If
- * the count goes to 0, this object will delete itself.
- */
- void _KShared_unref() const { if (!--count) delete this; }
-
- /**
- * Return the current number of references held.
- *
- * @return Number of references
- */
- int _KShared_count() const { return count; }
-
-protected:
- virtual ~KShared() { }
-private:
- mutable int count;
-};
-
-/**
- * Can be used to control the lifetime of an object that has derived
- * KShared. As long a someone holds a KSharedPtr on some KShared
- * object it won't become deleted but is deleted once its reference
- * count is 0. This struct emulates C++ pointers virtually perfectly.
- * So just use it like a simple C++ pointer.
- *
- * KShared and KSharedPtr are preferred over QShared / QSharedPtr
- * since they are more safe.
- *
- * WARNING: Please note that this class template provides an implicit
- * conversion to T*. Do *not* change this pointer or the pointee (don't
- * call delete on it, for instance) behind KSharedPtr's back.
- *
- * @author Waldo Bastian <bastian@kde.org>
- */
-template< class T >
-class KSharedPtr
-{
-public:
-/**
- * Creates a null pointer.
- */
- KSharedPtr()
- : ptr(0) { }
- /**
- * Creates a new pointer.
- * @param t the pointer
- */
- KSharedPtr( T* t )
- : ptr(t) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Copies a pointer.
- * @param p the pointer to copy
- */
- KSharedPtr( const KSharedPtr& p )
- : ptr(p.ptr) { if ( ptr ) ptr->_KShared_ref(); }
-
- /**
- * Unreferences the object that this pointer points to. If it was
- * the last reference, the object will be deleted.
- */
- ~KSharedPtr() { if ( ptr ) ptr->_KShared_unref(); }
-
- KSharedPtr<T>& operator= ( const KSharedPtr<T>& p ) {
- if ( ptr == p.ptr ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p.ptr;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- KSharedPtr<T>& operator= ( T* p ) {
- if ( ptr == p ) return *this;
- if ( ptr ) ptr->_KShared_unref();
- ptr = p;
- if ( ptr ) ptr->_KShared_ref();
- return *this;
- }
- bool operator== ( const KSharedPtr<T>& p ) const { return ( ptr == p.ptr ); }
- bool operator!= ( const KSharedPtr<T>& p ) const { return ( ptr != p.ptr ); }
- bool operator== ( const T* p ) const { return ( ptr == p ); }
- bool operator!= ( const T* p ) const { return ( ptr != p ); }
- bool operator!() const { return ( ptr == 0 ); }
- operator T*() const { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- T* data() { return ptr; }
-
- /**
- * Returns the pointer.
- * @return the pointer
- */
- const T* data() const { return ptr; }
-
- const T& operator*() const { return *ptr; }
- T& operator*() { return *ptr; }
- const T* operator->() const { return ptr; }
- T* operator->() { return ptr; }
-
- /**
- * Returns the number of references.
- * @return the number of references
- */
- int count() const { return ptr->_KShared_count(); } // for debugging purposes
-private:
- T* ptr;
-};
-
-#endif
diff --git a/python/pykde/extra/kde353/ksycocafactory.h b/python/pykde/extra/kde353/ksycocafactory.h
deleted file mode 100644
index 536da286..00000000
--- a/python/pykde/extra/kde353/ksycocafactory.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation;
- *
- * 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 __ksycocafactory_h__
-#define __ksycocafactory_h__
-
-#include "ksycocatype.h"
-#include "ksycocaentry.h"
-
-#include <tqdict.h>
-#include <tqptrlist.h>
-class KSycoca;
-class TQStringList;
-class TQString;
-class KSycocaDict;
-class KSycocaResourceList;
-
-typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
-
-/**
- * @internal
- * Base class for sycoca factories
- */
-class KDECORE_EXPORT KSycocaFactory
-{
-public:
- virtual KSycocaFactoryId factoryId() const = 0;
-
-protected: // virtual class
- /**
- * Create a factory which can be used to lookup from/create a database
- * (depending on KSycoca::isBuilding())
- */
- KSycocaFactory( KSycocaFactoryId factory_id );
-
-public:
- virtual ~KSycocaFactory();
-
- /**
- * @return the position of the factory in the sycoca file
- */
- int offset() { return mOffset; }
-
- /**
- * @return the dict, for special use by KBuildSycoca
- */
- KSycocaEntryDict * entryDict() { return m_entryDict; }
-
- /**
- * Construct an entry from a config file.
- * To be implemented in the real factories.
- */
- virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
-
- /**
- * Add an entry
- */
- virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
-
- /**
- * Remove an entry
- * Not very fast, use with care. O(N)
- */
- void removeEntry(KSycocaEntry *newEntry);
-
- /**
- * Read an entry from the database
- */
- virtual KSycocaEntry *createEntry(int offset)=0;
-
- /**
- * Get a list of all entries from the database.
- */
- KSycocaEntry::List allEntries();
-
- /**
- * Saves all entries it maintains as well as index files
- * for these entries to the stream 'str'.
- *
- * Also sets mOffset to the starting position.
- *
- * The stream is positioned at the end of the last index.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void save(TQDataStream &str);
-
- /**
- * Writes out a header to the stream 'str'.
- * The baseclass positions the stream correctly.
- *
- * Don't forget to call the parent first when you override
- * this function.
- */
- virtual void saveHeader(TQDataStream &str);
-
- /**
- * @return the resources for which this factory is responsible.
- */
- virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
-
-private:
- int mOffset;
-
-protected:
- int m_sycocaDictOffset;
- int m_beginEntryOffset;
- int m_endEntryOffset;
- TQDataStream *m_str;
-
- KSycocaResourceList *m_resourceList;
- KSycocaEntryDict *m_entryDict;
- KSycocaDict *m_sycocaDict;
-protected:
- virtual void virtual_hook( int id, void* data );
-};
-
-/** This, instead of a typedef, allows to declare "class ..." in header files
- * @internal
- */
-class KDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
-{
-public:
- KSycocaFactoryList() { }
-};
-
-#endif
diff --git a/python/pykde/extra/kde353/ktoolbarbutton.h b/python/pykde/extra/kde353/ktoolbarbutton.h
deleted file mode 100644
index eab46983..00000000
--- a/python/pykde/extra/kde353/ktoolbarbutton.h
+++ /dev/null
@@ -1,330 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
- (C) 1997, 1998 Sven Radej (radej@kde.org)
- (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
- (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
- (C) 2000 Kurt Granroth (granroth@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 version 2 as published by the Free Software Foundation.
-
- 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 _KTOOLBARBUTTON_H
-#define _KTOOLBARBUTTON_H
-
-#include <tqpixmap.h>
-#include <tqtoolbutton.h>
-#include <tqintdict.h>
-#include <tqstring.h>
-#include <kglobal.h>
-
-class KToolBar;
-class KToolBarButtonPrivate;
-class KInstance;
-class TQEvent;
-class TQPopupMenu;
-class TQPainter;
-
-/**
- * A toolbar button. This is used internally by KToolBar, use the
- * KToolBar methods instead.
- * @internal
- */
-class KDEUI_EXPORT KToolBarButton : public QToolButton
-{
- Q_OBJECT
-
-public:
- /**
- * Construct a button with an icon loaded by the button itself.
- * This will trust the button to load the correct icon with the
- * correct size.
- *
- * @param icon Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- * @param _instance the instance to use for this button
- */
- KToolBarButton(const TQString& icon, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null,
- KInstance *_instance = KGlobal::instance());
-
- /**
- * Construct a button with an existing pixmap. It is not
- * recommended that you use this as the internal icon loading code
- * will almost always get it "right".
- *
- * @param pixmap Name of icon to load (may be absolute or relative)
- * @param id Id of this button
- * @param parent This button's parent
- * @param name This button's internal name
- * @param txt This button's text (in a tooltip or otherwise)
- */
- KToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
- const char *name=0L, const TQString &txt=TQString::null);
-
- /**
- * Construct a separator button
- *
- * @param parent This button's parent
- * @param name This button's internal name
- */
- KToolBarButton(TQWidget *parent=0L, const char *name=0L);
-
- /**
- * Standard destructor
- */
- ~KToolBarButton();
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the pixmap directly for this button. This pixmap should be
- * the active one... the dimmed and disabled pixmaps are constructed
- * based on this one. However, don't use this function unless you
- * are positive that you don't want to use setIcon.
- *
- * @param pixmap The active pixmap
- */
- // this one is from TQButton, so #ifdef-ing it out doesn't break BC
- virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap as the default one rather
- * then generating it using effects.
- *
- * @param pixmap The pixmap to use as the default (normal) one
- */
- void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this pixmap when disabled one rather then
- * generating it using effects.
- *
- * @param pixmap The pixmap to use when disabled
- */
- void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED;
-#endif
-
- /**
- * Set the text for this button. The text will be either used as a
- * tooltip (IconOnly) or will be along side the icon
- *
- * @param text The button (or tooltip) text
- */
- virtual void setText(const TQString &text);
-
- /**
- * Set the icon for this button. The icon will be loaded internally
- * with the correct size. This function is preferred over setIconSet
- *
- * @param icon The name of the icon
- */
- virtual void setIcon(const TQString &icon);
-
- /// @since 3.1
- virtual void setIcon( const TQPixmap &pixmap )
- { TQToolButton::setIcon( pixmap ); }
-
- /**
- * Set the pixmaps for this toolbar button from a TQIconSet.
- * If you call this you don't need to call any of the other methods
- * that set icons or pixmaps.
- * @param iconset The iconset to use
- */
- virtual void setIconSet( const TQIconSet &iconset );
-
-#ifndef KDE_NO_COMPAT
- /**
- * @deprecated
- * Set the active icon for this button. The pixmap itself is loaded
- * internally based on the icon size... .. the disabled and default
- * pixmaps, however will only be constructed if generate is
- * true. This function is preferred over setPixmap
- *
- * @param icon The name of the active icon
- * @param generate If true, then the other icons are automagically
- * generated from this one
- */
- KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
-
- /**
- * @deprecated
- * Force the button to use this icon as the default one rather
- * then generating it using effects.
- *
- * @param icon The icon to use as the default (normal) one
- */
- void setDefaultIcon(const TQString& icon) KDE_DEPRECATED;
-
- /**
- * @deprecated
- * Force the button to use this icon when disabled one rather then
- * generating it using effects.
- *
- * @param icon The icon to use when disabled
- */
- void setDisabledIcon(const TQString& icon) KDE_DEPRECATED;
-#endif
-
- /**
- * Turn this button on or off
- *
- * @param flag true or false
- */
- void on(bool flag = true);
-
- /**
- * Toggle this button
- */
- void toggle();
-
- /**
- * Turn this button into a toggle button or disable the toggle
- * aspects of it. This does not toggle the button itself.
- * Use toggle() for that.
- *
- * @param toggle true or false
- */
- void setToggle(bool toggle = true);
-
- /**
- * Return a pointer to this button's popup menu (if it exists)
- */
- TQPopupMenu *popup();
-
- /**
- * Returns the button's id.
- * @since 3.2
- */
- int id() const;
-
- /**
- * Give this button a popup menu. There will not be a delay when
- * you press the button. Use setDelayedPopup if you want that
- * behavior.
- *
- * @param p The new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setPopup (TQPopupMenu *p, bool unused = false);
-
- /**
- * Gives this button a delayed popup menu.
- *
- * This function allows you to add a delayed popup menu to the button.
- * The popup menu is then only displayed when the button is pressed and
- * held down for about half a second.
- *
- * @param p the new popup menu
- * @param unused Has no effect - ignore it.
- */
- void setDelayedPopup(TQPopupMenu *p, bool unused = false);
-
- /**
- * Turn this button into a radio button
- *
- * @param f true or false
- */
- void setRadio(bool f = true);
-
- /**
- * Toolbar buttons naturally will assume the global styles
- * concerning icons, icons sizes, etc. You can use this function to
- * explicitly turn this off, if you like.
- *
- * @param no_style Will disable styles if true
- */
- void setNoStyle(bool no_style = true);
-
-signals:
- /**
- * Emitted when the toolbar button is clicked (with LMB or MMB)
- */
- void clicked(int);
- /**
- * Emitted when the toolbar button is clicked (with any mouse button)
- * @param state makes it possible to find out which button was pressed,
- * and whether any keyboard modifiers were held.
- * @since 3.4
- */
- void buttonClicked(int, Qt::ButtonState state);
- void doubleClicked(int);
- void pressed(int);
- void released(int);
- void toggled(int);
- void highlighted(int, bool);
-
-public slots:
- /**
- * This slot should be called whenever the toolbar mode has
- * potentially changed. This includes such events as text changing,
- * orientation changing, etc.
- */
- void modeChange();
- virtual void setTextLabel(const TQString&, bool tipToo);
-
-protected:
- bool event(TQEvent *e);
- void paletteChange(const TQPalette &);
- void leaveEvent(TQEvent *e);
- void enterEvent(TQEvent *e);
- void drawButton(TQPainter *p);
- bool eventFilter (TQObject *o, TQEvent *e);
- /// @since 3.4
- void mousePressEvent( TQMouseEvent * );
- /// @since 3.4
- void mouseReleaseEvent( TQMouseEvent * );
- void showMenu();
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
- TQSize minimumSize() const;
-
- /// @since 3.1
- bool isRaised() const;
- /// @since 3.1
- bool isActive() const;
- /// @since 3.1
- int iconTextMode() const;
-
-protected slots:
- void slotClicked();
- void slotPressed();
- void slotReleased();
- void slotToggled();
- void slotDelayTimeout();
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- KToolBarButtonPrivate *d;
-};
-
-/**
-* List of KToolBarButton objects.
-* @internal
-* @version $Id: ktoolbarbutton.h 465272 2005-09-29 09:47:40Z mueller $
-*/
-class KDEUI_EXPORT KToolBarButtonList : public TQIntDict<KToolBarButton>
-{
-public:
- KToolBarButtonList();
- ~KToolBarButtonList() {}
-};
-
-#endif
diff --git a/python/pykde/extra/kde353/kurifilter.h b/python/pykde/extra/kde353/kurifilter.h
deleted file mode 100644
index 47332947..00000000
--- a/python/pykde/extra/kde353/kurifilter.h
+++ /dev/null
@@ -1,647 +0,0 @@
-/*
- * This file is part of the KDE libraries
- * Copyright (C) 2000-2001,2003 Dawit Alemayehu <adawit at kde.org>
- *
- * Original author
- * Copyright (C) 2000 Yves Arrouye <yves@realnames.com>
- *
- *
- * 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 __kurifilter_h__
-#define __kurifilter_h__
-
-#include <tqptrlist.h>
-#include <tqobject.h>
-#include <tqstringlist.h>
-
-#include <kurl.h>
-
-#ifdef Q_OS_WIN
-#undef ERROR
-#endif
-
-class KURIFilterPrivate;
-class KURIFilterDataPrivate;
-
-class KCModule;
-
-/**
-* A basic message object used for exchanging filtering
-* information between the filter plugins and the application
-* requesting the filtering service.
-*
-* Use this object if you require a more detailed information
-* about the URI you want to filter. Any application can create
-* an instance of this class and send it to KURIFilter to
-* have the plugins fill out all possible information about the
-* URI.
-*
-* \b Example
-*
-* \code
-* TQString text = "kde.org";
-* KURIFilterData d = text;
-* bool filtered = KURIFilter::self()->filter( d );
-* cout << "URL: " << text.latin1() << endl
-* << "Filtered URL: " << d.uri().url().latin1() << endl
-* << "URI Type: " << d.uriType() << endl
-* << "Was Filtered: " << filtered << endl;
-* \endcode
-*
-* The above code should yield the following output:
-* \code
-* URI: kde.org
-* Filtered URI: http://kde.org
-* URI Type: 0 <== means NET_PROTOCOL
-* Was Filtered: 1 <== means the URL was successfully filtered
-* \endcode
-*
-* @short A message object for exchanging filtering URI info.
-* @author Dawit Alemayehu <adawit at kde.org>
-*/
-
-class KIO_EXPORT KURIFilterData
-{
-friend class KURIFilterPlugin;
-
-public:
- /**
- * Describes the type of the URI that was filtered.
- * Here is a brief description of the types:
- *
- * @li NET_PROTOCOL - Any network protocol: http, ftp, nttp, pop3, etc...
- * @li LOCAL_FILE - A local file whose executable flag is not set
- * @li LOCAL_DIR - A local directory
- * @li EXECUTABLE - A local file whose executable flag is set
- * @li HELP - A man or info page
- * @li SHELL - A shell executable (ex: echo "Test..." >> ~/testfile)
- * @li BLOCKED - A URI that should be blocked/filtered (ex: ad filtering)
- * @li ERROR - An incorrect URI (ex: "~johndoe" when user johndoe
- * does not exist in that system )
- * @li UNKNOWN - A URI that is not identified. Default value when
- * a KURIFilterData is first created.
- */
- enum URITypes { NET_PROTOCOL=0, LOCAL_FILE, LOCAL_DIR, EXECUTABLE, HELP, SHELL, BLOCKED, ERROR, UNKNOWN };
-
- /**
- * Default constructor.
- *
- * Creates a URIFilterData object.
- */
- KURIFilterData() { init(); }
-
- /**
- * Creates a URIFilterData object from the given URL.
- *
- * @param url is the URL to be filtered.
- */
- KURIFilterData( const KURL& url ) { init( url); }
-
- /**
- * Creates a URIFilterData object from the given string.
- *
- * @param url is the string to be filtered.
- */
- KURIFilterData( const TQString& url ) { init( url ); }
-
- /**
- * Copy constructor.
- *
- * Creates a URIFilterData object from another
- * URI filter data object.
- *
- * @param data the uri filter data to be copied.
- */
- KURIFilterData( const KURIFilterData& data);
-
- /**
- * Destructor.
- */
- ~KURIFilterData();
-
- /**
- * This method has been deprecated and will always return
- * true. You should instead use the result from the
- * KURIFilter::filterURI() calls.
- *
- * @deprecated
- */
- KDE_DEPRECATED bool hasBeenFiltered() const { return true; }
-
- /**
- * Returns the filtered or the original URL.
- *
- * This function returns the filtered url if one
- * of the plugins successfully filtered the original
- * URL. Otherwise, it returns the original URL.
- * See hasBeenFiltered() and
- *
- * @return the filtered or original url.
- */
- KURL uri() const { return m_pURI; }
-
- /**
- * Returns an error message.
- *
- * This functions returns the error message set
- * by the plugin whenever the uri type is set to
- * KURIFilterData::ERROR. Otherwise, it returns
- * a TQString::null.
- *
- * @return the error message or a NULL when there is none.
- */
- TQString errorMsg() const { return m_strErrMsg; }
-
- /**
- * Returns the URI type.
- *
- * This method always returns KURIFilterData::UNKNOWN
- * if the given URL was not filtered.
- * @return the type of the URI
- */
- URITypes uriType() const { return m_iType; }
-
- /**
- * Sets the URL to be filtered.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the string to be filtered.
- */
- void setData( const TQString& url ) { init( url ); }
-
- /**
- * Same as above except the argument is a URL.
- *
- * Use this function to set the string to be
- * filtered when you construct an empty filter
- * object.
- *
- * @param url the URL to be filtered.
- */
- void setData( const KURL& url ) { init( url ); }
-
- /**
- * Sets the absolute path to be used whenever the supplied
- * data is a relative local URL.
- *
- * NOTE: This function should only be used for local resources,
- * i.e. the "file:/" protocol. It is useful for specifying the
- * absolute path in cases where the actual URL might be relative.
- * meta object. If deriving the path from a KURL, make sure you
- * set the argument for this function to the result of calling
- * path () instead of url ().
- *
- * @param abs_path the abolute path to the local resource.
- * @return true if absolute path is successfully set. Otherwise, false.
- */
- bool setAbsolutePath( const TQString& abs_path );
-
- /**
- * Returns the absolute path if one has already been set.
- * @return the absolute path, or TQString::null
- * @see hasAbsolutePath()
- */
- TQString absolutePath() const;
-
- /**
- * Checks whether the supplied data had an absolute path.
- * @return true if the supplied data has an absolute path
- * @see absolutePath()
- */
- bool hasAbsolutePath() const;
-
- /**
- * Returns the command line options and arguments for a
- * local resource when present.
- *
- * @return options and arguments when present, otherwise TQString::null
- */
- TQString argsAndOptions() const;
-
- /**
- * Checks whether the current data is a local resource with
- * command line options and arguments.
- * @return true if the current data has command line options and arguments
- */
- bool hasArgsAndOptions() const;
-
- /**
- * Returns the name of the icon that matches
- * the current filtered URL.
- *
- * NOTE that this function will return a NULL
- * string by default and when no associated icon
- * is found.
- *
- * @return the name of the icon associated with the resource,
- * or TQString::null if not found
- */
- TQString iconName();
-
- /**
- * Check whether the provided uri is executable or not.
- *
- * Setting this to false ensures that typing the name of
- * an executable does not start that application. This is
- * useful in the location bar of a browser. The default
- * value is true.
- *
- * @since 3.2
- */
- void setCheckForExecutables (bool check);
-
- /**
- * @return true if the filters should attempt to check whether the
- * supplied uri is an executable. False otherwise.
- *
- * @since 3.2
- */
- bool checkForExecutables() const { return m_bCheckForExecutables; }
-
- /**
- * @return the string as typed by the user, before any URL processing is done
- * @since 3.2
- */
- TQString typedString() const;
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a KURL
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const KURL& url ) { init( url ); return *this; }
-
- /**
- * Overloaded assigenment operator.
- *
- * This function allows you to easily assign a QString
- * to a KURIFilterData object.
- *
- * @return an instance of a KURIFilterData object.
- */
- KURIFilterData& operator=( const TQString& url ) { init( url ); return *this; }
-
-protected:
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const KURL& url);
-
- /**
- * Initializes the KURIFilterData on construction.
- * @param url the URL to initialize the object with
- */
- void init( const TQString& url = TQString::null );
-
-private:
- bool m_bCheckForExecutables;
- bool m_bChanged;
-
- TQString m_strErrMsg;
- TQString m_strIconName;
-
- KURL m_pURI;
- URITypes m_iType;
- KURIFilterDataPrivate *d;
-};
-
-
-/**
- * Base class for URI filter plugins.
- *
- * This class applies a single filter to a URI. All plugins designed
- * to provide URI filtering service should inherit from this abstract
- * class and provide a concrete implementation.
- *
- * All inheriting classes need to implement the pure virtual function
- * filterURI.
- *
- * @short Abstract class for URI filter plugins.
- */
-class KIO_EXPORT KURIFilterPlugin : public QObject
-{
- Q_OBJECT
-
-public:
-
- /**
- * Constructs a filter plugin with a given name and
- * priority.
- *
- * @param parent the parent object, or 0 for no parent
- * @param name the name of the plugin, or 0 for no name
- * @param pri the priority of the plugin.
- */
- KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
-
- /**
- * Returns the filter's name.
- *
- * @return A string naming the filter.
- */
- virtual TQString name() const { return m_strName; }
-
- /**
- * Returns the filter's priority.
- *
- * Each filter has an assigned priority, a float from 0 to 1. Filters
- * with the lowest priority are first given a chance to filter a URI.
- *
- * @return The priority of the filter.
- */
- virtual double priority() const { return m_dblPriority; }
-
- /**
- * Filters a URI.
- *
- * @param data the URI data to be filtered.
- * @return A boolean indicating whether the URI has been changed.
- */
- virtual bool filterURI( KURIFilterData& data ) const = 0;
-
- /**
- * Creates a configuration module for the filter.
- *
- * It is the responsibility of the caller to delete the module
- * once it is not needed anymore.
- *
- * @return A configuration module, 0 if the filter isn't configurable.
- */
- virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
-
- /**
- * Returns the name of the configuration module for the filter.
- *
- * @return the name of a configuration module or TQString::null if none.
- */
- virtual TQString configName() const { return name(); }
-
-protected:
-
- /**
- * Sets the the URL in @p data to @p uri.
- */
- void setFilteredURI ( KURIFilterData& data, const KURL& uri ) const;
-
- /**
- * Sets the error message in @p data to @p errormsg.
- */
- void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
- data.m_strErrMsg = errmsg;
- }
-
- /**
- * Sets the URI type in @p data to @p type.
- */
- void setURIType ( KURIFilterData& data, KURIFilterData::URITypes type) const {
- data.m_iType = type;
- data.m_bChanged = true;
- }
-
- /**
- * Sets the arguments and options string in @p data
- * to @p args if any were found during filterting.
- */
- void setArguments( KURIFilterData& data, const TQString& args ) const;
-
- TQString m_strName;
- double m_dblPriority;
-
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KURIFilterPluginPrivate *d;
-};
-
-
-/**
- * A list of filter plugins.
- */
-class KIO_EXPORT KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
-{
-public:
- virtual int compareItems(Item a, Item b)
- {
- double diff = ((KURIFilterPlugin *) a)->priority() - ((KURIFilterPlugin *) b)->priority();
- return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
- }
-
-private:
- KURIFilterPrivate *d;
-
-};
-
-/**
- * Manages the filtering of URIs.
- *
- * The intention of this plugin class is to allow people to extend the
- * functionality of KURL without modifying it directly. This way KURL will
- * remain a generic parser capable of parsing any generic URL that adheres
- * to specifications.
- *
- * The KURIFilter class applies a number of filters to a URI and returns the
- * filtered version whenever possible. The filters are implemented using
- * plugins to provide easy extensibility of the filtering mechanism. New
- * filters can be added in the future by simply inheriting from
- * KURIFilterPlugin and implementing the KURIFilterPlugin::filterURI
- * method.
- *
- * Use of this plugin-manager class is straight forward. Since it is a
- * singleton object, all you have to do is obtain an instance by doing
- * @p KURIFilter::self() and use any of the public member functions to
- * preform the filtering.
- *
- * \b Example
- *
- * To simply filter a given string:
- *
- * \code
- * bool filtered = KURIFilter::self()->filterURI( "kde.org" );
- * \endcode
- *
- * You can alternatively use a KURL:
- *
- * \code
- * KURL url = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( url );
- * \endcode
- *
- * If you have a constant string or a constant URL, simply invoke the
- * corresponding function to obtain the filtered string or URL instead
- * of a boolean flag:
- *
- * \code
- * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
- * \endcode
- *
- * You can also restrict the filter(s) to be used by supplying
- * the name of the filter(s) to use. By defualt all available
- * filters will be used. To use specific filters, add the names
- * of the filters you want to use to a TQStringList and invoke
- * the appropriate filtering function. The examples below show
- * the use of specific filters. The first one uses a single
- * filter called kshorturifilter while the second example uses
- * multiple filters:
- *
- * \code
- * TQString text = "kde.org";
- * bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
- * \endcode
- *
- * \code
- * TQStringList list;
- * list << "kshorturifilter" << "localdomainfilter";
- * bool filtered = KURIFilter::self()->filterURI( text, list );
- * \endcode
- *
- * KURIFilter also allows richer data exchange through a simple
- * meta-object called @p KURIFilterData. Using this meta-object
- * you can find out more information about the URL you want to
- * filter. See KURIFilterData for examples and details.
- *
- * @short Filters a given URL into its proper format whenever possible.
- */
-
-class KIO_EXPORT KURIFilter
-{
-public:
- /**
- * Destructor
- */
- ~KURIFilter ();
-
- /**
- * Returns an instance of KURIFilter.
- */
- static KURIFilter* self();
-
- /**
- * Filters the URI given by the object URIFilterData.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param data object that contains the URI to be filtered.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters the URI given by the URL.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Filters a string representing a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return a boolean indicating whether the URI has been changed
- */
- bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Returns the filtered URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri The URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return a filtered string representation of a URI.
- *
- * The given URL is filtered based on the specified list of filters.
- * If the list is empty all available filters would be used.
- *
- * @param uri the URI to filter.
- * @param filters specify the list of filters to be used.
- *
- * @return the filtered URI or null if it cannot be filtered
- */
- TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
-
- /**
- * Return an iterator to iterate over all loaded
- * plugins.
- *
- * @return a plugin iterator.
- */
- TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
-
- /**
- * Return a list of the names of all loaded plugins.
- *
- * @return a TQStringList of plugin names
- * @since 3.1
- */
- TQStringList pluginNames() const;
-
-protected:
-
- /**
- * A protected constructor.
- *
- * This constructor creates a KURIFilter and
- * initializes all plugins it can find by invoking
- * loadPlugins.
- */
- KURIFilter();
-
- /**
- * Loads all allowed plugins.
- *
- * This function loads all filters that have not
- * been disbled.
- */
- void loadPlugins();
-
-private:
- static KURIFilter *s_self;
- KURIFilterPluginList m_lstPlugins;
- KURIFilterPrivate *d;
-};
-
-#endif