You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
543 lines
16 KiB
543 lines
16 KiB
13 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
1 month ago
|
<title>tqapplication.h Include File</title>
|
||
13 years ago
|
<style type="text/css"><!--
|
||
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
||
|
a:link { color: #004faf; text-decoration: none }
|
||
|
a:visited { color: #672967; text-decoration: none }
|
||
|
body { background: #ffffff; color: black; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
|
<tr bgcolor="#E5E5E5">
|
||
|
<td valign=center>
|
||
|
<a href="index.html">
|
||
|
<font color="#004faf">Home</font></a>
|
||
|
| <a href="classes.html">
|
||
|
<font color="#004faf">All Classes</font></a>
|
||
|
| <a href="mainclasses.html">
|
||
|
<font color="#004faf">Main Classes</font></a>
|
||
|
| <a href="annotated.html">
|
||
|
<font color="#004faf">Annotated</font></a>
|
||
|
| <a href="groups.html">
|
||
|
<font color="#004faf">Grouped Classes</font></a>
|
||
|
| <a href="functions.html">
|
||
|
<font color="#004faf">Functions</font></a>
|
||
|
</td>
|
||
1 month ago
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>tqapplication.h</h1>
|
||
13 years ago
|
|
||
1 month ago
|
<p>This is the verbatim text of the tqapplication.h include file. It is provided only for illustration; the copyright remains with Trolltech.
|
||
13 years ago
|
<hr>
|
||
|
<pre>
|
||
|
/****************************************************************************
|
||
1 month ago
|
** $Id: qt/tqapplication.h 3.3.8 edited Jan 16 10:54 $
|
||
13 years ago
|
**
|
||
|
** Definition of TQApplication class
|
||
|
**
|
||
|
** Created : 931107
|
||
|
**
|
||
|
** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
|
||
|
**
|
||
|
** This file is part of the kernel module of the TQt GUI Toolkit.
|
||
|
**
|
||
|
** This file may be used under the terms of the GNU General Public
|
||
|
** License versions 2.0 or 3.0 as published by the Free Software
|
||
|
** Foundation and appearing in the file LICENSE.GPL included in the
|
||
|
** packaging of this file. Alternatively you may (at your option) use any
|
||
|
** later version of the GNU General Public License if such license has
|
||
|
** been publicly approved by Trolltech ASA (or its successors, if any)
|
||
|
** and the KDE Free TQt Foundation.
|
||
|
**
|
||
|
** Please review the following information to ensure GNU General
|
||
13 years ago
|
** Public Licensing requirements will be met:
|
||
13 years ago
|
** http://trolltech.com/products/qt/licenses/licensing/opensource/.
|
||
|
** If you are unsure which license is appropriate for your use, please
|
||
|
** review the following information:
|
||
|
** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
|
||
|
** or contact the sales department at sales@trolltech.com.
|
||
|
**
|
||
|
** This file may be used under the terms of the Q Public License as
|
||
|
** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
|
||
|
** included in the packaging of this file. Licensees holding valid TQt
|
||
|
** Commercial licenses may use this file in accordance with the TQt
|
||
|
** Commercial License Agreement provided with the Software.
|
||
|
**
|
||
|
** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
|
||
|
** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
|
||
|
** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
|
||
|
** herein.
|
||
|
**
|
||
|
**********************************************************************/
|
||
|
|
||
|
#ifndef TQAPPLICATION_H
|
||
|
#define TQAPPLICATION_H
|
||
|
|
||
|
#ifndef QT_H
|
||
4 months ago
|
#include "tqdesktopwidget.h"
|
||
5 months ago
|
#include "tqasciidict.h"
|
||
4 months ago
|
#include "tqpalette.h"
|
||
4 months ago
|
#include "tqtranslator.h"
|
||
6 months ago
|
#include "tqstrlist.h"
|
||
|
#include "tqstringlist.h"
|
||
13 years ago
|
#endif // QT_H
|
||
|
|
||
|
class TQSessionManager;
|
||
|
class TQStyle;
|
||
|
class TQTranslator;
|
||
|
class TQEventLoop;
|
||
|
|
||
6 years ago
|
#ifdef TQT_THREAD_SUPPORT
|
||
13 years ago
|
class TQMutex;
|
||
6 years ago
|
#endif // TQT_THREAD_SUPPORT
|
||
13 years ago
|
|
||
|
|
||
|
class TQApplication;
|
||
1 year ago
|
extern TQ_EXPORT TQApplication *tqApp; // global application object
|
||
13 years ago
|
|
||
|
|
||
1 year ago
|
class TQ_EXPORT TQApplication : public TQObject
|
||
13 years ago
|
{
|
||
13 years ago
|
TQ_OBJECT
|
||
13 years ago
|
public:
|
||
|
TQApplication( int &argc, char **argv );
|
||
|
TQApplication( int &argc, char **argv, bool GUIenabled );
|
||
|
enum Type { Tty, GuiClient, GuiServer };
|
||
|
TQApplication( int &argc, char **argv, Type );
|
||
9 months ago
|
#if defined(TQ_WS_X11)
|
||
13 years ago
|
TQApplication( Display* dpy, HANDLE visual = 0, HANDLE cmap = 0 );
|
||
|
TQApplication( Display *dpy, int argc, char **argv,
|
||
|
HANDLE visual = 0, HANDLE cmap= 0 );
|
||
|
#endif
|
||
|
virtual ~TQApplication();
|
||
|
|
||
|
int argc() const;
|
||
|
char **argv() const;
|
||
|
|
||
|
Type type() const;
|
||
|
|
||
6 years ago
|
#ifndef TQT_NO_STYLE
|
||
13 years ago
|
static TQStyle &style();
|
||
|
static void setStyle( TQStyle* );
|
||
|
static TQStyle* setStyle( const TQString& );
|
||
|
#endif
|
||
|
#ifndef Q_QDOC
|
||
|
enum ColorMode { NormalColors, CustomColors };
|
||
|
static ColorMode colorMode();
|
||
|
static void setColorMode( TQApplication::ColorMode );
|
||
|
#endif
|
||
|
|
||
|
enum ColorSpec { NormalColor=0, CustomColor=1, ManyColor=2 };
|
||
|
static int colorSpec();
|
||
|
static void setColorSpec( int );
|
||
6 years ago
|
#ifndef TQT_NO_CURSOR
|
||
13 years ago
|
static TQCursor *overrideCursor();
|
||
|
static void setOverrideCursor( const TQCursor &, bool replace=FALSE );
|
||
|
static void restoreOverrideCursor();
|
||
|
#endif
|
||
|
static bool hasGlobalMouseTracking();
|
||
|
static void setGlobalMouseTracking( bool enable );
|
||
6 years ago
|
#ifndef TQT_NO_PALETTE
|
||
13 years ago
|
static TQPalette palette( const TQWidget* = 0 );
|
||
|
static void setPalette( const TQPalette &, bool informWidgets=FALSE,
|
||
|
const char* className = 0 );
|
||
|
#endif
|
||
|
static TQFont font( const TQWidget* = 0 );
|
||
|
static void setFont( const TQFont &, bool informWidgets=FALSE,
|
||
|
const char* className = 0 );
|
||
|
static TQFontMetrics fontMetrics();
|
||
|
|
||
|
TQWidget *mainWidget() const;
|
||
|
virtual void setMainWidget( TQWidget * );
|
||
|
virtual void polish( TQWidget * );
|
||
|
|
||
|
static TQWidgetList *allWidgets();
|
||
|
static TQWidgetList *topLevelWidgets();
|
||
|
|
||
|
static TQDesktopWidget *desktop();
|
||
|
|
||
|
static TQWidget *activePopupWidget();
|
||
|
static TQWidget *activeModalWidget();
|
||
6 years ago
|
#ifndef TQT_NO_CLIPBOARD
|
||
13 years ago
|
static TQClipboard *clipboard();
|
||
|
#endif
|
||
|
TQWidget *focusWidget() const;
|
||
|
TQWidget *activeWindow() const;
|
||
|
|
||
|
static TQWidget *widgetAt( int x, int y, bool child=FALSE );
|
||
|
static TQWidget *widgetAt( const TQPoint &, bool child=FALSE );
|
||
|
|
||
|
static TQEventLoop *eventLoop();
|
||
|
|
||
|
int exec();
|
||
|
void processEvents();
|
||
|
void processEvents( int maxtime );
|
||
|
void processOneEvent();
|
||
|
bool hasPendingEvents();
|
||
|
int enter_loop();
|
||
|
void exit_loop();
|
||
|
int loopLevel() const;
|
||
|
static void exit( int retcode=0 );
|
||
|
|
||
|
static bool sendEvent( TQObject *receiver, TQEvent *event );
|
||
|
static void postEvent( TQObject *receiver, TQEvent *event );
|
||
|
static void sendPostedEvents( TQObject *receiver, int event_type );
|
||
|
static void sendPostedEvents();
|
||
|
|
||
|
static void removePostedEvents( TQObject *receiver );
|
||
|
|
||
|
virtual bool notify( TQObject *, TQEvent * );
|
||
|
|
||
|
static bool startingUp();
|
||
|
static bool closingDown();
|
||
|
|
||
|
static void flushX();
|
||
|
static void flush();
|
||
|
static void syncX();
|
||
|
|
||
|
static void beep();
|
||
|
|
||
6 years ago
|
#ifndef TQT_NO_TRANSLATION
|
||
6 years ago
|
# ifndef TQT_NO_TEXTCODEC
|
||
13 years ago
|
void setDefaultCodec( TQTextCodec * );
|
||
|
TQTextCodec* defaultCodec() const;
|
||
|
# endif
|
||
|
void installTranslator( TQTranslator * );
|
||
|
void removeTranslator( TQTranslator * );
|
||
|
#endif
|
||
|
enum Encoding { DefaultCodec, UnicodeUTF8 };
|
||
|
TQString translate( const char * context,
|
||
|
const char * key,
|
||
|
const char * comment = 0,
|
||
|
Encoding encoding = DefaultCodec ) const;
|
||
6 years ago
|
#ifndef TQT_NO_DIR
|
||
13 years ago
|
TQString applicationDirPath();
|
||
|
TQString applicationFilePath();
|
||
|
#endif
|
||
6 years ago
|
#ifndef TQT_NO_PALETTE
|
||
13 years ago
|
// obsolete functions
|
||
|
static void setWinStyleHighlightColor( const TQColor &c ) {
|
||
|
TQPalette p( palette() );
|
||
|
p.setColor( TQColorGroup::Highlight, c );
|
||
|
setPalette( p, TRUE);
|
||
|
}
|
||
|
static const TQColor &winStyleHighlightColor() {
|
||
|
return palette().active().highlight();
|
||
|
}
|
||
|
#endif
|
||
|
static void setDesktopSettingsAware( bool );
|
||
|
static bool desktopSettingsAware();
|
||
|
|
||
|
static void setCursorFlashTime( int );
|
||
|
static int cursorFlashTime();
|
||
|
|
||
|
static void setDoubleClickInterval( int );
|
||
|
static int doubleClickInterval();
|
||
6 years ago
|
#ifndef TQT_NO_WHEELEVENT
|
||
13 years ago
|
static void setWheelScrollLines( int );
|
||
|
static int wheelScrollLines();
|
||
|
#endif
|
||
|
static void setGlobalStrut( const TQSize & );
|
||
|
static TQSize globalStrut();
|
||
|
|
||
6 years ago
|
#ifndef TQT_NO_COMPONENT
|
||
13 years ago
|
static void setLibraryPaths( const TQStringList & );
|
||
|
static TQStringList libraryPaths();
|
||
|
static void addLibraryPath( const TQString & );
|
||
|
static void removeLibraryPath( const TQString & );
|
||
6 years ago
|
#endif // TQT_NO_COMPONENT
|
||
13 years ago
|
static void setStartDragTime( int ms );
|
||
|
static int startDragTime();
|
||
|
static void setStartDragDistance( int l );
|
||
|
static int startDragDistance();
|
||
|
|
||
|
static void setReverseLayout( bool b );
|
||
|
static bool reverseLayout();
|
||
|
|
||
|
static int horizontalAlignment( int align );
|
||
|
|
||
|
static bool isEffectEnabled( TQt::UIEffect );
|
||
|
static void setEffectEnabled( TQt::UIEffect, bool enable = TRUE );
|
||
|
|
||
9 months ago
|
#if defined(TQ_WS_MAC)
|
||
13 years ago
|
virtual bool macEventFilter( EventHandlerCallRef, EventRef );
|
||
|
#endif
|
||
9 months ago
|
#if defined(TQ_WS_WIN)
|
||
13 years ago
|
virtual bool winEventFilter( MSG * );
|
||
|
#endif
|
||
9 months ago
|
#if defined(TQ_WS_X11)
|
||
13 years ago
|
virtual bool x11EventFilter( XEvent * );
|
||
|
virtual int x11ClientMessage( TQWidget*, XEvent*, bool passive_only);
|
||
|
int x11ProcessEvent( XEvent* );
|
||
|
#endif
|
||
|
|
||
|
#if defined(Q_OS_WIN32) || defined(Q_OS_CYGWIN)
|
||
|
static WindowsVersion winVersion();
|
||
|
#elif defined(Q_OS_MAC)
|
||
|
static MacintoshVersion macVersion();
|
||
|
#endif
|
||
9 months ago
|
#if defined(TQ_WS_WIN)
|
||
13 years ago
|
void winFocus( TQWidget *, bool );
|
||
|
static void winMouseButtonUp();
|
||
|
#endif
|
||
|
|
||
6 years ago
|
#ifndef TQT_NO_SESSIONMANAGER
|
||
13 years ago
|
// session management
|
||
|
bool isSessionRestored() const;
|
||
|
TQString sessionId() const;
|
||
|
TQString sessionKey() const;
|
||
|
virtual void commitData( TQSessionManager& sm );
|
||
|
virtual void saveState( TQSessionManager& sm );
|
||
|
#endif
|
||
9 months ago
|
#if defined(TQ_WS_X11)
|
||
13 years ago
|
static void create_xim();
|
||
|
static void close_xim();
|
||
|
static bool x11_apply_settings();
|
||
|
#endif
|
||
|
void wakeUpGuiThread();
|
||
6 years ago
|
#if defined(TQT_THREAD_SUPPORT)
|
||
13 years ago
|
void lock();
|
||
|
void unlock(bool wakeUpGui = TRUE);
|
||
|
bool locked();
|
||
|
bool tryLock();
|
||
|
#endif
|
||
|
|
||
|
signals:
|
||
|
void lastWindowClosed();
|
||
|
void aboutToQuit();
|
||
|
void guiThreadAwake();
|
||
|
|
||
|
public slots:
|
||
13 years ago
|
void quit();
|
||
13 years ago
|
void closeAllWindows();
|
||
|
void aboutTQt();
|
||
|
|
||
|
protected:
|
||
|
void setArgs(int, char **);
|
||
|
#endif
|
||
|
|
||
|
protected:
|
||
|
bool event(TQEvent *);
|
||
|
|
||
|
private:
|
||
|
void construct( int &argc, char **argv, Type );
|
||
|
void initialize( int, char ** );
|
||
|
void init_precmdline();
|
||
|
void process_cmdline( int* argcptr, char ** argv );
|
||
|
bool internalNotify( TQObject *, TQEvent * );
|
||
|
|
||
9 months ago
|
#if defined(TQ_WS_MAC)
|
||
13 years ago
|
bool do_mouse_down(Point *, bool *);
|
||
|
static TQMAC_PASCAL OSStatus globalEventProcessor(EventHandlerCallRef, EventRef, void *);
|
||
|
static TQMAC_PASCAL OSStatus globalAppleEventProcessor(const AppleEvent *, AppleEvent *, long);
|
||
|
static TQMAC_PASCAL void qt_context_timer_callbk(EventLoopTimerRef, void *);
|
||
|
static TQMAC_PASCAL void qt_select_timer_callbk(EventLoopTimerRef, void *);
|
||
|
static bool qt_mac_apply_settings();
|
||
|
friend class TQMacInputMethod;
|
||
|
friend TQMAC_PASCAL OSStatus qt_window_event(EventHandlerCallRef, EventRef, void *);
|
||
|
friend void qt_mac_update_os_settings();
|
||
|
friend bool qt_set_socket_handler( int, int, TQObject *, bool);
|
||
|
friend void qt_mac_destroy_widget(TQWidget *);
|
||
13 years ago
|
friend void tqt_init(int *, char **, TQApplication::Type);
|
||
13 years ago
|
#endif
|
||
|
|
||
6 years ago
|
#ifdef TQT_THREAD_SUPPORT
|
||
13 years ago
|
static TQMutex *tqt_mutex;
|
||
6 years ago
|
#endif // TQT_THREAD_SUPPORT
|
||
13 years ago
|
|
||
|
int app_argc;
|
||
|
char **app_argv;
|
||
13 years ago
|
bool quit_now;
|
||
|
int quit_code;
|
||
13 years ago
|
static TQStyle *app_style;
|
||
|
static int app_cspec;
|
||
6 years ago
|
#ifndef TQT_NO_PALETTE
|
||
13 years ago
|
static TQPalette *app_pal;
|
||
|
#endif
|
||
|
static TQFont *app_font;
|
||
6 years ago
|
#ifndef TQT_NO_CURSOR
|
||
13 years ago
|
static TQCursor *app_cursor;
|
||
|
#endif
|
||
|
static TQEventLoop* eventloop;
|
||
|
static int app_tracking;
|
||
|
static bool is_app_running;
|
||
|
static bool is_app_closing;
|
||
|
static bool app_exit_loop;
|
||
|
static int loop_level;
|
||
|
static TQWidget *main_widget;
|
||
|
static TQWidget *focus_widget;
|
||
|
static TQWidget *active_window;
|
||
|
static bool obey_desktop_settings;
|
||
|
static int cursor_flash_time;
|
||
|
static int mouse_double_click_time;
|
||
|
static int wheel_scroll_lines;
|
||
|
static int composedUnicode; // Value, meta-composed character
|
||
|
|
||
|
static bool animate_ui;
|
||
|
static bool animate_menu;
|
||
|
static bool animate_tooltip;
|
||
|
static bool animate_combo;
|
||
|
static bool fade_menu;
|
||
|
static bool fade_tooltip;
|
||
|
static bool animate_toolbox;
|
||
|
static bool widgetCount; // Coupled with -widgetcount switch
|
||
|
static bool metaComposeUnicode;
|
||
|
|
||
|
TQValueList<TQTranslator*> *translators;
|
||
6 years ago
|
#ifndef TQT_NO_SESSIONMANAGER
|
||
13 years ago
|
TQSessionManager *session_manager;
|
||
|
TQString session_id;
|
||
|
static TQString* session_key;
|
||
|
bool is_session_restored;
|
||
|
#endif
|
||
9 months ago
|
#if defined(TQ_WS_X11) && !defined (TQT_NO_STYLE )
|
||
13 years ago
|
static void x11_initialize_style();
|
||
|
#endif
|
||
|
|
||
|
static TQSize app_strut;
|
||
6 years ago
|
#ifndef TQT_NO_COMPONENT
|
||
13 years ago
|
static TQStringList *app_libpaths;
|
||
|
#endif
|
||
|
static TQAsciiDict<TQPalette> *app_palettes;
|
||
|
static TQAsciiDict<TQFont> *app_fonts;
|
||
|
|
||
|
static TQWidgetList *popupWidgets;
|
||
|
bool inPopupMode() const;
|
||
|
void closePopup( TQWidget *popup );
|
||
|
void openPopup( TQWidget *popup );
|
||
|
void setActiveWindow( TQWidget* act );
|
||
|
|
||
|
static bool sendSpontaneousEvent( TQObject *receiver, TQEvent *event );
|
||
|
static void removePostedEvent( TQEvent * );
|
||
|
|
||
|
friend class TQWidget;
|
||
|
friend class TQETWidget;
|
||
|
friend class TQDialog;
|
||
|
friend class TQAccelManager;
|
||
|
friend class TQEvent;
|
||
|
friend class TQTranslator;
|
||
|
friend class TQEventLoop;
|
||
1 year ago
|
friend TQ_EXPORT void tqt_ucm_initialize( TQApplication * );
|
||
9 months ago
|
#if defined(TQ_WS_WIN)
|
||
13 years ago
|
friend bool qt_sendSpontaneousEvent( TQObject*, TQEvent* );
|
||
|
#endif
|
||
|
private: // Disabled copy constructor and operator=
|
||
13 years ago
|
#if defined(TQ_DISABLE_COPY)
|
||
13 years ago
|
TQApplication( const TQApplication & );
|
||
|
TQApplication &operator=( const TQApplication & );
|
||
|
#endif
|
||
|
};
|
||
|
|
||
|
inline int TQApplication::argc() const
|
||
|
{
|
||
|
return app_argc;
|
||
|
}
|
||
|
|
||
|
inline char **TQApplication::argv() const
|
||
|
{
|
||
|
return app_argv;
|
||
|
}
|
||
|
|
||
6 years ago
|
#ifndef TQT_NO_CURSOR
|
||
13 years ago
|
inline TQCursor *TQApplication::overrideCursor()
|
||
|
{
|
||
|
return app_cursor;
|
||
|
}
|
||
|
#endif
|
||
|
inline bool TQApplication::hasGlobalMouseTracking()
|
||
|
{
|
||
|
return app_tracking > 0;
|
||
|
}
|
||
|
|
||
|
inline TQWidget *TQApplication::mainWidget() const
|
||
|
{
|
||
|
return main_widget;
|
||
|
}
|
||
|
|
||
|
inline TQWidget *TQApplication::focusWidget() const
|
||
|
{
|
||
|
return focus_widget;
|
||
|
}
|
||
|
|
||
|
inline TQWidget *TQApplication::activeWindow() const
|
||
|
{
|
||
|
return active_window;
|
||
|
}
|
||
|
|
||
|
inline TQWidget *TQApplication::widgetAt( const TQPoint &p, bool child )
|
||
|
{
|
||
|
return widgetAt( p.x(), p.y(), child );
|
||
|
}
|
||
|
|
||
|
inline bool TQApplication::inPopupMode() const
|
||
|
{
|
||
|
return popupWidgets != 0;
|
||
|
}
|
||
6 years ago
|
#ifndef TQT_NO_SESSIONMANAGER
|
||
13 years ago
|
inline bool TQApplication::isSessionRestored() const
|
||
|
{
|
||
|
return is_session_restored;
|
||
|
}
|
||
|
|
||
|
inline TQString TQApplication::sessionId() const
|
||
|
{
|
||
|
return session_id;
|
||
|
}
|
||
|
|
||
|
inline TQString TQApplication::sessionKey() const
|
||
|
{
|
||
|
return session_key ? *session_key : TQString::null;
|
||
|
}
|
||
|
#endif
|
||
|
inline TQSize TQApplication::globalStrut()
|
||
|
{
|
||
|
return app_strut;
|
||
|
}
|
||
|
|
||
|
inline bool TQApplication::sendEvent( TQObject *receiver, TQEvent *event )
|
||
13 years ago
|
{ if ( event ) event->spont = FALSE; return tqApp ? tqApp->notify( receiver, event ) : FALSE; }
|
||
13 years ago
|
|
||
|
inline bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event )
|
||
13 years ago
|
{ if ( event ) event->spont = TRUE; return tqApp ? tqApp->notify( receiver, event ) : FALSE; }
|
||
13 years ago
|
|
||
6 years ago
|
#ifdef TQT_NO_TRANSLATION
|
||
13 years ago
|
// Simple versions
|
||
|
inline TQString TQApplication::translate( const char *, const char *sourceText,
|
||
|
const char *, Encoding encoding ) const
|
||
|
{
|
||
6 years ago
|
#ifndef TQT_NO_TEXTCODEC
|
||
13 years ago
|
if ( encoding == UnicodeUTF8 )
|
||
|
return TQString::fromUtf8( sourceText );
|
||
|
else
|
||
|
#endif
|
||
|
return TQString::fromLatin1( sourceText );
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
inline int TQApplication::horizontalAlignment( int align )
|
||
|
{
|
||
|
align &= AlignHorizontal_Mask;
|
||
|
if ( align == AlignAuto ) {
|
||
|
if ( reverseLayout() )
|
||
|
align = AlignRight;
|
||
|
else
|
||
|
align = AlignLeft;
|
||
|
}
|
||
|
return align;
|
||
|
}
|
||
|
|
||
|
#endif // TQAPPLICATION_H
|
||
|
|
||
|
</pre>
|
||
|
<!-- eof -->
|
||
|
<p><address><hr><div align=center>
|
||
|
<table width=100% cellspacing=0 border=0><tr>
|
||
|
<td>Copyright © 2007
|
||
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
||
|
<td align=right><div align=right>TQt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|