From a410cb031faef27b87337dbd2600083add7dce97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 4 Jun 2019 12:34:06 +0200 Subject: Rename tqt-kde integration to tqt-tde. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- src/kernel/ntqt.h | 2 +- src/kernel/qt_x11.pri | 4 +- src/kernel/tqtkdeintegration_x11.cpp | 240 ----------------------------------- src/kernel/tqtkdeintegration_x11_p.h | 62 --------- src/kernel/tqttdeintegration_x11.cpp | 240 +++++++++++++++++++++++++++++++++++ src/kernel/tqttdeintegration_x11_p.h | 62 +++++++++ 6 files changed, 305 insertions(+), 305 deletions(-) delete mode 100644 src/kernel/tqtkdeintegration_x11.cpp delete mode 100644 src/kernel/tqtkdeintegration_x11_p.h create mode 100644 src/kernel/tqttdeintegration_x11.cpp create mode 100644 src/kernel/tqttdeintegration_x11_p.h (limited to 'src/kernel') diff --git a/src/kernel/ntqt.h b/src/kernel/ntqt.h index e4fc40a67..73b7ae48b 100644 --- a/src/kernel/ntqt.h +++ b/src/kernel/ntqt.h @@ -314,7 +314,7 @@ #ifdef Q_WS_X11 -#include "private/tqtkdeintegration_x11_p.h" +#include "private/tqttdeintegration_x11_p.h" #endif #ifdef Q_WS_MAC diff --git a/src/kernel/qt_x11.pri b/src/kernel/qt_x11.pri index 20d65b104..c81055eb3 100644 --- a/src/kernel/qt_x11.pri +++ b/src/kernel/qt_x11.pri @@ -11,8 +11,8 @@ unix { SOURCES += $$KERNEL_CPP/qtaddons_x11.cpp PRECOMPILED_HEADER = kernel/qt_pch.h - SOURCES += $$KERNEL_CPP/tqtkdeintegration_x11.cpp - HEADERS += $$KERNEL_H/tqtkdeintegration_x11_p.h + SOURCES += $$KERNEL_CPP/tqttdeintegration_x11.cpp + HEADERS += $$KERNEL_H/tqttdeintegration_x11_p.h } nas { diff --git a/src/kernel/tqtkdeintegration_x11.cpp b/src/kernel/tqtkdeintegration_x11.cpp deleted file mode 100644 index 9292d0bb2..000000000 --- a/src/kernel/tqtkdeintegration_x11.cpp +++ /dev/null @@ -1,240 +0,0 @@ -/* This file is licensed under the terms of the GPL v2 or v3, as it has been publicly released by - OpenSUSE as part of their GPLed TQt library disribution */ - -#include "tqtkdeintegration_x11_p.h" - -#include -#include -#include -#include -#include -#include -#include - -bool TQKDEIntegration::inited = false; -bool TQKDEIntegration::enable = false; - -bool TQKDEIntegration::enabled() - { - if( !inited ) - initLibrary(); - return enable; - } - -static TQCString findLibrary() - { - if( getenv( "TQT_NO_KDE_INTEGRATION" ) == NULL - || getenv( "TQT_NO_KDE_INTEGRATION" )[ 0 ] == '0' ) - { - return TQCString() + tqInstallPathPlugins() + "/integration/libtqtkde"; - } - return ""; - } - -inline static long widgetToWinId( const TQWidget* w ) - { - return w != NULL ? w->winId() : 0; - } - -inline static TQFont fontPtrToFontRef( const TQFont* f ) - { - return f != NULL ? *f : TQFont(); - } - -// --- -static bool (*tqtkde_initializeIntegration)( ); -static TQStringList (*tqtkde_getOpenFileNames)( const TQString& filter, TQString* workingDirectory, - long parent, const TQCString& name, const TQString& caption, TQString* selectedFilter, - bool multiple ); -static TQString (*tqtkde_getSaveFileName)( const TQString& initialSelection, const TQString& filter, - TQString* workingDirectory, long parent, const TQCString& name, const TQString& caption, - TQString* selectedFilter ); -static TQString (*tqtkde_getExistingDirectory)( const TQString& initialDirectory, long parent, - const TQCString& name, const TQString& caption ); -static TQColor (*tqtkde_getColor)( const TQColor& color, long parent, const TQCString& name ); -static TQFont (*tqtkde_getFont)( bool* ok, const TQFont& def, long parent, const TQCString& name ); -static int (*tqtkde_messageBox1)( int type, long parent, const TQString& caption, const TQString& text, - int button0, int button1, int button2 ); -static int (*tqtkde_messageBox2)( int type, long parent, const TQString& caption, const TQString& text, - const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, - int defaultButton, int escapeButton ); - -void TQKDEIntegration::initLibrary() - { - if( !inited ) - { - enable = false; - inited = true; - TQString libpath = findLibrary(); - if( libpath.isEmpty()) - return; - TQLibrary lib( libpath ); - lib.setAutoUnload( false ); - tqtkde_initializeIntegration = ( - bool (*)( ) - ) - lib.resolve("initializeIntegration"); - if( tqtkde_initializeIntegration == NULL ) - return; - tqtkde_getOpenFileNames = ( - TQStringList (*)( const TQString& filter, TQString* workingDirectory, long parent, - const TQCString& name, const TQString& caption, TQString* selectedFilter, - bool multiple ) - ) - lib.resolve("getOpenFileNames"); - if( tqtkde_getOpenFileNames == NULL ) - return; - tqtkde_getSaveFileName = ( - TQString (*)( const TQString& initialSelection, const TQString& filter, TQString* workingDirectory, - long parent, const TQCString& name, const TQString& caption, TQString* selectedFilter ) - ) - lib.resolve("getSaveFileName"); - if( tqtkde_getSaveFileName == NULL ) - return; - tqtkde_getExistingDirectory = ( - TQString (*)( const TQString& initialDirectory, long parent, const TQCString& name, - const TQString& caption ) - ) - lib.resolve("getExistingDirectory"); - if( tqtkde_getExistingDirectory == NULL ) - return; - tqtkde_getColor = ( - TQColor (*)( const TQColor& color, long parent, const TQCString& name ) - ) - lib.resolve("getColor"); - if( tqtkde_getColor == NULL ) - return; - tqtkde_getFont = ( - TQFont (*)( bool* ok, const TQFont& def, long parent, const TQCString& name ) - ) - lib.resolve("getFont"); - if( tqtkde_getFont == NULL ) - return; - tqtkde_messageBox1 = ( - int (*)( int type, long parent, const TQString& caption, const TQString& text, - int button0, int button1, int button2 ) - ) - lib.resolve("messageBox1"); - if( tqtkde_messageBox1 == NULL ) - return; - tqtkde_messageBox2 = ( - int (*)( int type, long parent, const TQString& caption, const TQString& text, - const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, - int defaultButton, int escapeButton ) - ) - lib.resolve("messageBox2"); - if( tqtkde_messageBox2 == NULL ) - return; - enable = tqtkde_initializeIntegration(); - } - } - -bool TQKDEIntegration::initializeIntegration( ) - { - return tqtkde_initializeIntegration( - ); - } -TQStringList TQKDEIntegration::getOpenFileNames( const TQString& filter, TQString* workingDirectory, - TQWidget* parent, const char* name, const TQString& caption, TQString* selectedFilter, - bool multiple ) - { - return tqtkde_getOpenFileNames( - filter, workingDirectory, widgetToWinId( parent ), name, caption, selectedFilter, multiple ); - } -TQString TQKDEIntegration::getSaveFileName( const TQString& initialSelection, const TQString& filter, - TQString* workingDirectory, TQWidget* parent, const char* name, const TQString& caption, - TQString* selectedFilter ) - { - return tqtkde_getSaveFileName( - initialSelection, filter, workingDirectory, widgetToWinId( parent ), name, caption, selectedFilter ); - } -TQString TQKDEIntegration::getExistingDirectory( const TQString& initialDirectory, TQWidget* parent, - const char* name, const TQString& caption ) - { - return tqtkde_getExistingDirectory( - initialDirectory, widgetToWinId( parent ), name, caption ); - } -TQColor TQKDEIntegration::getColor( const TQColor& color, TQWidget* parent, const char* name ) - { - return tqtkde_getColor( - color, widgetToWinId( parent ), name ); - } -TQFont TQKDEIntegration::getFont( bool* ok, const TQFont* def, TQWidget* parent, const char* name ) - { - return tqtkde_getFont( - ok, fontPtrToFontRef( def ), widgetToWinId( parent ), name ); - } -int TQKDEIntegration::messageBox1( int type, TQWidget* parent, const TQString& caption, - const TQString& text, int button0, int button1, int button2 ) - { - return tqtkde_messageBox1( - type, widgetToWinId( parent ), caption, text, button0, button1, button2 ); - } -int TQKDEIntegration::messageBox2( int type, TQWidget* parent, const TQString& caption, - const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, - int defaultButton, int escapeButton ) - { - return tqtkde_messageBox2( - type, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); - } -// --- - -int TQKDEIntegration::information( TQWidget* parent, const TQString& caption, - const TQString& text, int button0, int button1, int button2 ) - { - return tqtkde_messageBox1( - TQMessageBox::Information, widgetToWinId( parent ), caption, text, button0, button1, button2 ); - } - -int TQKDEIntegration::question( TQWidget* parent, const TQString& caption, - const TQString& text, int button0, int button1, int button2 ) - { - return tqtkde_messageBox1( - TQMessageBox::Question, widgetToWinId( parent ), caption, text, button0, button1, button2 ); - } - -int TQKDEIntegration::warning( TQWidget* parent, const TQString& caption, - const TQString& text, int button0, int button1, int button2 ) - { - return tqtkde_messageBox1( - TQMessageBox::Warning, widgetToWinId( parent ), caption, text, button0, button1, button2 ); - } - -int TQKDEIntegration::critical( TQWidget* parent, const TQString& caption, - const TQString& text, int button0, int button1, int button2 ) - { - return tqtkde_messageBox1( - TQMessageBox::Critical, widgetToWinId( parent ), caption, text, button0, button1, button2 ); - } - -int TQKDEIntegration::information( TQWidget* parent, const TQString& caption, - const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, - int defaultButton, int escapeButton ) - { - return tqtkde_messageBox2( - TQMessageBox::Information, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); - } - -int TQKDEIntegration::question( TQWidget* parent, const TQString& caption, - const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, - int defaultButton, int escapeButton ) - { - return tqtkde_messageBox2( - TQMessageBox::Question, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); - } - -int TQKDEIntegration::warning( TQWidget* parent, const TQString& caption, - const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, - int defaultButton, int escapeButton ) - { - return tqtkde_messageBox2( - TQMessageBox::Warning, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); - } - -int TQKDEIntegration::critical( TQWidget* parent, const TQString& caption, - const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, - int defaultButton, int escapeButton ) - { - return tqtkde_messageBox2( - TQMessageBox::Critical, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); - } diff --git a/src/kernel/tqtkdeintegration_x11_p.h b/src/kernel/tqtkdeintegration_x11_p.h deleted file mode 100644 index 10ee4443b..000000000 --- a/src/kernel/tqtkdeintegration_x11_p.h +++ /dev/null @@ -1,62 +0,0 @@ -/* This file is licensed under the terms of the GPL v2 or v3, as it has been publicly released by - OpenSUSE as part of their GPLed TQt library disribution */ - -#ifndef TQKDEINTEGRATION_H -#define TQKDEINTEGRATION_H - -#include - -class TQLibrary; -class TQWidget; -class TQColor; -class TQFont; - -class TQKDEIntegration - { - public: - static bool enabled(); -// --- - static bool initializeIntegration( ); - static TQStringList getOpenFileNames( const TQString& filter, TQString* workingDirectory, - TQWidget* parent, const char* name, const TQString& caption, TQString* selectedFilter, - bool multiple ); - static TQString getSaveFileName( const TQString& initialSelection, const TQString& filter, - TQString* workingDirectory, TQWidget* parent, const char* name, const TQString& caption, - TQString* selectedFilter ); - static TQString getExistingDirectory( const TQString& initialDirectory, TQWidget* parent, - const char* name, const TQString& caption ); - static TQColor getColor( const TQColor& color, TQWidget* parent, const char* name ); - static TQFont getFont( bool* ok, const TQFont* def, TQWidget* parent, const char* name ); - static int messageBox1( int type, TQWidget* parent, const TQString& caption, - const TQString& text, int button0, int button1, int button2 ); - static int information( TQWidget* parent, const TQString& caption, const TQString& text, - int button0, int button1, int button2 ); - static int question( TQWidget* parent, const TQString& caption, const TQString& text, - int button0, int button1, int button2 ); - static int warning( TQWidget* parent, const TQString& caption, const TQString& text, - int button0, int button1, int button2 ); - static int critical( TQWidget* parent, const TQString& caption, const TQString& text, - int button0, int button1, int button2 ); - static int messageBox2( int type, TQWidget* parent, const TQString& caption, - const TQString& text, const TQString& button0Text, const TQString& button1Text, - const TQString& button2Text, int defaultButton, int escapeButton ); - static int information( TQWidget* parent, const TQString& caption, const TQString& text, - const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, - int defaultButton, int escapeButton ); - static int question( TQWidget* parent, const TQString& caption, const TQString& text, - const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, - int defaultButton, int escapeButton ); - static int warning( TQWidget* parent, const TQString& caption, const TQString& text, - const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, - int defaultButton, int escapeButton ); - static int critical( TQWidget* parent, const TQString& caption, const TQString& text, - const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, - int defaultButton, int escapeButton ); -// --- - private: - static void initLibrary(); - static bool inited; - static bool enable; - }; - -#endif diff --git a/src/kernel/tqttdeintegration_x11.cpp b/src/kernel/tqttdeintegration_x11.cpp new file mode 100644 index 000000000..b3565b3d4 --- /dev/null +++ b/src/kernel/tqttdeintegration_x11.cpp @@ -0,0 +1,240 @@ +/* This file is licensed under the terms of the GPL v2 or v3, as it has been publicly released by + OpenSUSE as part of their GPLed TQt library disribution */ + +#include "tqttdeintegration_x11_p.h" + +#include +#include +#include +#include +#include +#include +#include + +bool TQTDEIntegration::inited = false; +bool TQTDEIntegration::enable = false; + +bool TQTDEIntegration::enabled() + { + if( !inited ) + initLibrary(); + return enable; + } + +static TQCString findLibrary() + { + if( getenv( "TQT_NO_TDE_INTEGRATION" ) == NULL + || getenv( "TQT_NO_TDE_INTEGRATION" )[ 0 ] == '0' ) + { + return TQCString() + tqInstallPathPlugins() + "/integration/libtqttde"; + } + return ""; + } + +inline static long widgetToWinId( const TQWidget* w ) + { + return w != NULL ? w->winId() : 0; + } + +inline static TQFont fontPtrToFontRef( const TQFont* f ) + { + return f != NULL ? *f : TQFont(); + } + +// --- +static bool (*tqttde_initializeIntegration)( ); +static TQStringList (*tqttde_getOpenFileNames)( const TQString& filter, TQString* workingDirectory, + long parent, const TQCString& name, const TQString& caption, TQString* selectedFilter, + bool multiple ); +static TQString (*tqttde_getSaveFileName)( const TQString& initialSelection, const TQString& filter, + TQString* workingDirectory, long parent, const TQCString& name, const TQString& caption, + TQString* selectedFilter ); +static TQString (*tqttde_getExistingDirectory)( const TQString& initialDirectory, long parent, + const TQCString& name, const TQString& caption ); +static TQColor (*tqttde_getColor)( const TQColor& color, long parent, const TQCString& name ); +static TQFont (*tqttde_getFont)( bool* ok, const TQFont& def, long parent, const TQCString& name ); +static int (*tqttde_messageBox1)( int type, long parent, const TQString& caption, const TQString& text, + int button0, int button1, int button2 ); +static int (*tqttde_messageBox2)( int type, long parent, const TQString& caption, const TQString& text, + const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, + int defaultButton, int escapeButton ); + +void TQTDEIntegration::initLibrary() + { + if( !inited ) + { + enable = false; + inited = true; + TQString libpath = findLibrary(); + if( libpath.isEmpty()) + return; + TQLibrary lib( libpath ); + lib.setAutoUnload( false ); + tqttde_initializeIntegration = ( + bool (*)( ) + ) + lib.resolve("initializeIntegration"); + if( tqttde_initializeIntegration == NULL ) + return; + tqttde_getOpenFileNames = ( + TQStringList (*)( const TQString& filter, TQString* workingDirectory, long parent, + const TQCString& name, const TQString& caption, TQString* selectedFilter, + bool multiple ) + ) + lib.resolve("getOpenFileNames"); + if( tqttde_getOpenFileNames == NULL ) + return; + tqttde_getSaveFileName = ( + TQString (*)( const TQString& initialSelection, const TQString& filter, TQString* workingDirectory, + long parent, const TQCString& name, const TQString& caption, TQString* selectedFilter ) + ) + lib.resolve("getSaveFileName"); + if( tqttde_getSaveFileName == NULL ) + return; + tqttde_getExistingDirectory = ( + TQString (*)( const TQString& initialDirectory, long parent, const TQCString& name, + const TQString& caption ) + ) + lib.resolve("getExistingDirectory"); + if( tqttde_getExistingDirectory == NULL ) + return; + tqttde_getColor = ( + TQColor (*)( const TQColor& color, long parent, const TQCString& name ) + ) + lib.resolve("getColor"); + if( tqttde_getColor == NULL ) + return; + tqttde_getFont = ( + TQFont (*)( bool* ok, const TQFont& def, long parent, const TQCString& name ) + ) + lib.resolve("getFont"); + if( tqttde_getFont == NULL ) + return; + tqttde_messageBox1 = ( + int (*)( int type, long parent, const TQString& caption, const TQString& text, + int button0, int button1, int button2 ) + ) + lib.resolve("messageBox1"); + if( tqttde_messageBox1 == NULL ) + return; + tqttde_messageBox2 = ( + int (*)( int type, long parent, const TQString& caption, const TQString& text, + const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, + int defaultButton, int escapeButton ) + ) + lib.resolve("messageBox2"); + if( tqttde_messageBox2 == NULL ) + return; + enable = tqttde_initializeIntegration(); + } + } + +bool TQTDEIntegration::initializeIntegration( ) + { + return tqttde_initializeIntegration( + ); + } +TQStringList TQTDEIntegration::getOpenFileNames( const TQString& filter, TQString* workingDirectory, + TQWidget* parent, const char* name, const TQString& caption, TQString* selectedFilter, + bool multiple ) + { + return tqttde_getOpenFileNames( + filter, workingDirectory, widgetToWinId( parent ), name, caption, selectedFilter, multiple ); + } +TQString TQTDEIntegration::getSaveFileName( const TQString& initialSelection, const TQString& filter, + TQString* workingDirectory, TQWidget* parent, const char* name, const TQString& caption, + TQString* selectedFilter ) + { + return tqttde_getSaveFileName( + initialSelection, filter, workingDirectory, widgetToWinId( parent ), name, caption, selectedFilter ); + } +TQString TQTDEIntegration::getExistingDirectory( const TQString& initialDirectory, TQWidget* parent, + const char* name, const TQString& caption ) + { + return tqttde_getExistingDirectory( + initialDirectory, widgetToWinId( parent ), name, caption ); + } +TQColor TQTDEIntegration::getColor( const TQColor& color, TQWidget* parent, const char* name ) + { + return tqttde_getColor( + color, widgetToWinId( parent ), name ); + } +TQFont TQTDEIntegration::getFont( bool* ok, const TQFont* def, TQWidget* parent, const char* name ) + { + return tqttde_getFont( + ok, fontPtrToFontRef( def ), widgetToWinId( parent ), name ); + } +int TQTDEIntegration::messageBox1( int type, TQWidget* parent, const TQString& caption, + const TQString& text, int button0, int button1, int button2 ) + { + return tqttde_messageBox1( + type, widgetToWinId( parent ), caption, text, button0, button1, button2 ); + } +int TQTDEIntegration::messageBox2( int type, TQWidget* parent, const TQString& caption, + const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, + int defaultButton, int escapeButton ) + { + return tqttde_messageBox2( + type, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); + } +// --- + +int TQTDEIntegration::information( TQWidget* parent, const TQString& caption, + const TQString& text, int button0, int button1, int button2 ) + { + return tqttde_messageBox1( + TQMessageBox::Information, widgetToWinId( parent ), caption, text, button0, button1, button2 ); + } + +int TQTDEIntegration::question( TQWidget* parent, const TQString& caption, + const TQString& text, int button0, int button1, int button2 ) + { + return tqttde_messageBox1( + TQMessageBox::Question, widgetToWinId( parent ), caption, text, button0, button1, button2 ); + } + +int TQTDEIntegration::warning( TQWidget* parent, const TQString& caption, + const TQString& text, int button0, int button1, int button2 ) + { + return tqttde_messageBox1( + TQMessageBox::Warning, widgetToWinId( parent ), caption, text, button0, button1, button2 ); + } + +int TQTDEIntegration::critical( TQWidget* parent, const TQString& caption, + const TQString& text, int button0, int button1, int button2 ) + { + return tqttde_messageBox1( + TQMessageBox::Critical, widgetToWinId( parent ), caption, text, button0, button1, button2 ); + } + +int TQTDEIntegration::information( TQWidget* parent, const TQString& caption, + const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, + int defaultButton, int escapeButton ) + { + return tqttde_messageBox2( + TQMessageBox::Information, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); + } + +int TQTDEIntegration::question( TQWidget* parent, const TQString& caption, + const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, + int defaultButton, int escapeButton ) + { + return tqttde_messageBox2( + TQMessageBox::Question, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); + } + +int TQTDEIntegration::warning( TQWidget* parent, const TQString& caption, + const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, + int defaultButton, int escapeButton ) + { + return tqttde_messageBox2( + TQMessageBox::Warning, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); + } + +int TQTDEIntegration::critical( TQWidget* parent, const TQString& caption, + const TQString& text, const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, + int defaultButton, int escapeButton ) + { + return tqttde_messageBox2( + TQMessageBox::Critical, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton ); + } diff --git a/src/kernel/tqttdeintegration_x11_p.h b/src/kernel/tqttdeintegration_x11_p.h new file mode 100644 index 000000000..fe8c23028 --- /dev/null +++ b/src/kernel/tqttdeintegration_x11_p.h @@ -0,0 +1,62 @@ +/* This file is licensed under the terms of the GPL v2 or v3, as it has been publicly released by + OpenSUSE as part of their GPLed TQt library disribution */ + +#ifndef TQTDEINTEGRATION_H +#define TQTDEINTEGRATION_H + +#include + +class TQLibrary; +class TQWidget; +class TQColor; +class TQFont; + +class TQTDEIntegration + { + public: + static bool enabled(); +// --- + static bool initializeIntegration( ); + static TQStringList getOpenFileNames( const TQString& filter, TQString* workingDirectory, + TQWidget* parent, const char* name, const TQString& caption, TQString* selectedFilter, + bool multiple ); + static TQString getSaveFileName( const TQString& initialSelection, const TQString& filter, + TQString* workingDirectory, TQWidget* parent, const char* name, const TQString& caption, + TQString* selectedFilter ); + static TQString getExistingDirectory( const TQString& initialDirectory, TQWidget* parent, + const char* name, const TQString& caption ); + static TQColor getColor( const TQColor& color, TQWidget* parent, const char* name ); + static TQFont getFont( bool* ok, const TQFont* def, TQWidget* parent, const char* name ); + static int messageBox1( int type, TQWidget* parent, const TQString& caption, + const TQString& text, int button0, int button1, int button2 ); + static int information( TQWidget* parent, const TQString& caption, const TQString& text, + int button0, int button1, int button2 ); + static int question( TQWidget* parent, const TQString& caption, const TQString& text, + int button0, int button1, int button2 ); + static int warning( TQWidget* parent, const TQString& caption, const TQString& text, + int button0, int button1, int button2 ); + static int critical( TQWidget* parent, const TQString& caption, const TQString& text, + int button0, int button1, int button2 ); + static int messageBox2( int type, TQWidget* parent, const TQString& caption, + const TQString& text, const TQString& button0Text, const TQString& button1Text, + const TQString& button2Text, int defaultButton, int escapeButton ); + static int information( TQWidget* parent, const TQString& caption, const TQString& text, + const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, + int defaultButton, int escapeButton ); + static int question( TQWidget* parent, const TQString& caption, const TQString& text, + const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, + int defaultButton, int escapeButton ); + static int warning( TQWidget* parent, const TQString& caption, const TQString& text, + const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, + int defaultButton, int escapeButton ); + static int critical( TQWidget* parent, const TQString& caption, const TQString& text, + const TQString& button0Text, const TQString& button1Text, const TQString& button2Text, + int defaultButton, int escapeButton ); +// --- + private: + static void initLibrary(); + static bool inited; + static bool enable; + }; + +#endif -- cgit v1.2.1