From 3133bbc63a2d32dac638db58fa13e966488e88b5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 15 Feb 2010 18:23:18 +0000 Subject: Added abandoned KDE3 version of kchmviewer git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kchmviewer@1090662 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/kde-qt.h | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 src/kde-qt.h (limited to 'src/kde-qt.h') diff --git a/src/kde-qt.h b/src/kde-qt.h new file mode 100644 index 0000000..58ee4a1 --- /dev/null +++ b/src/kde-qt.h @@ -0,0 +1,148 @@ +/*************************************************************************** + * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com * + * Please do not use email address above for bug reports; see * + * the README file * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef KDE_QT_H +#define KDE_QT_H + +#include "config.h" + +#if defined (USE_KDE) + + #define KQ_CLASSNAME(name) K##name + #define KQ_DECLARECLASS(name) class KQ##name : public K##name + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + +#else /* !USE_KDE */ + + #define KQ_CLASSNAME(name) Q##name + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + #define i18n(A) tr(A) + +#endif /* USE_KDE */ + +/* common non-wrapped UI classes */ +#include +#include +#include +#include +#include +#include +#include +#include + +/* common utility classes */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class KQMainWindow : public KQ_CLASSNAME(MainWindow) +{ +public: + KQMainWindow ( QWidget * parent, const char * name, WFlags f ) + : KQ_CLASSNAME(MainWindow) (parent, name, f) {}; +}; + + +class KQListView : public KQ_CLASSNAME(ListView) +{ +public: + KQListView(QWidget *parent = 0, const char *name = 0, int f = 0); +}; + + +class KQProgressModalDialog : public KQ_CLASSNAME(ProgressDialog) +{ + public: + KQProgressModalDialog ( const QString & captionText, const QString & labelText, const QString & cancelButtonText, int totalSteps, QWidget * creator = 0 ); + + // Seems like people have fun making classes incompatible +#if defined (USE_KDE) + void setTotalSteps( int totalSteps ) { progressBar ()->setTotalSteps( totalSteps ); } + void setProgress( int progress ) { progressBar ()->setProgress( progress ); } +#else + bool wasCancelled() { return wasCanceled(); } +#endif +}; + +class KQTabWidget : public KQ_CLASSNAME(TabWidget) +{ +public: + KQTabWidget (QWidget *parent = 0, const char *name = 0, int f = 0) + : KQ_CLASSNAME(TabWidget) (parent, name, f) {}; +}; + +class KQPopupMenu : public KQ_CLASSNAME(PopupMenu) +{ +public: + KQPopupMenu (QWidget *parent = 0 ) + : KQ_CLASSNAME(PopupMenu) (parent) {}; +}; + +#include +#include +#include +#include +#include +#include +#include +#include + + +class KCHMShowWaitCursor +{ + public: + KCHMShowWaitCursor() { QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); } + ~KCHMShowWaitCursor() { QApplication::restoreOverrideCursor(); } +}; + + +#endif /* KDE_QT_H */ -- cgit v1.2.3