[Kde-cygwin-cvs] CVS: qt-3/doc i18n.doc,1.1.1.7,1.1.1.8 indices.doc,1.1.1.11,1.1.1.12 installation.d
Status: Inactive
Brought to you by:
habacker
Update of /cvsroot/kde-cygwin/qt-3/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9971/doc Modified Files: Tag: QT_WIN32_3_3_BRANCH i18n.doc indices.doc installation.doc integration.doc layout.doc mac.doc makeqpf.doc Log Message: Index: i18n.doc =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/doc/i18n.doc,v retrieving revision 1.1.1.7 retrieving revision 1.1.1.8 diff -u -r1.1.1.7 -r1.1.1.8 --- i18n.doc 27 Aug 2004 21:24:13 -0000 1.1.1.7 +++ i18n.doc 30 Sep 2005 15:22:33 -0000 1.1.1.8 @@ -1,9 +1,9 @@ /**************************************************************************** -** +** $Id$ ** ** Explanation of moc and the meta object system ** -** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. +** Copyright (C) 1992-2005 Trolltech AS. All rights reserved. ** ** This file is part of the Qt GUI Toolkit. ** @@ -43,6 +43,8 @@ The internationalization of an application is the process of making the application usable by people in countries other than one's own. +\tableofcontents + In some cases internationalization is simple, for example, making a US application accessible to Australian or British users may require little more than a few spelling corrections. But to make a US @@ -169,7 +171,7 @@ QString, and QChar are just like easier versions of the crude const char* and char from traditional C. -\section2 Use \link QObject::tr() tr()\endlink for all Literal Text +\section2 Use tr() for all Literal Text Wherever your program uses \c{"quoted text"} for text that will be presented to the user, ensure that it is processed by the \l @@ -180,8 +182,8 @@ \code LoginWidget::LoginWidget() { - QLabel *label = new QLabel( tr("Password:"), this ); - ... + QLabel *label = new QLabel( tr("Password:"), this ); + ... } \endcode @@ -196,15 +198,15 @@ \code void some_global_function( LoginWidget *logwid ) { - QLabel *label = new QLabel( - LoginWidget::tr("Password:"), logwid ); + QLabel *label = new QLabel( + LoginWidget::tr("Password:"), logwid ); } void same_global_function( LoginWidget *logwid ) { - QLabel *label = new QLabel( - qApp->translate("LoginWidget", "Password:"), - logwid ); + QLabel *label = new QLabel( + qApp->translate("LoginWidget", "Password:"), + logwid ); } \endcode @@ -218,30 +220,30 @@ \code QString FriendlyConversation::greeting( int greet_type ) { - static const char* greeting_strings[] = { - QT_TR_NOOP( "Hello" ), - QT_TR_NOOP( "Goodbye" ) - }; - return tr( greeting_strings[greet_type] ); + static const char* greeting_strings[] = { + QT_TR_NOOP( "Hello" ), + QT_TR_NOOP( "Goodbye" ) + }; + return tr( greeting_strings[greet_type] ); } \endcode Example of QT_TRANSLATE_NOOP(): \code static const char* greeting_strings[] = { - QT_TRANSLATE_NOOP( "FriendlyConversation", "Hello" ), - QT_TRANSLATE_NOOP( "FriendlyConversation", "Goodbye" ) + QT_TRANSLATE_NOOP( "FriendlyConversation", "Hello" ), + QT_TRANSLATE_NOOP( "FriendlyConversation", "Goodbye" ) }; QString FriendlyConversation::greeting( int greet_type ) { - return tr( greeting_strings[greet_type] ); + return tr( greeting_strings[greet_type] ); } QString global_greeting( int greet_type ) { - return qApp->translate( "FriendlyConversation", - greeting_strings[greet_type] ); + return qApp->translate( "FriendlyConversation", + greeting_strings[greet_type] ); } \endcode @@ -267,7 +269,7 @@ \code QPopupMenu *file = new QPopupMenu( this ); file->insertItem( tr("&Quit"), this, SLOT(quit()), - QKeySequence(tr("Ctrl+Q", "File|Quit")) ); + QKeySequence(tr("Ctrl+Q", "File|Quit")) ); \endcode \section2 Use QString::arg() for Dynamic Text @@ -276,12 +278,12 @@ arguments: \code void FileCopier::showProgress( int done, int total, - const QString& current_file ) + const QString& current_file ) { - label.setText( tr("%1 of %2 files copied.\nCopying: %3") - .arg(done) - .arg(total) - .arg(current_file) ); + label.setText( tr("%1 of %2 files copied.\nCopying: %3") + .arg(done) + .arg(total) + .arg(current_file) ); } \endcode @@ -291,7 +293,7 @@ \code QString s1 = "%1 of %2 files copied. Copying: %3"; QString s2 = "Kopierer nu %3. Av totalt %2 filer er %1 kopiert."; - + qDebug( s1.arg(5).arg(10).arg("somefile.txt").ascii() ); qDebug( s2.arg(5).arg(10).arg("somefile.txt").ascii() ); \endcode @@ -343,15 +345,15 @@ \code HEADERS = funnydialog.h \ - wackywidget.h + wackywidget.h SOURCES = funnydialog.cpp \ - main.cpp \ - wackywidget.cpp + main.cpp \ + wackywidget.cpp FORMS = fancybox.ui TRANSLATIONS = superapp_dk.ts \ - superapp_fi.ts \ - superapp_no.ts \ - superapp_se.ts + superapp_fi.ts \ + superapp_no.ts \ + superapp_se.ts \endcode When you run \e lupdate or \e lrelease, you must give the name of the @@ -394,21 +396,21 @@ \code int main( int argc, char **argv ) { - QApplication app( argc, argv ); + QApplication app( argc, argv ); - // translation file for Qt - QTranslator qt( 0 ); - qt.load( QString( "qt_" ) + QTextCodec::locale(), "." ); - app.installTranslator( &qt ); + // translation file for Qt + QTranslator qt( 0 ); + qt.load( QString( "qt_" ) + QTextCodec::locale(), "." ); + app.installTranslator( &qt ); - // translation file for application strings - QTranslator myapp( 0 ); - myapp.load( QString( "myapp_" ) + QTextCodec::locale(), "." ); - app.installTranslator( &myapp ); + // translation file for application strings + QTranslator myapp( 0 ); + myapp.load( QString( "myapp_" ) + QTextCodec::locale(), "." ); + app.installTranslator( &myapp ); - ... + ... - return app.exec(); + return app.exec(); } \endcode @@ -494,11 +496,11 @@ \code void Clock::setTime(const QTime& t) { - if ( tr("AMPM") == "AMPM" ) { - // 12-hour clock - } else { - // 24-hour clock - } + if ( tr("AMPM") == "AMPM" ) { + // 12-hour clock + } else { + // 24-hour clock + } } \endcode @@ -511,6 +513,29 @@ appropriate for all localities, rather than relying on local puns or stretched metaphors. +\section1 Dynamic Translation + +Some applications, such as Qt Linguist, must be able to support changes +to the user's language settings while they are still running. To make +widgets aware of changes to the system language, implement a public +slot called \c languageChange() in each widget that needs to be notified. +In this slot, you should update the text displayed by widgets using the +\l{QObject::tr()}{tr()} function in the usual way; for example: + +\code +void MyWidget::languageChange() +{ + titleLabel->setText(tr("Document Title")); + ... + okPushButton->setText(tr("&OK")); +} +\endcode + +The default event handler for QWidget subclasses responds to the +\link QEvent::Type LanguageChange\endlink event, and will call this slot +when necessary; other application components can also connect signals +to this slot to force widgets to update themselves. + \section1 System Support Some of the operating systems and windowing systems that Qt runs on @@ -531,7 +556,7 @@ but convert filenames to the local 8-bit encoding, as this is the Unix convention (see QFile::setEncodingFunction() - to explore alternative encodings). + to explore alternative encodings). \i File I/O defaults to the local 8-bit encoding, with Unicode options in QTextStream. \endlist Index: indices.doc =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/doc/indices.doc,v retrieving revision 1.1.1.11 retrieving revision 1.1.1.12 diff -u -r1.1.1.11 -r1.1.1.12 --- indices.doc 9 Apr 2005 10:35:15 -0000 1.1.1.11 +++ indices.doc 30 Sep 2005 15:22:33 -0000 1.1.1.12 @@ -1,803 +1,804 @@ -/**************************************************************************** -** -** -** Miscellaneous index pages -** -** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. -** -** This file is part of the Qt GUI Toolkit. -** -** This file may be distributed under the terms of the Q Public License -** as defined by Trolltech AS of Norway and appearing in the file [...1576 lines suppressed...] + +\title XML + +These classes are relevant to XML users. +*/ + +/*! \defgroup qws + +\title Qt/Embedded + +These classes are relevant to Qt/Embedded users. +*/ + +/*! \defgroup text + +\title Text Related Classes + +These classes are relevant to text processing. See also the +\link xml.html XML classes \endlink. +*/ Index: installation.doc =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/doc/installation.doc,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -r1.1.1.5 -r1.1.1.6 --- installation.doc 27 Aug 2004 21:24:13 -0000 1.1.1.5 +++ installation.doc 30 Sep 2005 15:22:33 -0000 1.1.1.6 @@ -1,9 +1,9 @@ /**************************************************************************** -** +** $Id$ ** ** Installation page ** -** Copyright (C) 2000-2003 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2005 Trolltech AS. All rights reserved. ** ** This file is part of the Qt GUI Toolkit. ** Index: integration.doc =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/doc/integration.doc,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -r1.1.1.5 -r1.1.1.6 --- integration.doc 9 Apr 2005 10:35:15 -0000 1.1.1.5 +++ integration.doc 30 Sep 2005 15:22:33 -0000 1.1.1.6 @@ -1,162 +1,162 @@ -/**************************************************************************** -** -** -** Documentation of Visual Studio Integration Plugin -** -** Copyright (C) 2003 Trolltech AS. All rights reserved. -** -** This file is part of the Qt GUI Toolkit. -** -** This file may be distributed under the terms of the Q Public License -** as defined by Trolltech AS of Norway and appearing in the file -** LICENSE.QPL included in the packaging of this file. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/pricing.html or email sa...@tr... for -** information about Qt Commercial License Agreements. -** See http://www.trolltech.com/qpl/ for QPL licensing information. -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact in...@tr... if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -/*! - \page integration.html - - \title About the Visual Studio Integration Plugin - - The Visual Studio Integration Plugin is currently available only to users of - Visual Studio 6, it offers simple ways of doing common tasks when writing a - Qt application. - - \tableofcontents - - \section1 How to install the Visual Studio Integration Plugin - - When you install Qt, the integration plugin should be installed for you, - and ready for use. However, sometimes this does not happen properly, so - you need to manually carry out the following steps. - - \list - \i Ensure that the file '%MSDevDir%\\addins\\qmsdev.dll' exists. - \i Start Visual Studio, if it isn't already running. - \i Select Tools|Customize|Add-ins and Macro Files. - \i Ensure the checkbox to the left of the "QMsDev Developer Studio-Add-In" add-in is checked. - \i Click Close. - \endlist - - Now the integration plugin should be properly installed. If this doesn't - work, then contact Trolltech technical support giving details of - what went wrong. - - \section1 How to uninstall the Visual Studio Integration Plugin - - When you want to uninstall the integration plugin, just carry out the - following steps. - - \list - \i Close down any instances of Visual Studio. - \i Delete the file '%MSDevDir%\\addins\\qmsdev.dll' - \endlist - - \section1 What can the Visual Studio Integration Plugin do? - - The integration plugin adds the following options to Visual Studio: - - \list - \i New Qt Project - \i New Qt Dialog - \i Qt Designer - \i Open Qt Project - \i Write Qt Project - \i Use Qt In Current Project - \i Add MOC - \endlist - - \section2 Using the 'New Qt Project' button - - The 'New Qt Project' button allows you to create a simple Qt project - ready for development. Simply fill in the form and if you select - 'Dialog' or 'Main Window' without MDI support then it will - automatically start up \e{Qt Designer}. When you have finished with - the form in \e{Qt Designer} just save it and it will appear in a - ready made Qt project. - - If you select 'Main Window' with 'MDI Support' then it will simply - give you a code skeleton in a project ready for you to populate with - your own code. - - \section2 Using the 'New Qt Dialog' button - - The 'New Qt Dialog' button works in two ways: You can use it to create a new - dialog for your project; or you can use it to insert an existing - dialog into your project. - - If you want to create a new dialog then all you need to do is specify where - the dialog file should be saved and give it a name. This will start up - \e{Qt Designer} to allow you to design your new dialog, and will add it to - the existing project. - - If you want to add an existing dialog to your project, then just select the - relevant \c .ui file. This will then add it to your existing project and add - the relevant steps to create the generated code. - - \section2 Using the 'Qt Designer' button - - The 'Qt Designer' button simply starts up \e{Qt Designer}, it has no ties to - your existing project so whatever you do with it will not affect your - existing projects. It can also be started up by using the Ctrl+Shift+D key - combination in Visual Studio. - - \section2 Using the 'Open Qt Project' button - - The 'Open Qt Project' button allows you to convert an existing \c - qmake project file into a \c .dsp file which you can insert into - your existing workspace. When you click the 'Open Qt Project' - button, just select an existing \c qmake project file (a \c .pro - file) and then click OK. You will get a message box at the end - which asks you to insert the newly created \c .dsp file into your - existing workspace. - - \section2 Using the 'Write Qt Project' button - - The 'Write Qt Project' button creates a \c qmake project (\c .pro) - file for your current project so that you can easily copy the files - onto another platform and be able to use \c qmake to create a Makefile - on that other platform. All you need to do is make the project you - want to create a \c .pro file for, and click on the button. Just - name your \c qmake project file and click Save. - - \section2 Using the 'Use Qt In Current Project' button - - The 'Use Qt In Current Project' button simply adds in the necessary - information for the current project so that it links against Qt and - sets any other settings needed to use Qt in that project. - - \section2 Using the 'Add MOC' button - - The 'Add MOC' button will add in the custom build step for the selected file - so that it creates any needed MOC files and it will add these generated - files to the project. All you need to do to use it is click on a file that - has \c Q_OBJECT and click the button. - - You only need to use this button if you added a file that has \c - Q_OBJECT in it by hand, you don't need to use this if you used any - of the previously mentioned buttons. It can also be invoked by using - the Ctrl+Shift+M key combination in Visual Studio. - - -*/ +/**************************************************************************** +** $Id$ +** +** Documentation of Visual Studio Integration Plugin +** +** Copyright (C) 2005 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sa...@tr... for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact in...@tr... if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +/*! + \page integration.html + + \title About the Visual Studio Integration Plugin + + The Visual Studio Integration Plugin is currently available only to users of + Visual Studio 6, it offers simple ways of doing common tasks when writing a + Qt application. + + \tableofcontents + + \section1 How to install the Visual Studio Integration Plugin + + When you install Qt, the integration plugin should be installed for you, + and ready for use. However, sometimes this does not happen properly, so + you need to manually carry out the following steps. + + \list + \i Ensure that the file '%MSDevDir%\\addins\\qmsdev.dll' exists. + \i Start Visual Studio, if it isn't already running. + \i Select Tools|Customize|Add-ins and Macro Files. + \i Ensure the checkbox to the left of the "QMsDev Developer Studio-Add-In" add-in is checked. + \i Click Close. + \endlist + + Now the integration plugin should be properly installed. If this doesn't + work, then contact Trolltech technical support giving details of + what went wrong. + + \section1 How to uninstall the Visual Studio Integration Plugin + + When you want to uninstall the integration plugin, just carry out the + following steps. + + \list + \i Close down any instances of Visual Studio. + \i Delete the file '%MSDevDir%\\addins\\qmsdev.dll' + \endlist + + \section1 What can the Visual Studio Integration Plugin do? + + The integration plugin adds the following options to Visual Studio: + + \list + \i New Qt Project + \i New Qt Dialog + \i Qt Designer + \i Open Qt Project + \i Write Qt Project + \i Use Qt In Current Project + \i Add MOC + \endlist + + \section2 Using the 'New Qt Project' button + + The 'New Qt Project' button allows you to create a simple Qt project + ready for development. Simply fill in the form and if you select + 'Dialog' or 'Main Window' without MDI support then it will + automatically start up \e{Qt Designer}. When you have finished with + the form in \e{Qt Designer} just save it and it will appear in a + ready made Qt project. + + If you select 'Main Window' with 'MDI Support' then it will simply + give you a code skeleton in a project ready for you to populate with + your own code. + + \section2 Using the 'New Qt Dialog' button + + The 'New Qt Dialog' button works in two ways: You can use it to create a new + dialog for your project; or you can use it to insert an existing + dialog into your project. + + If you want to create a new dialog then all you need to do is specify where + the dialog file should be saved and give it a name. This will start up + \e{Qt Designer} to allow you to design your new dialog, and will add it to + the existing project. + + If you want to add an existing dialog to your project, then just select the + relevant \c .ui file. This will then add it to your existing project and add + the relevant steps to create the generated code. + + \section2 Using the 'Qt Designer' button + + The 'Qt Designer' button simply starts up \e{Qt Designer}, it has no ties to + your existing project so whatever you do with it will not affect your + existing projects. It can also be started up by using the Ctrl+Shift+D key + combination in Visual Studio. + + \section2 Using the 'Open Qt Project' button + + The 'Open Qt Project' button allows you to convert an existing \c + qmake project file into a \c .dsp file which you can insert into + your existing workspace. When you click the 'Open Qt Project' + button, just select an existing \c qmake project file (a \c .pro + file) and then click OK. You will get a message box at the end + which asks you to insert the newly created \c .dsp file into your + existing workspace. + + \section2 Using the 'Write Qt Project' button + + The 'Write Qt Project' button creates a \c qmake project (\c .pro) + file for your current project so that you can easily copy the files + onto another platform and be able to use \c qmake to create a Makefile + on that other platform. All you need to do is make the project you + want to create a \c .pro file for, and click on the button. Just + name your \c qmake project file and click Save. + + \section2 Using the 'Use Qt In Current Project' button + + The 'Use Qt In Current Project' button simply adds in the necessary + information for the current project so that it links against Qt and + sets any other settings needed to use Qt in that project. + + \section2 Using the 'Add MOC' button + + The 'Add MOC' button will add in the custom build step for the selected file + so that it creates any needed MOC files and it will add these generated + files to the project. All you need to do to use it is click on a file that + has \c Q_OBJECT and click the button. + + You only need to use this button if you added a file that has \c + Q_OBJECT in it by hand, you don't need to use this if you used any + of the previously mentioned buttons. It can also be invoked by using + the Ctrl+Shift+M key combination in Visual Studio. + + +*/ Index: layout.doc =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/doc/layout.doc,v retrieving revision 1.1.1.7 retrieving revision 1.1.1.8 diff -u -r1.1.1.7 -r1.1.1.8 --- layout.doc 27 Aug 2004 21:24:13 -0000 1.1.1.7 +++ layout.doc 30 Sep 2005 15:22:33 -0000 1.1.1.8 @@ -1,9 +1,9 @@ /**************************************************************************** -** +** $Id$ ** ** Explanation of the layout subsystem ** -** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. +** Copyright (C) 1992-2005 Trolltech AS. All rights reserved. ** ** This file is part of the Qt GUI Toolkit. ** Index: mac.doc =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/doc/mac.doc,v retrieving revision 1.1.1.8 retrieving revision 1.1.1.9 diff -u -r1.1.1.8 -r1.1.1.9 --- mac.doc 9 Apr 2005 10:35:15 -0000 1.1.1.8 +++ mac.doc 30 Sep 2005 15:22:33 -0000 1.1.1.9 @@ -1,261 +1,267 @@ -/**************************************************************************** -** -** -** Qt/Mac documentation -** -** Copyright (C) 2002-2003 Trolltech AS. All rights reserved. -** -** This file is part of the Qt GUI Toolkit. -** -** This file may be distributed under the terms of the Q Public License -** as defined by Trolltech AS of Norway and appearing in the file -** LICENSE.QPL included in the packaging of this file. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/pricing.html or email sa...@tr... for -** information about Qt Commercial License Agreements. -** See http://www.trolltech.com/qpl/ for QPL licensing information. -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact in...@tr... if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -/*! -\page mac-differences.html - -\title Qt/Mac Issues - -This file will outline known issues and possible workarounds for -limitations on Mac OS X with Qt. This list will not always be complete, so -please contact Trolltech support with issues you find to be missing. - -See also the document \link qtmac-as-native.html Qt/Mac is Mac OS X -Native\endlink. - -\tableofcontents - -\section1 GUI Applications - -GUI Applications must be run out of a bundle (something like widgets.app/) -or using the open(1) command. Mac OS X needs this to dispatch events correctly, -as well as gaining access to the menubar. If using GDB you must run with the -full path to the executable. - -\section1 QCursor - -Due to Mac OS X having only 16x16 custom cursors QCursor is limited by this -as well. For now the only workaround to this problem is to use a small -cursor (16x16). - -\section1 Anti-aliased text - -Qt/Mac (starting with 3.0.5) has introduced some support for smooth text as -suggested by Apple's Aqua Style Guildelines. This support is limited to Mac -OS X >10.1.4, when this version is not detected it will fallback to the old -text rendering library. - -\section1 Library Support - -\section2 Bundle-based Libraries - -If you want to incorporate dynamic libraries as part of your Mac OS X -application bundle (the application directory), then you place these into a -directory called Frameworks, a subdirectory of the application bundle. - -The application finds these dynamic libraries if the libraries have an -install name of "@executable_path/../Frameworks/libname.dylib. - -If you use qmake and Makefiles, use the QMAKE_LFFLAGS_SONAME setting: - -\code -QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/ -\endcode - -In case of Project Builder, you set the Library targets to have their -install path (in the Build Settings of the target) set to -"@executable_path/.../Frameworks". You also need to add a custom build -setting called "SKIP_INSTALL" and set this to YES. In the Application -target you need to add a Copy Files build phase that will copy the library -product into the applications wrapper's Framework sub-folder. - -Note that DYLD_LIBRARY_PATH environment variables will override these -settings, same with any other default paths such as a lookup of dynamic -libraries inside /usr/lib and similar default locations. - -We still strongly recommend to build static applications where the library -code is incorporated into the Mac OS X binary. However, in case you ship -applications that require plugin support,then you need to use dynamic -libraries as part of your application. - - -\section2 Combining Libraries - -If you want to build a new dynamic library combining the Qt 3.1 dynamic -libraries, you need to introduce the ld -r flag so that relocation information -is stored in the the output file, so that this file could be the subject of -another ld run. This is done by setting the -r flag in the .pro file, and the -LFLAGS settings. - -\section2 Initialization Order - -dyld(1) will call global static initializers in the order in which -they are linked into your application. If a library links against Qt -and references globals in Qt (from global initializers in your own -library) you should be sure to link against Qt before your library, -otherwise the result will be undefined (as Qt's global initializers -have not been called yet). - -\section1 Compiler Settings - -\section2 Compile-time Flags - -If you want to wrap any specific Mac OS X code in a define, use the Q_OS_MACX -flag, as in: - -\code -#if defined(Q_OS_MACX) -// the code used -#endif -\endcode - -Note that when you build under Mac OS X 10.2, then the MACOSX_102 flag is -automatically included in the make builds. - - -\section1 Building and Configuring Qt/Mac - -\section2 Problems building a static configuration - -If a static build fails with the following error messages during the -designer make phase: - -\code -QWidget::sizeHint() const referenced from libqui expected to be defined in @executable_path/../Frameworks/libqt-mt.3.dylib -non-virtual thunk [nv:-40] to QWidget::metric(int) const referenced from libqui - expected to be defined in @executable_path/../Frameworks/libqt-mt.3.dylib -\endcode - -then ensure that your library path does not have libqui libraries or -symbolic links. If you remove these, then the build will continue. - - -\section1 Macintosh Native API Access - -\section2 Accessing the Bundle Path - -The Macintosh application is actually a directory (ending with .app). This -directory has various other sub-directories and sources. In case you want -to place for example the plugin directory inside this bundle, then you need -to find out where the bundle resides on the disk. The following code will -do this: - -\code - CFURLRef pluginRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); - CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef, - kCFURLPOSIXPathStyle); - const char *pathPtr = CFStringGetCStringPtr(macPath, - CFStringGetSystemEncoding()); - qDebug("Path = %s", pathPtr); - CFRelease(pluginRef); - CFRelease(macPath); -\endcode - -Do not forget to enclosure this in an #if defined(Q_OS_MACX) macro statement. - -\section2 Translating the Application Menu and native dialogs - -You need to do a little extra to get the Application Menu and native dialogs -localized. This is a requirement of Mac OS X and not of Qt. - -First, you must add a localized resource folder inside the Bundle see: - -http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/index.html - -And look for the heading: Adding Localized Resources - -The main thing you need to do is create a file called locversion.plist. -Here is an example one for Norwegian: - -\code -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" -"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>LprojCompatibleVersion</key> - <string>123</string> - <key>LprojLocale</key> - <string>no</string> - <key>LprojRevisionLevel</key> - <string>1</string> - <key>LprojVersion</key> - <string>123</string> -</dict> -</plist> -\endcode - -Then when you run the application with your preferred language set to Norwegian -you should see menu items like "Avslutt" instead of "Quit" - -\section1 User Interface - -\section2 Right-Mouse Clicks - -If you want to provide right-mouse click support for Mac OS X, use the -QContextMenuEvent class. This will map to a context menu event, in other -words a menu that will display a popup selection. This is the most common -use of right-mouse clicks, and maps to a control-click with the Mac OS X -one-button mouse support. - -\section2 Menubar - -Qt/Mac will automatically detect your menubars for you and turn them -into Mac native menubars. Fitting this into your existing Qt application -will normally be automatic, however, if you have special needs the Qt/Mac -implementation currently selects a menubar by starting at the active window -(ie QApplication::activeWindow()), and applying: - -1) If the window has a QMenuBar then it is used. -2) If the window is a modal then its menubar is used. If no menubar is - specified then a default menubar is used (as documented below) -3) If the window has no parent then the default menubar is used (as documented below). - -The above 3 steps are applied all the way up the parent window chain until -one of the above are satisifed. If all else fails a default menubar will be -created, the default menubar on Qt/Mac is an empty menubar, however you can -create a different default menubar by creating a parentless QMenuBar, the -first one created will thus be designated the default menubar, and will be -used whenever a default menubar is needed. - -\section1 Limitations - -\section2 MenuItems - -\list - -\i QCustomMenuItems are not supported in Mac native menubars, they are supported -in popupmenus that are not in the Mac native menubar. - -\i Items with accelerators that have more than one keystroke -(QKeySequence) will not be honored, and the first key will be used. - -\endlist - -\section2 Unsupported Native Widgets - -Qt/Mac currently has no support for sheets, drawers, or the chooser -(Panther-style tabs). There may be support for these in a future version of Qt. -*/ +/**************************************************************************** +** $Id$ +** +** Qt/Mac documentation +** +** Copyright (C) 2002-2005 Trolltech AS. All rights reserved. +** +** This file is part of the Qt GUI Toolkit. +** +** This file may be distributed under the terms of the Q Public License +** as defined by Trolltech AS of Norway and appearing in the file +** LICENSE.QPL included in the packaging of this file. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition +** licenses may use this file in accordance with the Qt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/pricing.html or email sa...@tr... for +** information about Qt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for QPL licensing information. +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact in...@tr... if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +/*! +\page mac-differences.html + +\title Qt/Mac Issues + +This file will outline known issues and possible workarounds for +limitations on Mac OS X with Qt. This list will not always be complete, so +please contact Trolltech support with issues you find to be missing. + +See also the document \link qtmac-as-native.html Qt/Mac is Mac OS X +Native\endlink. + +\tableofcontents + +\section1 GUI Applications + +GUI Applications must be run out of a bundle (something like widgets.app/) +or using the open(1) command. Mac OS X needs this to dispatch events correctly, +as well as gaining access to the menubar. If using GDB you must run with the +full path to the executable. + +\section1 QCursor + +Due to Mac OS X having only 16x16 custom cursors QCursor is limited by this +as well. For now the only workaround to this problem is to use a small +cursor (16x16). + +\section1 Anti-aliased text + +Qt/Mac (starting with 3.0.5) has introduced some support for smooth text as +suggested by Apple's Aqua Style Guildelines. This support is limited to Mac +OS X >10.1.4, when this version is not detected it will fallback to the old +text rendering library. + +\section1 Library Support + +\section2 Bundle-based Libraries + +If you want to incorporate dynamic libraries as part of your Mac OS X +application bundle (the application directory), then you place these into a +directory called Frameworks, a subdirectory of the application bundle. + +The application finds these dynamic libraries if the libraries have an +install name of "@executable_path/../Frameworks/libname.dylib. + +If you use qmake and Makefiles, use the QMAKE_LFFLAGS_SONAME setting: + +\code +QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/ +\endcode + +In case of Project Builder, you set the Library targets to have their +install path (in the Build Settings of the target) set to +"@executable_path/.../Frameworks". You also need to add a custom build +setting called "SKIP_INSTALL" and set this to YES. In the Application +target you need to add a Copy Files build phase that will copy the library +product into the applications wrapper's Framework sub-folder. + +Note that DYLD_LIBRARY_PATH environment variables will override these +settings, same with any other default paths such as a lookup of dynamic +libraries inside /usr/lib and similar default locations. + +We still strongly recommend to build static applications where the library +code is incorporated into the Mac OS X binary. However, in case you ship +applications that require plugin support,then you need to use dynamic +libraries as part of your application. + + +\section2 Combining Libraries + +If you want to build a new dynamic library combining the Qt 3.1 dynamic +libraries, you need to introduce the ld -r flag so that relocation information +is stored in the the output file, so that this file could be the subject of +another ld run. This is done by setting the -r flag in the .pro file, and the +LFLAGS settings. + +\section2 Initialization Order + +dyld(1) will call global static initializers in the order in which +they are linked into your application. If a library links against Qt +and references globals in Qt (from global initializers in your own +library) you should be sure to link against Qt before your library, +otherwise the result will be undefined (as Qt's global initializers +have not been called yet). + +\section2 Plugin Support + +Note that it is not possible to build Qt plugins using Project Builder +or Xcode. Use \link qmake-manual.book qmake\endlink to configure and +build plugins. + +\section1 Compiler Settings + +\section2 Compile-time Flags + +If you want to wrap any specific Mac OS X code in a define, use the Q_OS_MACX +flag, as in: + +\code +#if defined(Q_OS_MACX) +// the code used +#endif +\endcode + +Note that when you build under Mac OS X 10.2, then the MACOSX_102 flag is +automatically included in the make builds. + + +\section1 Building and Configuring Qt/Mac + +\section2 Problems building a static configuration + +If a static build fails with the following error messages during the +designer make phase: + +\code +QWidget::sizeHint() const referenced from libqui expected to be defined in @executable_path/../Frameworks/libqt-mt.3.dylib +non-virtual thunk [nv:-40] to QWidget::metric(int) const referenced from libqui + expected to be defined in @executable_path/../Frameworks/libqt-mt.3.dylib +\endcode + +then ensure that your library path does not have libqui libraries or +symbolic links. If you remove these, then the build will continue. + + +\section1 Macintosh Native API Access + +\section2 Accessing the Bundle Path + +The Macintosh application is actually a directory (ending with .app). This +directory has various other sub-directories and sources. In case you want +to place for example the plugin directory inside this bundle, then you need +to find out where the bundle resides on the disk. The following code will +do this: + +\code + CFURLRef pluginRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); + CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef, + kCFURLPOSIXPathStyle); + const char *pathPtr = CFStringGetCStringPtr(macPath, + CFStringGetSystemEncoding()); + qDebug("Path = %s", pathPtr); + CFRelease(pluginRef); + CFRelease(macPath); +\endcode + +Do not forget to enclosure this in an #if defined(Q_OS_MACX) macro statement. + +\section2 Translating the Application Menu and native dialogs + +You need to do a little extra to get the Application Menu and native dialogs +localized. This is a requirement of Mac OS X and not of Qt. + +First, you must add a localized resource folder inside the Bundle see: + +http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/index.html + +And look for the heading: Adding Localized Resources + +The main thing you need to do is create a file called locversion.plist. +Here is an example one for Norwegian: + +\code +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" +"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>LprojCompatibleVersion</key> + <string>123</string> + <key>LprojLocale</key> + <string>no</string> + <key>LprojRevisionLevel</key> + <string>1</string> + <key>LprojVersion</key> + <string>123</string> +</dict> +</plist> +\endcode + +Then when you run the application with your preferred language set to Norwegian +you should see menu items like "Avslutt" instead of "Quit" + +\section1 User Interface + +\section2 Right-Mouse Clicks + +If you want to provide right-mouse click support for Mac OS X, use the +QContextMenuEvent class. This will map to a context menu event, in other +words a menu that will display a popup selection. This is the most common +use of right-mouse clicks, and maps to a control-click with the Mac OS X +one-button mouse support. + +\section2 Menubar + +Qt/Mac will automatically detect your menubars for you and turn them +into Mac native menubars. Fitting this into your existing Qt application +will normally be automatic, however, if you have special needs the Qt/Mac +implementation currently selects a menubar by starting at the active window +(ie QApplication::activeWindow()), and applying: + +1) If the window has a QMenuBar then it is used. +2) If the window is a modal then its menubar is used. If no menubar is + specified then a default menubar is used (as documented below) +3) If the window has no parent then the default menubar is used (as documented below). + +The above 3 steps are applied all the way up the parent window chain until +one of the above are satisifed. If all else fails a default menubar will be +created, the default menubar on Qt/Mac is an empty menubar, however you can +create a different default menubar by creating a parentless QMenuBar, the +first one created will thus be designated the default menubar, and will be +used whenever a default menubar is needed. + +\section1 Limitations + +\section2 MenuItems + +\list + +\i QCustomMenuItems are not supported in Mac native menubars, they are supported +in popupmenus that are not in the Mac native menubar. + +\i Items with accelerators that have more than one keystroke +(QKeySequence) will not be honored, and the first key will be used. + +\endlist + +\section2 Unsupported Native Widgets + +Qt/Mac currently has no support for sheets, drawers, or the chooser +(Panther-style tabs). There may be support for these in a future version of Qt. +*/ Index: makeqpf.doc =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/doc/makeqpf.doc,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -r1.1.1.2 -r1.1.1.3 --- makeqpf.doc 1 Oct 2003 07:17:05 -0000 1.1.1.2 +++ makeqpf.doc 30 Sep 2005 15:22:33 -0000 1.1.1.3 @@ -1,9 +1,9 @@ /**************************************************************************** -** +** $Id$ ** ** Documentation for QPF fonts ** -** Copyright (C) 2002 Trolltech AS. All rights reserved. +** Copyright (C) 2005 Trolltech AS. All rights reserved. ** ** This file is part of the Qt GUI Toolkit. ** |