From ea318d1431c89e647598c510c4245c6571aa5f46 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 26 Jan 2012 23:32:43 -0600 Subject: Update to latest tqt3 automated conversion --- src/dialogs/ntqcolordialog.h | 93 +++++++++++ src/dialogs/ntqdialog.h | 141 ++++++++++++++++ src/dialogs/ntqerrormessage.h | 89 +++++++++++ src/dialogs/ntqfiledialog.h | 347 ++++++++++++++++++++++++++++++++++++++++ src/dialogs/ntqfontdialog.h | 112 +++++++++++++ src/dialogs/ntqinputdialog.h | 107 +++++++++++++ src/dialogs/ntqmessagebox.h | 223 ++++++++++++++++++++++++++ src/dialogs/ntqprintdialog.h | 103 ++++++++++++ src/dialogs/ntqprogressdialog.h | 141 ++++++++++++++++ src/dialogs/ntqsemimodal.h | 66 ++++++++ src/dialogs/ntqtabdialog.h | 146 +++++++++++++++++ src/dialogs/ntqwizard.h | 142 ++++++++++++++++ src/dialogs/qcolordialog.cpp | 34 ++-- src/dialogs/qcolordialog.h | 93 ----------- src/dialogs/qdialog.cpp | 26 +-- src/dialogs/qdialog.h | 141 ---------------- src/dialogs/qerrormessage.cpp | 22 +-- src/dialogs/qerrormessage.h | 89 ----------- src/dialogs/qfiledialog.cpp | 86 +++++----- src/dialogs/qfiledialog.h | 347 ---------------------------------------- src/dialogs/qfontdialog.cpp | 36 ++--- src/dialogs/qfontdialog.h | 112 ------------- src/dialogs/qinputdialog.cpp | 20 +-- src/dialogs/qinputdialog.h | 107 ------------- src/dialogs/qmessagebox.cpp | 18 +-- src/dialogs/qmessagebox.h | 223 -------------------------- src/dialogs/qprintdialog.cpp | 44 ++--- src/dialogs/qprintdialog.h | 103 ------------ src/dialogs/qprogressdialog.cpp | 22 +-- src/dialogs/qprogressdialog.h | 141 ---------------- src/dialogs/qsemimodal.h | 66 -------- src/dialogs/qt_dialogs.pri | 24 +-- src/dialogs/qtabdialog.cpp | 24 +-- src/dialogs/qtabdialog.h | 146 ----------------- src/dialogs/qwizard.cpp | 22 +-- src/dialogs/qwizard.h | 142 ---------------- 36 files changed, 1899 insertions(+), 1899 deletions(-) create mode 100644 src/dialogs/ntqcolordialog.h create mode 100644 src/dialogs/ntqdialog.h create mode 100644 src/dialogs/ntqerrormessage.h create mode 100644 src/dialogs/ntqfiledialog.h create mode 100644 src/dialogs/ntqfontdialog.h create mode 100644 src/dialogs/ntqinputdialog.h create mode 100644 src/dialogs/ntqmessagebox.h create mode 100644 src/dialogs/ntqprintdialog.h create mode 100644 src/dialogs/ntqprogressdialog.h create mode 100644 src/dialogs/ntqsemimodal.h create mode 100644 src/dialogs/ntqtabdialog.h create mode 100644 src/dialogs/ntqwizard.h delete mode 100644 src/dialogs/qcolordialog.h delete mode 100644 src/dialogs/qdialog.h delete mode 100644 src/dialogs/qerrormessage.h delete mode 100644 src/dialogs/qfiledialog.h delete mode 100644 src/dialogs/qfontdialog.h delete mode 100644 src/dialogs/qinputdialog.h delete mode 100644 src/dialogs/qmessagebox.h delete mode 100644 src/dialogs/qprintdialog.h delete mode 100644 src/dialogs/qprogressdialog.h delete mode 100644 src/dialogs/qsemimodal.h delete mode 100644 src/dialogs/qtabdialog.h delete mode 100644 src/dialogs/qwizard.h (limited to 'src/dialogs') diff --git a/src/dialogs/ntqcolordialog.h b/src/dialogs/ntqcolordialog.h new file mode 100644 index 000000000..c3490ef53 --- /dev/null +++ b/src/dialogs/ntqcolordialog.h @@ -0,0 +1,93 @@ +/**************************************************************************** +** +** Definition of TQColorDialog class +** +** Created : 990222 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQCOLORDIALOG_H +#define TQCOLORDIALOG_H + +#ifndef QT_H +#include "ntqdialog.h" +#endif // QT_H + +#ifndef QT_NO_COLORDIALOG + +class TQColorDialogPrivate; + +class Q_EXPORT TQColorDialog : public TQDialog +{ + Q_OBJECT + +public: + static TQColor getColor( const TQColor& init = white, TQWidget* parent=0, const char* name=0 ); + static TQRgb getRgba( TQRgb, bool* ok = 0, + TQWidget* parent=0, const char* name=0 ); + + static int customCount(); + static TQRgb customColor( int ); + static void setCustomColor( int, TQRgb ); + static void setStandardColor( int, TQRgb ); + +private: + ~TQColorDialog(); + TQColorDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE ); + + void setColor( const TQColor& ); + TQColor color() const; + + bool selectColor( const TQColor& ); + + void setSelectedAlpha( int ); + int selectedAlpha() const; + + void showCustom( bool=TRUE ); + +private: // Disabled copy constructor and operator= + TQColorDialogPrivate *d; + friend class TQColorDialogPrivate; + friend class TQColorShower; + +#if defined(Q_DISABLE_COPY) + TQColorDialog( const TQColorDialog & ); + TQColorDialog& operator=( const TQColorDialog & ); +#endif +}; + +#endif + +#endif //TQCOLORDIALOG_H diff --git a/src/dialogs/ntqdialog.h b/src/dialogs/ntqdialog.h new file mode 100644 index 000000000..bc9670af6 --- /dev/null +++ b/src/dialogs/ntqdialog.h @@ -0,0 +1,141 @@ +/**************************************************************************** +** +** Definition of TQDialog class +** +** Created : 950502 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQDIALOG_H +#define TQDIALOG_H + +#ifndef QT_H +#include "ntqwidget.h" +#endif // QT_H +#ifndef QT_NO_DIALOG +#if 0 +Q_OBJECT +#endif + +class TQPushButton; +class TQDialogPrivate; + +class Q_EXPORT TQDialog : public TQWidget +{ +friend class TQPushButton; + Q_OBJECT + Q_PROPERTY( bool sizeGripEnabled READ isSizeGripEnabled WRITE setSizeGripEnabled ) + Q_PROPERTY( bool modal READ isModal WRITE setModal ) + +public: + Q_EXPLICIT TQDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, + WFlags f=0 ); + ~TQDialog(); + + enum DialogCode { Rejected, Accepted }; + + int result() const { return rescode; } + + void show(); + void hide(); + void move( int x, int y ); + void move( const TQPoint &p ); + void resize( int w, int h ); + void resize( const TQSize & ); + void setGeometry( int x, int y, int w, int h ); + void setGeometry( const TQRect & ); + + void setOrientation( Orientation orientation ); + Orientation orientation() const; + + void setExtension( TQWidget* extension ); + TQWidget* extension() const; + + TQSize sizeHint() const; + TQSize minimumSizeHint() const; + + void setSizeGripEnabled( bool ); + bool isSizeGripEnabled() const; + + void setModal( bool modal ); + bool isModal() const; +#ifdef Q_OS_TEMP + bool event( TQEvent * ); +#endif + +public slots: + int exec(); + +protected slots: + virtual void done( int ); + virtual void accept(); + virtual void reject(); + + void showExtension( bool ); + +protected: + void setResult( int r ) { rescode = r; } + void keyPressEvent( TQKeyEvent * ); + void closeEvent( TQCloseEvent * ); + void resizeEvent( TQResizeEvent * ); + void contextMenuEvent( TQContextMenuEvent * ); + bool eventFilter( TQObject *, TQEvent * ); + void adjustPosition( TQWidget*); + +private: + void setDefault( TQPushButton * ); + void setMainDefault( TQPushButton * ); + void hideDefault(); +#ifdef Q_OS_TEMP + void hideSpecial(); +#endif + + int rescode; + uint did_move : 1; + uint has_relpos : 1; + uint did_resize : 1; + uint in_loop: 1; + void adjustPositionInternal( TQWidget*, bool useRelPos = FALSE ); + TQDialogPrivate* d; + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + TQDialog( const TQDialog & ); + TQDialog &operator=( const TQDialog & ); +#endif +}; + +#endif // QT_NO_DIALOG +#endif // TQDIALOG_H diff --git a/src/dialogs/ntqerrormessage.h b/src/dialogs/ntqerrormessage.h new file mode 100644 index 000000000..91634fbf7 --- /dev/null +++ b/src/dialogs/ntqerrormessage.h @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Definition of a nice qInstallErrorMessage() handler +** +** Created : 000527, after Kalle Dalheimer's birthday +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQERRORMESSAGE_H +#define TQERRORMESSAGE_H + +#ifndef QT_H +#include "ntqdialog.h" +#endif // QT_H + +#ifndef QT_NO_ERRORMESSAGE +class TQPushButton; +class TQCheckBox; +class TQLabel; +class TQTextView; +class TQStringList; +template class TQDict; + + +class Q_EXPORT TQErrorMessage: public TQDialog { + Q_OBJECT +public: + TQErrorMessage( TQWidget* parent, const char* name=0 ); + ~TQErrorMessage(); + + static TQErrorMessage * qtHandler(); + +public slots: + void message( const TQString & ); + +protected: + void done( int ); + +private: + TQPushButton * ok; + TQCheckBox * again; + TQTextView * errors; + TQLabel * icon; + TQStringList * pending; + TQDict * doNotShow; + + bool nextPending(); + +#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator= + TQErrorMessage( const TQErrorMessage & ); + TQErrorMessage &operator=( const TQErrorMessage & ); +#endif +}; + +#endif //QT_NO_ERRORMESSAGE + +#endif diff --git a/src/dialogs/ntqfiledialog.h b/src/dialogs/ntqfiledialog.h new file mode 100644 index 000000000..cc811b636 --- /dev/null +++ b/src/dialogs/ntqfiledialog.h @@ -0,0 +1,347 @@ +/**************************************************************************** +** +** Definition of TQFileDialog class +** +** Created : 950428 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQFILEDIALOG_H +#define TQFILEDIALOG_H + +class TQPushButton; +class TQButton; +class TQLabel; +class TQWidget; +class TQFileDialog; +class TQTimer; +class TQNetworkOperation; +class TQLineEdit; +class TQListViewItem; +class TQListBoxItem; +class TQFileDialogPrivate; +class TQFileDialogTQFileListView; + +#ifndef QT_H +#include "ntqdir.h" +#include "ntqdialog.h" +#include "ntqurloperator.h" +#include "ntqurlinfo.h" +#endif // QT_H + +#if __GNUC__ - 0 > 3 +#pragma GCC system_header +#endif + +#ifndef QT_NO_FILEDIALOG + +class Q_EXPORT TQFileIconProvider : public TQObject +{ + Q_OBJECT +public: + TQFileIconProvider( TQObject * parent = 0, const char* name = 0 ); + virtual const TQPixmap * pixmap( const TQFileInfo & ); + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + TQFileIconProvider( const TQFileIconProvider & ); + TQFileIconProvider& operator=( const TQFileIconProvider & ); +#endif +}; + +class Q_EXPORT TQFilePreview +{ +public: + TQFilePreview(); + virtual void previewUrl( const TQUrl &url ) = 0; + +}; + +class Q_EXPORT TQFileDialog : public TQDialog +{ + Q_OBJECT + Q_ENUMS( Mode ViewMode PreviewMode ) + // ##### Why are this read-only properties ? + Q_PROPERTY( TQString selectedFile READ selectedFile ) + Q_PROPERTY( TQString selectedFilter READ selectedFilter ) + Q_PROPERTY( TQStringList selectedFiles READ selectedFiles ) + // #### Should not we be able to set the path ? + Q_PROPERTY( TQString dirPath READ dirPath ) + Q_PROPERTY( bool showHiddenFiles READ showHiddenFiles WRITE setShowHiddenFiles ) + Q_PROPERTY( Mode mode READ mode WRITE setMode ) + Q_PROPERTY( ViewMode viewMode READ viewMode WRITE setViewMode ) + Q_PROPERTY( PreviewMode previewMode READ previewMode WRITE setPreviewMode ) + Q_PROPERTY( bool infoPreview READ isInfoPreviewEnabled WRITE setInfoPreviewEnabled ) + Q_PROPERTY( bool contentsPreview READ isContentsPreviewEnabled WRITE setContentsPreviewEnabled ) + +public: + TQFileDialog( const TQString& dirName, const TQString& filter = TQString::null, + TQWidget* parent=0, const char* name=0, bool modal = FALSE ); + TQFileDialog( TQWidget* parent=0, const char* name=0, bool modal = FALSE ); + ~TQFileDialog(); + + // recommended static functions + + static TQString getOpenFileName( const TQString &initially = TQString::null, + const TQString &filter = TQString::null, + TQWidget *parent = 0, const char* name = 0, + const TQString &caption = TQString::null, + TQString *selectedFilter = 0, + bool resolveSymlinks = TRUE); + static TQString getSaveFileName( const TQString &initially = TQString::null, + const TQString &filter = TQString::null, + TQWidget *parent = 0, const char* name = 0, + const TQString &caption = TQString::null, + TQString *selectedFilter = 0, + bool resolveSymlinks = TRUE); + static TQString getExistingDirectory( const TQString &dir = TQString::null, + TQWidget *parent = 0, + const char* name = 0, + const TQString &caption = TQString::null, + bool dirOnly = TRUE, + bool resolveSymlinks = TRUE); + static TQStringList getOpenFileNames( const TQString &filter= TQString::null, + const TQString &dir = TQString::null, + TQWidget *parent = 0, + const char* name = 0, + const TQString &caption = TQString::null, + TQString *selectedFilter = 0, + bool resolveSymlinks = TRUE); + + // other static functions + + static void setIconProvider( TQFileIconProvider * ); + static TQFileIconProvider * iconProvider(); + + // non-static function for special needs + + TQString selectedFile() const; + TQString selectedFilter() const; + virtual void setSelectedFilter( const TQString& ); + virtual void setSelectedFilter( int ); + + void setSelection( const TQString &); + + void selectAll( bool b ); + + TQStringList selectedFiles() const; + + TQString dirPath() const; + + void setDir( const TQDir & ); + const TQDir *dir() const; + + void setShowHiddenFiles( bool s ); + bool showHiddenFiles() const; + + void rereadDir(); + void resortDir(); + + enum Mode { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly }; + void setMode( Mode ); + Mode mode() const; + + enum ViewMode { Detail, List }; + enum PreviewMode { NoPreview, Contents, Info }; + void setViewMode( ViewMode m ); + ViewMode viewMode() const; + void setPreviewMode( PreviewMode m ); + PreviewMode previewMode() const; + + bool eventFilter( TQObject *, TQEvent * ); + + bool isInfoPreviewEnabled() const; + bool isContentsPreviewEnabled() const; + void setInfoPreviewEnabled( bool ); + void setContentsPreviewEnabled( bool ); + + void setInfoPreview( TQWidget *w, TQFilePreview *preview ); + void setContentsPreview( TQWidget *w, TQFilePreview *preview ); + + TQUrl url() const; + + void addFilter( const TQString &filter ); + +public slots: + void done( int ); + void setDir( const TQString& ); + void setUrl( const TQUrlOperator &url ); + void setFilter( const TQString& ); + void setFilters( const TQString& ); + void setFilters( const char ** ); + void setFilters( const TQStringList& ); + +protected: + void resizeEvent( TQResizeEvent * ); + void keyPressEvent( TQKeyEvent * ); + + void addWidgets( TQLabel *, TQWidget *, TQPushButton * ); + void addToolButton( TQButton *b, bool separator = FALSE ); + void addLeftWidget( TQWidget *w ); + void addRightWidget( TQWidget *w ); + +signals: + void fileHighlighted( const TQString& ); + void fileSelected( const TQString& ); + void filesSelected( const TQStringList& ); + void dirEntered( const TQString& ); + void filterSelected( const TQString& ); + +private slots: + void detailViewSelectionChanged(); + void listBoxSelectionChanged(); + void changeMode( int ); + void fileNameEditReturnPressed(); + void stopCopy(); + void removeProgressDia(); + + void fileSelected( int ); + void fileHighlighted( int ); + void dirSelected( int ); + void pathSelected( int ); + + void updateFileNameEdit( TQListViewItem *); + void selectDirectoryOrFile( TQListViewItem * ); + void popupContextMenu( TQListViewItem *, const TQPoint &, int ); + void popupContextMenu( TQListBoxItem *, const TQPoint & ); + void updateFileNameEdit( TQListBoxItem *); + void selectDirectoryOrFile( TQListBoxItem * ); + void fileNameEditDone(); + + void okClicked(); + void filterClicked(); // not used + void cancelClicked(); + + void cdUpClicked(); + void newFolderClicked(); + + void fixupNameEdit(); + + void doMimeTypeLookup(); + + void updateGeometries(); + void modeButtonsDestroyed(); + void urlStart( TQNetworkOperation *op ); + void urlFinished( TQNetworkOperation *op ); + void dataTransferProgress( int bytesDone, int bytesTotal, TQNetworkOperation * ); + void insertEntry( const TQValueList &fi, TQNetworkOperation *op ); + void removeEntry( TQNetworkOperation * ); + void createdDirectory( const TQUrlInfo &info, TQNetworkOperation * ); + void itemChanged( TQNetworkOperation * ); + void goBack(); + +private: + enum PopupAction { + PA_Open = 0, + PA_Delete, + PA_Rename, + PA_SortName, + PA_SortSize, + PA_SortType, + PA_SortDate, + PA_SortUnsorted, + PA_Cancel, + PA_Reload, + PA_Hidden + }; + + void init(); + bool trySetSelection( bool isDir, const TQUrlOperator &, bool ); + void deleteFile( const TQString &filename ); + void popupContextMenu( const TQString &filename, bool withSort, + PopupAction &action, const TQPoint &p ); + void updatePreviews( const TQUrl &u ); + + TQDir reserved; // was cwd + TQString fileName; + + friend class TQFileDialogTQFileListView; + friend class TQFileListBox; + + TQFileDialogPrivate *d; + TQFileDialogTQFileListView *files; + + TQLineEdit *nameEdit; // also filter + TQPushButton *okB; + TQPushButton *cancelB; + +#if defined(Q_WS_WIN) + static TQString winGetOpenFileName( const TQString &initialSelection, + const TQString &filter, + TQString* workingDirectory, + TQWidget *parent = 0, + const char* name = 0, + const TQString& caption = TQString::null, + TQString* selectedFilter = 0 ); + static TQString winGetSaveFileName( const TQString &initialSelection, + const TQString &filter, + TQString* workingDirectory, + TQWidget *parent = 0, + const char* name = 0, + const TQString& caption = TQString::null, + TQString* selectedFilter = 0 ); + static TQStringList winGetOpenFileNames( const TQString &filter, + TQString* workingDirectory, + TQWidget *parent = 0, + const char* name = 0, + const TQString& caption = TQString::null, + TQString* selectedFilter = 0 ); + static TQString winGetExistingDirectory( const TQString &initialDirectory, + TQWidget* parent = 0, + const char* name = 0, + const TQString& caption = TQString::null); + static TQString resolveLinkFile( const TQString& linkfile ); +#endif +#if defined(Q_WS_MACX) || defined(Q_WS_MAC9) + static TQString macGetSaveFileName( const TQString &, const TQString &, + TQString *, TQWidget *, const char*, + const TQString&, TQString *); + static TQStringList macGetOpenFileNames( const TQString &, TQString*, + TQWidget *, const char *, + const TQString&, TQString *, + bool = TRUE, bool = FALSE ); +#endif + + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + TQFileDialog( const TQFileDialog & ); + TQFileDialog &operator=( const TQFileDialog & ); +#endif +}; + +#endif + +#endif // TQFILEDIALOG_H diff --git a/src/dialogs/ntqfontdialog.h b/src/dialogs/ntqfontdialog.h new file mode 100644 index 000000000..bcb5e06dc --- /dev/null +++ b/src/dialogs/ntqfontdialog.h @@ -0,0 +1,112 @@ +/**************************************************************************** +** +** Definition of TQFontDialog +** +** Created : 970605 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQFONTDIALOG_H +#define TQFONTDIALOG_H + +#include "ntqwindowdefs.h" + +#ifndef QT_NO_FONTDIALOG + +// +// W A R N I N G +// ------------- +// +// This class is under development and has private constructors. +// +// You may use the public static getFont() functions which are guaranteed +// to be available in the future. +// + +#ifndef QT_H +#include "ntqdialog.h" +#include "ntqfont.h" +#endif // QT_H + +class TQFontDialogPrivate; + +class Q_EXPORT TQFontDialog: public TQDialog +{ + Q_OBJECT + +public: + static TQFont getFont( bool *ok, const TQFont &def, + TQWidget* parent=0, const char* name=0); + static TQFont getFont( bool *ok, TQWidget* parent=0, const char* name=0); + +private: + static TQFont getFont( bool *ok, const TQFont *def, + TQWidget* parent=0, const char* name=0); + + TQFontDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, + WFlags f=0 ); + ~TQFontDialog(); + + TQFont font() const; + void setFont( const TQFont &font ); + + bool eventFilter( TQObject *, TQEvent * ); + + void updateFamilies(); + void updateStyles(); + void updateSizes(); + +private slots: + void sizeChanged( const TQString &); + void familyHighlighted( int ); + void scriptHighlighted( int ); + void styleHighlighted( int ); + void sizeHighlighted( const TQString & ); + void updateSample(); + +private: + friend class TQFontDialogPrivate; + TQFontDialogPrivate * d; + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + TQFontDialog( const TQFontDialog & ); + TQFontDialog& operator=( const TQFontDialog & ); +#endif +}; + +#endif + +#endif // TQFONTDIALOG_H diff --git a/src/dialogs/ntqinputdialog.h b/src/dialogs/ntqinputdialog.h new file mode 100644 index 000000000..7b21503bb --- /dev/null +++ b/src/dialogs/ntqinputdialog.h @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Definition of TQInputDialog class +** +** Created : 991212 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQINPUTDIALOG_H +#define TQINPUTDIALOG_H + +#ifndef QT_H +#include "ntqdialog.h" +#include "ntqstring.h" +#include "ntqlineedit.h" +#endif // QT_H + +#ifndef QT_NO_INPUTDIALOG + +class TQSpinBox; +class TQComboBox; +class TQInputDialogPrivate; + +class Q_EXPORT TQInputDialog : public TQDialog +{ + Q_OBJECT + +private: + enum Type { LineEdit, SpinBox, ComboBox, EditableComboBox }; + + TQInputDialog( const TQString &label, TQWidget* parent=0, const char* name=0, + bool modal = TRUE, Type type = LineEdit ); //### 4.0: widget flag! + ~TQInputDialog(); + + TQLineEdit *lineEdit() const; + TQSpinBox *spinBox() const; + TQComboBox *comboBox() const; + TQComboBox *editableComboBox() const; + + void setType( Type t ); + Type type() const; + +public: + //### 4.0: widget flag! + static TQString getText( const TQString &caption, const TQString &label, TQLineEdit::EchoMode echo = TQLineEdit::Normal, + const TQString &text = TQString::null, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 ); + static int getInteger( const TQString &caption, const TQString &label, int value = 0, int minValue = -2147483647, + int maxValue = 2147483647, + int step = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 ); + static double getDouble( const TQString &caption, const TQString &label, double value = 0, + double minValue = -2147483647, double maxValue = 2147483647, + int decimals = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 ); + static TQString getItem( const TQString &caption, const TQString &label, const TQStringList &list, + int current = 0, bool editable = TRUE, + bool *ok = 0, TQWidget *parent = 0, const char *name = 0 ); + +private slots: + void textChanged( const TQString &s ); + void tryAccept(); + +private: + TQInputDialogPrivate *d; + friend class TQInputDialogPrivate; /* to avoid 'has no friends' warnings... */ + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + TQInputDialog( const TQInputDialog & ); + TQInputDialog &operator=( const TQInputDialog & ); +#endif +}; + +#endif // QT_NO_INPUTDIALOG + +#endif // TQINPUTDIALOG_H + diff --git a/src/dialogs/ntqmessagebox.h b/src/dialogs/ntqmessagebox.h new file mode 100644 index 000000000..5ab38f78c --- /dev/null +++ b/src/dialogs/ntqmessagebox.h @@ -0,0 +1,223 @@ +/**************************************************************************** +** +** Definition of TQMessageBox class +** +** Created : 950503 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQMESSAGEBOX_H +#define TQMESSAGEBOX_H + +#ifndef QT_H +#include "ntqdialog.h" +#endif // QT_H + +#ifndef QT_NO_MESSAGEBOX + +class TQLabel; +class TQPushButton; +struct TQMessageBoxData; + +class Q_EXPORT TQMessageBox : public TQDialog +{ + Q_OBJECT + Q_ENUMS( Icon ) + Q_PROPERTY( TQString text READ text WRITE setText ) + Q_PROPERTY( Icon icon READ icon WRITE setIcon ) + Q_PROPERTY( TQPixmap iconPixmap READ iconPixmap WRITE setIconPixmap ) + Q_PROPERTY( TextFormat textFormat READ textFormat WRITE setTextFormat ) + +public: + enum Icon { NoIcon = 0, Information = 1, Warning = 2, Critical = 3, + Question = 4 }; + + TQMessageBox( TQWidget* parent=0, const char* name=0 ); + TQMessageBox( const TQString& caption, const TQString &text, Icon icon, + int button0, int button1, int button2, + TQWidget* parent=0, const char* name=0, bool modal=TRUE, + WFlags f=WStyle_DialogBorder ); + ~TQMessageBox(); + + enum { NoButton = 0, Ok = 1, Cancel = 2, Yes = 3, No = 4, Abort = 5, + Retry = 6, Ignore = 7, YesAll = 8, NoAll = 9, ButtonMask = 0xff, + Default = 0x100, Escape = 0x200, FlagMask = 0x300 }; + + static int information( TQWidget *parent, const TQString &caption, + const TQString& text, + int button0, int button1=0, int button2=0 ); + static int information( TQWidget *parent, const TQString &caption, + const TQString& text, + const TQString& button0Text = TQString::null, + const TQString& button1Text = TQString::null, + const TQString& button2Text = TQString::null, + int defaultButtonNumber = 0, + int escapeButtonNumber = -1 ); + + static int question( TQWidget *parent, const TQString &caption, + const TQString& text, + int button0, int button1=0, int button2=0 ); + static int question( TQWidget *parent, const TQString &caption, + const TQString& text, + const TQString& button0Text = TQString::null, + const TQString& button1Text = TQString::null, + const TQString& button2Text = TQString::null, + int defaultButtonNumber = 0, + int escapeButtonNumber = -1 ); + + static int warning( TQWidget *parent, const TQString &caption, + const TQString& text, + int button0, int button1, int button2=0 ); + static int warning( TQWidget *parent, const TQString &caption, + const TQString& text, + const TQString& button0Text = TQString::null, + const TQString& button1Text = TQString::null, + const TQString& button2Text = TQString::null, + int defaultButtonNumber = 0, + int escapeButtonNumber = -1 ); + + static int critical( TQWidget *parent, const TQString &caption, + const TQString& text, + int button0, int button1, int button2=0 ); + static int critical( TQWidget *parent, const TQString &caption, + const TQString& text, + const TQString& button0Text = TQString::null, + const TQString& button1Text = TQString::null, + const TQString& button2Text = TQString::null, + int defaultButtonNumber = 0, + int escapeButtonNumber = -1 ); + + static void about( TQWidget *parent, const TQString &caption, + const TQString& text ); + + static void aboutTQt( TQWidget *parent, + const TQString& caption=TQString::null ); + +/* OBSOLETE */ + static int message( const TQString &caption, + const TQString& text, + const TQString& buttonText=TQString::null, + TQWidget *parent=0, const char * =0 ) { + return TQMessageBox::information( parent, caption, text, + buttonText.isEmpty() + ? tr("OK") : buttonText ) == 0; + } + +/* OBSOLETE */ + static bool query( const TQString &caption, + const TQString& text, + const TQString& yesButtonText=TQString::null, + const TQString& noButtonText=TQString::null, + TQWidget *parent=0, const char * = 0 ) { + return TQMessageBox::information( parent, caption, text, + yesButtonText.isEmpty() + ? tr("OK") : yesButtonText, + noButtonText ) == 0; + } + + TQString text() const; + void setText( const TQString &); + + Icon icon() const; + + void setIcon( Icon ); + void setIcon( const TQPixmap & ); + + const TQPixmap *iconPixmap() const; + void setIconPixmap( const TQPixmap & ); + + TQString buttonText( int button ) const; + void setButtonText( int button, const TQString &); + + void adjustSize(); + +/* OBSOLETE */ + static TQPixmap standardIcon( Icon icon, GUIStyle ); + + static TQPixmap standardIcon( Icon icon ); + + TextFormat textFormat() const; + void setTextFormat( TextFormat ); + +protected: + void resizeEvent( TQResizeEvent * ); + void showEvent( TQShowEvent * ); + void closeEvent( TQCloseEvent * ); + void keyPressEvent( TQKeyEvent * ); + void styleChanged( TQStyle& ); + +private slots: + void buttonClicked(); + +private: + void init( int, int, int ); + int indexOf( int ) const; + void resizeButtons(); + TQLabel *label; + TQMessageBoxData *mbd; + void *reserved1; + void *reserved2; + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + TQMessageBox( const TQMessageBox & ); + TQMessageBox &operator=( const TQMessageBox & ); +#endif +}; + +/* +* Macro to be used at the beginning of main(), e.g. +* +* #include +* #include +* int main( int argc, char**argv ) +* { +* QT_REQUIRE_VERSION( argc, argv, "3.0.5" ) +* ... +* } +*/ +#define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\ +TQString sq=TQString::fromLatin1(qVersion()); if ( (sq.section('.',0,0).toInt()<<16)+\ +(sq.section('.',1,1).toInt()<<8)+sq.section('.',2,2).toInt()<(s.section('.',0,0).toInt()<<16)+\ +(s.section('.',1,1).toInt()<<8)+s.section('.',2,2).toInt() ){if ( !qApp){ int c=0; new \ +TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\ + "%2, found TQt %3.").arg(TQString::fromLatin1(qAppName())).arg(TQString::fromLatin1(\ +str)).arg(TQString::fromLatin1(qVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\ +"Incompatible TQt Library Error" ), s, TQMessageBox::Abort,0 ); qFatal(s.ascii()); }} + + +#endif // QT_NO_MESSAGEBOX + +#endif // TQMESSAGEBOX_H diff --git a/src/dialogs/ntqprintdialog.h b/src/dialogs/ntqprintdialog.h new file mode 100644 index 000000000..ea46c6fed --- /dev/null +++ b/src/dialogs/ntqprintdialog.h @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Definition of print dialog. +** +** Created : 950829 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQPRINTDIALOG_H +#define TQPRINTDIALOG_H + +#ifndef QT_H +#include "ntqdialog.h" +#endif // QT_H + +#ifndef QT_NO_PRINTDIALOG + +class TQGroupBox; +class TQPrintDialogPrivate; +class TQListView; + +class Q_EXPORT TQPrintDialog : public TQDialog +{ + Q_OBJECT +public: + TQPrintDialog( TQPrinter *, TQWidget* parent=0, const char* name=0 ); + ~TQPrintDialog(); + + static bool getPrinterSetup( TQPrinter *, TQWidget* = 0 ); + static void setGlobalPrintDialog( TQPrintDialog * ); + + void setPrinter( TQPrinter *, bool = FALSE ); + TQPrinter * printer() const; + + void addButton( TQPushButton *but ); + +private slots: + void browseClicked(); + void okClicked(); + + void printerOrFileSelected( int ); + void landscapeSelected( int ); + void paperSizeSelected( int ); + void orientSelected( int ); + void pageOrderSelected( int ); + void colorModeSelected( int ); + void setNumCopies( int ); + void printRangeSelected( int ); + void setFirstPage( int ); + void setLastPage( int ); + + void fileNameEditChanged( const TQString &text ); + +private: + TQPrintDialogPrivate *d; + + TQGroupBox * setupDestination(); + TQGroupBox * setupOptions(); + TQGroupBox * setupPaper(); + TQGroupBox * setupPrinterSettings(); + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + TQPrintDialog( const TQPrintDialog & ); + TQPrintDialog &operator=( const TQPrintDialog & ); +#endif +}; + +#endif + +#endif // TQPRINTDIALOG_H diff --git a/src/dialogs/ntqprogressdialog.h b/src/dialogs/ntqprogressdialog.h new file mode 100644 index 000000000..e480f2862 --- /dev/null +++ b/src/dialogs/ntqprogressdialog.h @@ -0,0 +1,141 @@ +/**************************************************************************** +** +** Definition of TQProgressDialog class +** +** Created : 970520 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQPROGRESSDIALOG_H +#define TQPROGRESSDIALOG_H + +#ifndef QT_H +#include "ntqsemimodal.h" +#include "ntqlabel.h" // ### remove or keep for users' convenience? +#include "ntqprogressbar.h" // ### remove or keep for users' convenience? +#endif // QT_H + +#ifndef QT_NO_PROGRESSDIALOG + +class TQPushButton; +class TQTimer; +class TQProgressDialogData; + +class Q_EXPORT TQProgressDialog : public TQDialog +{ + Q_OBJECT + Q_PROPERTY( bool wasCancelled READ wasCancelled DESIGNABLE false STORED false ) // ### remove in 4.0 + Q_PROPERTY( bool wasCanceled READ wasCanceled ) + Q_PROPERTY( int totalSteps READ totalSteps WRITE setTotalSteps ) + Q_PROPERTY( int progress READ progress WRITE setProgress ) + Q_PROPERTY( bool autoReset READ autoReset WRITE setAutoReset ) + Q_PROPERTY( bool autoClose READ autoClose WRITE setAutoClose ) + Q_PROPERTY( int minimumDuration READ minimumDuration WRITE setMinimumDuration ) + Q_PROPERTY( TQString labelText READ labelText WRITE setLabelText ) + +public: + TQProgressDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, + WFlags f=0 ); + TQProgressDialog( const TQString& labelText, const TQString &cancelButtonText, + int totalSteps, TQWidget* parent=0, const char* name=0, + bool modal=FALSE, WFlags f=0 ); + ~TQProgressDialog(); + + void setLabel( TQLabel * ); + void setCancelButton( TQPushButton * ); + void setBar( TQProgressBar * ); + + // ### TQt 4.0: remove wasCancelled() in 4.0 + bool wasCancelled() const; + inline bool wasCanceled() const { return wasCancelled(); } + + int totalSteps() const; + int progress() const; + + TQSize sizeHint() const; + + TQString labelText() const; + + void setAutoReset( bool b ); + bool autoReset() const; + void setAutoClose( bool b ); + bool autoClose() const; + +public slots: + void cancel(); + void reset(); + void setTotalSteps( int totalSteps ); + void setProgress( int progress ); + void setProgress( int progress, int totalSteps ); + void setLabelText( const TQString &); + void setCancelButtonText( const TQString &); + + void setMinimumDuration( int ms ); +public: + int minimumDuration() const; + +signals: + // ### remove cancelled() in 4.0 + void cancelled(); + void canceled(); + +protected: + void resizeEvent( TQResizeEvent * ); + void closeEvent( TQCloseEvent * ); + void styleChange( TQStyle& ); + void showEvent( TQShowEvent *e ); + +protected slots: + void forceShow(); + +private: + void init( TQWidget *creator, const TQString& lbl, const TQString &canc, + int totstps); + void layout(); + TQLabel *label() const; + TQProgressBar *bar() const; + TQProgressDialogData *d; + TQTimer *forceTimer; + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + TQProgressDialog( const TQProgressDialog & ); + TQProgressDialog &operator=( const TQProgressDialog & ); +#endif +}; + +#endif // QT_NO_PROGRESSDIALOG + +#endif // TQPROGRESSDIALOG_H diff --git a/src/dialogs/ntqsemimodal.h b/src/dialogs/ntqsemimodal.h new file mode 100644 index 000000000..ff015b7f6 --- /dev/null +++ b/src/dialogs/ntqsemimodal.h @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Definition of TQSemiModal class for source compatibility +** +** Created : 001010 +** +** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQSEMIMODAL_H +#define TQSEMIMODAL_H + +#ifndef QT_H +#include "ntqdialog.h" +#endif // QT_H + +#ifndef QT_NO_COMPAT +#ifndef QT_NO_SEMIMODAL +class Q_EXPORT TQSemiModal : public TQDialog +{ + Q_OBJECT +public: + TQSemiModal( TQWidget* parent=0, const char* name=0, bool modal=FALSE, WFlags f=0 ) + : TQDialog( parent, name, modal, f ) { } + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + TQSemiModal( const TQSemiModal & ); + TQSemiModal &operator=( const TQSemiModal & ); +#endif +}; +#endif +#endif + +#endif // TQSEMIMODAL_H diff --git a/src/dialogs/ntqtabdialog.h b/src/dialogs/ntqtabdialog.h new file mode 100644 index 000000000..216225289 --- /dev/null +++ b/src/dialogs/ntqtabdialog.h @@ -0,0 +1,146 @@ +/**************************************************************************** +** +** Definition of TQTabDialog class +** +** Created : 960825 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQTABDIALOG_H +#define TQTABDIALOG_H + +#ifndef QT_H +#include "ntqdialog.h" +#include "ntqiconset.h" +#endif // QT_H + +#ifndef QT_NO_TABDIALOG + +class TQTabBar; +class TQTab; +class TQTabDialogPrivate; + +class Q_EXPORT TQTabDialog : public TQDialog +{ + Q_OBJECT +public: + TQTabDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, + WFlags f=0 ); + ~TQTabDialog(); + + void show(); + void setFont( const TQFont & font ); + + void addTab( TQWidget *, const TQString &); + void addTab( TQWidget *child, const TQIconSet& iconset, const TQString &label); + void addTab( TQWidget *, TQTab* ); + + void insertTab( TQWidget *, const TQString &, int index = -1); + void insertTab( TQWidget *child, const TQIconSet& iconset, const TQString &label, int index = -1); + void insertTab( TQWidget *, TQTab*, int index = -1 ); + + void changeTab( TQWidget *, const TQString &); + void changeTab( TQWidget *child, const TQIconSet& iconset, const TQString &label); + + bool isTabEnabled( TQWidget * ) const; + void setTabEnabled( TQWidget *, bool ); + bool isTabEnabled( const char* ) const; // compatibility + void setTabEnabled( const char*, bool ); // compatibility + + void showPage( TQWidget * ); + void removePage( TQWidget * ); + TQString tabLabel( TQWidget * ); + + TQWidget * currentPage() const; + + void setDefaultButton( const TQString &text ); + void setDefaultButton(); + bool hasDefaultButton() const; + + void setHelpButton( const TQString &text ); + void setHelpButton(); + bool hasHelpButton() const; + + void setCancelButton( const TQString &text ); + void setCancelButton(); + bool hasCancelButton() const; + + void setApplyButton( const TQString &text ); + void setApplyButton(); + bool hasApplyButton() const; + +#ifndef Q_QDOC + void setOKButton( const TQString &text = TQString::null ); +#endif + void setOkButton( const TQString &text ); + void setOkButton(); + bool hasOkButton() const; + +protected: + void paintEvent( TQPaintEvent * ); + void resizeEvent( TQResizeEvent * ); + void styleChange( TQStyle& ); + void setTabBar( TQTabBar* ); + TQTabBar* tabBar() const; + +signals: + void aboutToShow(); + + void applyButtonPressed(); + void cancelButtonPressed(); + void defaultButtonPressed(); + void helpButtonPressed(); + + void currentChanged( TQWidget * ); + void selected( const TQString& ); // obsolete + +private slots: + void showTab( int i ); + +private: + void setSizes(); + void setUpLayout(); + + TQTabDialogPrivate *d; +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + TQTabDialog( const TQTabDialog & ); + TQTabDialog& operator=( const TQTabDialog & ); +#endif +}; + +#endif // QT_NO_TABDIALOG + +#endif // TQTABDIALOG_H diff --git a/src/dialogs/ntqwizard.h b/src/dialogs/ntqwizard.h new file mode 100644 index 000000000..b366f29ca --- /dev/null +++ b/src/dialogs/ntqwizard.h @@ -0,0 +1,142 @@ +/**************************************************************************** +** +** Definition of the TQWizard class. +** +** Created : 990101 +** +** Copyright (C) 1999-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the dialogs 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 files LICENSE.GPL2 +** and LICENSE.GPL3 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 +** Public Licensing requirements will be met: +** 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 TQWIZARDDIALOG_H +#define TQWIZARDDIALOG_H + + +#ifndef QT_H +#include "ntqdialog.h" +#endif // QT_H + +#ifndef QT_NO_WIZARD + +class TQHBoxLayout; +class TQWizardPrivate; + +class Q_EXPORT TQWizard : public TQDialog +{ + Q_OBJECT + Q_PROPERTY( TQFont titleFont READ titleFont WRITE setTitleFont ) + +public: + TQWizard( TQWidget* parent=0, const char* name=0, bool modal=FALSE, + WFlags f=0 ); + ~TQWizard(); + + void show(); + + void setFont( const TQFont & font ); + + virtual void addPage( TQWidget *, const TQString & ); + virtual void insertPage( TQWidget*, const TQString&, int ); + virtual void removePage( TQWidget * ); + + TQString title( TQWidget * ) const; + void setTitle( TQWidget *, const TQString & ); + TQFont titleFont() const; + void setTitleFont( const TQFont & ); + + virtual void showPage( TQWidget * ); + + TQWidget * currentPage() const; + + TQWidget* page( int ) const; + int pageCount() const; + int indexOf( TQWidget* ) const; + + virtual bool appropriate( TQWidget * ) const; + virtual void setAppropriate( TQWidget *, bool ); + + TQPushButton * backButton() const; + TQPushButton * nextButton() const; + TQPushButton * finishButton() const; + TQPushButton * cancelButton() const; + TQPushButton * helpButton() const; + + bool eventFilter( TQObject *, TQEvent * ); + +public slots: + virtual void setBackEnabled( TQWidget *, bool ); + virtual void setNextEnabled( TQWidget *, bool ); + virtual void setFinishEnabled( TQWidget *, bool ); + + virtual void setHelpEnabled( TQWidget *, bool ); + + // obsolete + virtual void setFinish( TQWidget *, bool ) {} + +protected slots: + virtual void back(); + virtual void next(); + virtual void help(); + +signals: + void helpClicked(); + void selected( const TQString& ); + +protected: + virtual void layOutButtonRow( TQHBoxLayout * ); + virtual void layOutTitleRow( TQHBoxLayout *, const TQString & ); + +private: + void setBackEnabled( bool ); + void setNextEnabled( bool ); + + void setHelpEnabled( bool ); + + void setNextPage( TQWidget * ); + + void updateButtons(); + + void layOut(); + + TQWizardPrivate *d; + +private: // Disabled copy constructor and operator= +#if defined(Q_DISABLE_COPY) + TQWizard( const TQWizard & ); + TQWizard& operator=( const TQWizard & ); +#endif +}; + +#endif // QT_NO_WIZARD + +#endif // TQWIZARD_H diff --git a/src/dialogs/qcolordialog.cpp b/src/dialogs/qcolordialog.cpp index 0a3be03fb..e275f02b9 100644 --- a/src/dialogs/qcolordialog.cpp +++ b/src/dialogs/qcolordialog.cpp @@ -38,25 +38,25 @@ ** **********************************************************************/ -#include "qcolordialog.h" +#include "ntqcolordialog.h" #ifndef QT_NO_COLORDIALOG -#include "qpainter.h" -#include "qlayout.h" -#include "qlabel.h" -#include "qpushbutton.h" -#include "qlineedit.h" -#include "qimage.h" -#include "qpixmap.h" -#include "qdrawutil.h" -#include "qvalidator.h" -#include "qdragobject.h" -#include "qgridview.h" -#include "qapplication.h" -#include "qstyle.h" -#include "qsettings.h" -#include "qpopupmenu.h" +#include "ntqpainter.h" +#include "ntqlayout.h" +#include "ntqlabel.h" +#include "ntqpushbutton.h" +#include "ntqlineedit.h" +#include "ntqimage.h" +#include "ntqpixmap.h" +#include "ntqdrawutil.h" +#include "ntqvalidator.h" +#include "ntqdragobject.h" +#include "ntqgridview.h" +#include "ntqapplication.h" +#include "ntqstyle.h" +#include "ntqsettings.h" +#include "ntqpopupmenu.h" #ifdef Q_WS_MAC TQRgb macGetRgba( TQRgb initial, bool *ok, TQWidget *parent, const char* name ); @@ -1416,7 +1416,7 @@ void TQColorDialogPrivate::addCustom() /*! - \class TQColorDialog qcolordialog.h + \class TQColorDialog ntqcolordialog.h \brief The TQColorDialog class provides a dialog widget for specifying colors. \mainclass \ingroup dialogs diff --git a/src/dialogs/qcolordialog.h b/src/dialogs/qcolordialog.h deleted file mode 100644 index 28c8ee1c0..000000000 --- a/src/dialogs/qcolordialog.h +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Definition of TQColorDialog class -** -** Created : 990222 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQCOLORDIALOG_H -#define TQCOLORDIALOG_H - -#ifndef QT_H -#include "qdialog.h" -#endif // QT_H - -#ifndef QT_NO_COLORDIALOG - -class TQColorDialogPrivate; - -class Q_EXPORT TQColorDialog : public TQDialog -{ - Q_OBJECT - -public: - static TQColor getColor( const TQColor& init = white, TQWidget* parent=0, const char* name=0 ); - static TQRgb getRgba( TQRgb, bool* ok = 0, - TQWidget* parent=0, const char* name=0 ); - - static int customCount(); - static TQRgb customColor( int ); - static void setCustomColor( int, TQRgb ); - static void setStandardColor( int, TQRgb ); - -private: - ~TQColorDialog(); - TQColorDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE ); - - void setColor( const TQColor& ); - TQColor color() const; - - bool selectColor( const TQColor& ); - - void setSelectedAlpha( int ); - int selectedAlpha() const; - - void showCustom( bool=TRUE ); - -private: // Disabled copy constructor and operator= - TQColorDialogPrivate *d; - friend class TQColorDialogPrivate; - friend class TQColorShower; - -#if defined(Q_DISABLE_COPY) - TQColorDialog( const TQColorDialog & ); - TQColorDialog& operator=( const TQColorDialog & ); -#endif -}; - -#endif - -#endif //TQCOLORDIALOG_H diff --git a/src/dialogs/qdialog.cpp b/src/dialogs/qdialog.cpp index 4f99ae9e6..1ef49e0c0 100644 --- a/src/dialogs/qdialog.cpp +++ b/src/dialogs/qdialog.cpp @@ -38,22 +38,22 @@ ** **********************************************************************/ -#include "qdialog.h" +#include "ntqdialog.h" #ifndef QT_NO_DIALOG -#include "qpushbutton.h" -#include "qfocusdata.h" -#include "qapplication.h" -#include "qobjectlist.h" -#include "qwidgetlist.h" -#include "qlayout.h" -#include "qsizegrip.h" -#include "qwhatsthis.h" -#include "qpopupmenu.h" -#include "qcursor.h" +#include "ntqpushbutton.h" +#include "ntqfocusdata.h" +#include "ntqapplication.h" +#include "ntqobjectlist.h" +#include "ntqwidgetlist.h" +#include "ntqlayout.h" +#include "ntqsizegrip.h" +#include "ntqwhatsthis.h" +#include "ntqpopupmenu.h" +#include "ntqcursor.h" #if defined(QT_ACCESSIBILITY_SUPPORT) -#include "qaccessible.h" +#include "ntqaccessible.h" #endif #if defined( Q_OS_TEMP ) #include "qt_windows.h" @@ -344,7 +344,7 @@ void TQDialog::hideDefault() Hides special buttons which are rather shown in the titlebar on WinCE, to conserve screen space. */ -# include "qmessagebox.h" +# include "ntqmessagebox.h" extern const char * mb_texts[]; // Defined in qmessagebox.cpp void TQDialog::hideSpecial() { diff --git a/src/dialogs/qdialog.h b/src/dialogs/qdialog.h deleted file mode 100644 index 068b4d360..000000000 --- a/src/dialogs/qdialog.h +++ /dev/null @@ -1,141 +0,0 @@ -/**************************************************************************** -** -** Definition of TQDialog class -** -** Created : 950502 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQDIALOG_H -#define TQDIALOG_H - -#ifndef QT_H -#include "qwidget.h" -#endif // QT_H -#ifndef QT_NO_DIALOG -#if 0 -Q_OBJECT -#endif - -class TQPushButton; -class TQDialogPrivate; - -class Q_EXPORT TQDialog : public TQWidget -{ -friend class TQPushButton; - Q_OBJECT - Q_PROPERTY( bool sizeGripEnabled READ isSizeGripEnabled WRITE setSizeGripEnabled ) - Q_PROPERTY( bool modal READ isModal WRITE setModal ) - -public: - Q_EXPLICIT TQDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, - WFlags f=0 ); - ~TQDialog(); - - enum DialogCode { Rejected, Accepted }; - - int result() const { return rescode; } - - void show(); - void hide(); - void move( int x, int y ); - void move( const TQPoint &p ); - void resize( int w, int h ); - void resize( const TQSize & ); - void setGeometry( int x, int y, int w, int h ); - void setGeometry( const TQRect & ); - - void setOrientation( Orientation orientation ); - Orientation orientation() const; - - void setExtension( TQWidget* extension ); - TQWidget* extension() const; - - TQSize sizeHint() const; - TQSize minimumSizeHint() const; - - void setSizeGripEnabled( bool ); - bool isSizeGripEnabled() const; - - void setModal( bool modal ); - bool isModal() const; -#ifdef Q_OS_TEMP - bool event( TQEvent * ); -#endif - -public slots: - int exec(); - -protected slots: - virtual void done( int ); - virtual void accept(); - virtual void reject(); - - void showExtension( bool ); - -protected: - void setResult( int r ) { rescode = r; } - void keyPressEvent( TQKeyEvent * ); - void closeEvent( TQCloseEvent * ); - void resizeEvent( TQResizeEvent * ); - void contextMenuEvent( TQContextMenuEvent * ); - bool eventFilter( TQObject *, TQEvent * ); - void adjustPosition( TQWidget*); - -private: - void setDefault( TQPushButton * ); - void setMainDefault( TQPushButton * ); - void hideDefault(); -#ifdef Q_OS_TEMP - void hideSpecial(); -#endif - - int rescode; - uint did_move : 1; - uint has_relpos : 1; - uint did_resize : 1; - uint in_loop: 1; - void adjustPositionInternal( TQWidget*, bool useRelPos = FALSE ); - TQDialogPrivate* d; - -private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - TQDialog( const TQDialog & ); - TQDialog &operator=( const TQDialog & ); -#endif -}; - -#endif // QT_NO_DIALOG -#endif // TQDIALOG_H diff --git a/src/dialogs/qerrormessage.cpp b/src/dialogs/qerrormessage.cpp index 7352ee641..a33872bb8 100644 --- a/src/dialogs/qerrormessage.cpp +++ b/src/dialogs/qerrormessage.cpp @@ -38,20 +38,20 @@ ** **********************************************************************/ -#include "qerrormessage.h" +#include "ntqerrormessage.h" #ifndef QT_NO_ERRORMESSAGE -#include "qapplication.h" -#include "qcheckbox.h" -#include "qdict.h" -#include "qlabel.h" -#include "qlayout.h" -#include "qmessagebox.h" -#include "qpushbutton.h" -#include "qstringlist.h" -#include "qstylesheet.h" -#include "qtextview.h" +#include "ntqapplication.h" +#include "ntqcheckbox.h" +#include "ntqdict.h" +#include "ntqlabel.h" +#include "ntqlayout.h" +#include "ntqmessagebox.h" +#include "ntqpushbutton.h" +#include "ntqstringlist.h" +#include "ntqstylesheet.h" +#include "ntqtextview.h" #include #include diff --git a/src/dialogs/qerrormessage.h b/src/dialogs/qerrormessage.h deleted file mode 100644 index fffb7c73b..000000000 --- a/src/dialogs/qerrormessage.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Definition of a nice qInstallErrorMessage() handler -** -** Created : 000527, after Kalle Dalheimer's birthday -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQERRORMESSAGE_H -#define TQERRORMESSAGE_H - -#ifndef QT_H -#include "qdialog.h" -#endif // QT_H - -#ifndef QT_NO_ERRORMESSAGE -class TQPushButton; -class TQCheckBox; -class TQLabel; -class TQTextView; -class TQStringList; -template class TQDict; - - -class Q_EXPORT TQErrorMessage: public TQDialog { - Q_OBJECT -public: - TQErrorMessage( TQWidget* parent, const char* name=0 ); - ~TQErrorMessage(); - - static TQErrorMessage * qtHandler(); - -public slots: - void message( const TQString & ); - -protected: - void done( int ); - -private: - TQPushButton * ok; - TQCheckBox * again; - TQTextView * errors; - TQLabel * icon; - TQStringList * pending; - TQDict * doNotShow; - - bool nextPending(); - -#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator= - TQErrorMessage( const TQErrorMessage & ); - TQErrorMessage &operator=( const TQErrorMessage & ); -#endif -}; - -#endif //QT_NO_ERRORMESSAGE - -#endif diff --git a/src/dialogs/qfiledialog.cpp b/src/dialogs/qfiledialog.cpp index c9032f853..cfa6dd39d 100644 --- a/src/dialogs/qfiledialog.cpp +++ b/src/dialogs/qfiledialog.cpp @@ -50,50 +50,50 @@ # undef truncate #endif -#include "qfiledialog.h" +#include "ntqfiledialog.h" #ifndef QT_NO_FILEDIALOG #include "private/qapplication_p.h" -#include "qapplication.h" -#include "qbitmap.h" -#include "qbuttongroup.h" -#include "qcheckbox.h" -#include "qcleanuphandler.h" -#include "qcombobox.h" -#include "qcstring.h" -#include "qcursor.h" -#include "qdragobject.h" -#include "qfile.h" -#include "qguardedptr.h" -#include "qhbox.h" -#include "qheader.h" -#include "qlabel.h" -#include "qlayout.h" -#include "qlibrary.h" -#include "qlineedit.h" -#include "qlistbox.h" -#include "qlistview.h" -#include "qmap.h" -#include "qmessagebox.h" -#include "qmime.h" -#include "qnetworkprotocol.h" -#include "qobjectlist.h" -#include "qpainter.h" -#include "qpopupmenu.h" -#include "qprogressbar.h" -#include "qptrvector.h" -#include "qpushbutton.h" -#include "qregexp.h" -#include "qsemimodal.h" -#include "qsplitter.h" -#include "qstrlist.h" -#include "qstyle.h" -#include "qtimer.h" -#include "qtoolbutton.h" -#include "qtooltip.h" -#include "qvbox.h" -#include "qwidgetstack.h" +#include "ntqapplication.h" +#include "ntqbitmap.h" +#include "ntqbuttongroup.h" +#include "ntqcheckbox.h" +#include "ntqcleanuphandler.h" +#include "ntqcombobox.h" +#include "ntqcstring.h" +#include "ntqcursor.h" +#include "ntqdragobject.h" +#include "ntqfile.h" +#include "ntqguardedptr.h" +#include "ntqhbox.h" +#include "ntqheader.h" +#include "ntqlabel.h" +#include "ntqlayout.h" +#include "ntqlibrary.h" +#include "ntqlineedit.h" +#include "ntqlistbox.h" +#include "ntqlistview.h" +#include "ntqmap.h" +#include "ntqmessagebox.h" +#include "ntqmime.h" +#include "ntqnetworkprotocol.h" +#include "ntqobjectlist.h" +#include "ntqpainter.h" +#include "ntqpopupmenu.h" +#include "ntqprogressbar.h" +#include "ntqptrvector.h" +#include "ntqpushbutton.h" +#include "ntqregexp.h" +#include "ntqsemimodal.h" +#include "ntqsplitter.h" +#include "ntqstrlist.h" +#include "ntqstyle.h" +#include "ntqtimer.h" +#include "ntqtoolbutton.h" +#include "ntqtooltip.h" +#include "ntqvbox.h" +#include "ntqwidgetstack.h" #ifdef Q_WS_X11 #include "private/qtkdeintegration_x11_p.h" @@ -2164,7 +2164,7 @@ static TQStringList makeFiltersList( const TQString &filter ) } /*! - \class TQFileDialog qfiledialog.h + \class TQFileDialog ntqfiledialog.h \brief The TQFileDialog class provides dialogs that allow users to select files or directories. \ingroup dialogs \mainclass @@ -4968,7 +4968,7 @@ void TQFileDialog::keyPressEvent( TQKeyEvent * ke ) } -/*! \class TQFileIconProvider qfiledialog.h +/*! \class TQFileIconProvider ntqfiledialog.h \brief The TQFileIconProvider class provides icons for TQFileDialog to use. @@ -6445,7 +6445,7 @@ void TQFileDialog::goBack() // preview widget from TQWidget and from this class' indeed. /*! - \class TQFilePreview qfiledialog.h + \class TQFilePreview ntqfiledialog.h \ingroup misc \brief The TQFilePreview class provides file previewing in TQFileDialog. diff --git a/src/dialogs/qfiledialog.h b/src/dialogs/qfiledialog.h deleted file mode 100644 index ee13267e5..000000000 --- a/src/dialogs/qfiledialog.h +++ /dev/null @@ -1,347 +0,0 @@ -/**************************************************************************** -** -** Definition of TQFileDialog class -** -** Created : 950428 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQFILEDIALOG_H -#define TQFILEDIALOG_H - -class TQPushButton; -class TQButton; -class TQLabel; -class TQWidget; -class TQFileDialog; -class TQTimer; -class TQNetworkOperation; -class TQLineEdit; -class TQListViewItem; -class TQListBoxItem; -class TQFileDialogPrivate; -class TQFileDialogTQFileListView; - -#ifndef QT_H -#include "qdir.h" -#include "qdialog.h" -#include "qurloperator.h" -#include "qurlinfo.h" -#endif // QT_H - -#if __GNUC__ - 0 > 3 -#pragma GCC system_header -#endif - -#ifndef QT_NO_FILEDIALOG - -class Q_EXPORT TQFileIconProvider : public TQObject -{ - Q_OBJECT -public: - TQFileIconProvider( TQObject * parent = 0, const char* name = 0 ); - virtual const TQPixmap * pixmap( const TQFileInfo & ); - -private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - TQFileIconProvider( const TQFileIconProvider & ); - TQFileIconProvider& operator=( const TQFileIconProvider & ); -#endif -}; - -class Q_EXPORT TQFilePreview -{ -public: - TQFilePreview(); - virtual void previewUrl( const TQUrl &url ) = 0; - -}; - -class Q_EXPORT TQFileDialog : public TQDialog -{ - Q_OBJECT - Q_ENUMS( Mode ViewMode PreviewMode ) - // ##### Why are this read-only properties ? - Q_PROPERTY( TQString selectedFile READ selectedFile ) - Q_PROPERTY( TQString selectedFilter READ selectedFilter ) - Q_PROPERTY( TQStringList selectedFiles READ selectedFiles ) - // #### Should not we be able to set the path ? - Q_PROPERTY( TQString dirPath READ dirPath ) - Q_PROPERTY( bool showHiddenFiles READ showHiddenFiles WRITE setShowHiddenFiles ) - Q_PROPERTY( Mode mode READ mode WRITE setMode ) - Q_PROPERTY( ViewMode viewMode READ viewMode WRITE setViewMode ) - Q_PROPERTY( PreviewMode previewMode READ previewMode WRITE setPreviewMode ) - Q_PROPERTY( bool infoPreview READ isInfoPreviewEnabled WRITE setInfoPreviewEnabled ) - Q_PROPERTY( bool contentsPreview READ isContentsPreviewEnabled WRITE setContentsPreviewEnabled ) - -public: - TQFileDialog( const TQString& dirName, const TQString& filter = TQString::null, - TQWidget* parent=0, const char* name=0, bool modal = FALSE ); - TQFileDialog( TQWidget* parent=0, const char* name=0, bool modal = FALSE ); - ~TQFileDialog(); - - // recommended static functions - - static TQString getOpenFileName( const TQString &initially = TQString::null, - const TQString &filter = TQString::null, - TQWidget *parent = 0, const char* name = 0, - const TQString &caption = TQString::null, - TQString *selectedFilter = 0, - bool resolveSymlinks = TRUE); - static TQString getSaveFileName( const TQString &initially = TQString::null, - const TQString &filter = TQString::null, - TQWidget *parent = 0, const char* name = 0, - const TQString &caption = TQString::null, - TQString *selectedFilter = 0, - bool resolveSymlinks = TRUE); - static TQString getExistingDirectory( const TQString &dir = TQString::null, - TQWidget *parent = 0, - const char* name = 0, - const TQString &caption = TQString::null, - bool dirOnly = TRUE, - bool resolveSymlinks = TRUE); - static TQStringList getOpenFileNames( const TQString &filter= TQString::null, - const TQString &dir = TQString::null, - TQWidget *parent = 0, - const char* name = 0, - const TQString &caption = TQString::null, - TQString *selectedFilter = 0, - bool resolveSymlinks = TRUE); - - // other static functions - - static void setIconProvider( TQFileIconProvider * ); - static TQFileIconProvider * iconProvider(); - - // non-static function for special needs - - TQString selectedFile() const; - TQString selectedFilter() const; - virtual void setSelectedFilter( const TQString& ); - virtual void setSelectedFilter( int ); - - void setSelection( const TQString &); - - void selectAll( bool b ); - - TQStringList selectedFiles() const; - - TQString dirPath() const; - - void setDir( const TQDir & ); - const TQDir *dir() const; - - void setShowHiddenFiles( bool s ); - bool showHiddenFiles() const; - - void rereadDir(); - void resortDir(); - - enum Mode { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly }; - void setMode( Mode ); - Mode mode() const; - - enum ViewMode { Detail, List }; - enum PreviewMode { NoPreview, Contents, Info }; - void setViewMode( ViewMode m ); - ViewMode viewMode() const; - void setPreviewMode( PreviewMode m ); - PreviewMode previewMode() const; - - bool eventFilter( TQObject *, TQEvent * ); - - bool isInfoPreviewEnabled() const; - bool isContentsPreviewEnabled() const; - void setInfoPreviewEnabled( bool ); - void setContentsPreviewEnabled( bool ); - - void setInfoPreview( TQWidget *w, TQFilePreview *preview ); - void setContentsPreview( TQWidget *w, TQFilePreview *preview ); - - TQUrl url() const; - - void addFilter( const TQString &filter ); - -public slots: - void done( int ); - void setDir( const TQString& ); - void setUrl( const TQUrlOperator &url ); - void setFilter( const TQString& ); - void setFilters( const TQString& ); - void setFilters( const char ** ); - void setFilters( const TQStringList& ); - -protected: - void resizeEvent( TQResizeEvent * ); - void keyPressEvent( TQKeyEvent * ); - - void addWidgets( TQLabel *, TQWidget *, TQPushButton * ); - void addToolButton( TQButton *b, bool separator = FALSE ); - void addLeftWidget( TQWidget *w ); - void addRightWidget( TQWidget *w ); - -signals: - void fileHighlighted( const TQString& ); - void fileSelected( const TQString& ); - void filesSelected( const TQStringList& ); - void dirEntered( const TQString& ); - void filterSelected( const TQString& ); - -private slots: - void detailViewSelectionChanged(); - void listBoxSelectionChanged(); - void changeMode( int ); - void fileNameEditReturnPressed(); - void stopCopy(); - void removeProgressDia(); - - void fileSelected( int ); - void fileHighlighted( int ); - void dirSelected( int ); - void pathSelected( int ); - - void updateFileNameEdit( TQListViewItem *); - void selectDirectoryOrFile( TQListViewItem * ); - void popupContextMenu( TQListViewItem *, const TQPoint &, int ); - void popupContextMenu( TQListBoxItem *, const TQPoint & ); - void updateFileNameEdit( TQListBoxItem *); - void selectDirectoryOrFile( TQListBoxItem * ); - void fileNameEditDone(); - - void okClicked(); - void filterClicked(); // not used - void cancelClicked(); - - void cdUpClicked(); - void newFolderClicked(); - - void fixupNameEdit(); - - void doMimeTypeLookup(); - - void updateGeometries(); - void modeButtonsDestroyed(); - void urlStart( TQNetworkOperation *op ); - void urlFinished( TQNetworkOperation *op ); - void dataTransferProgress( int bytesDone, int bytesTotal, TQNetworkOperation * ); - void insertEntry( const TQValueList &fi, TQNetworkOperation *op ); - void removeEntry( TQNetworkOperation * ); - void createdDirectory( const TQUrlInfo &info, TQNetworkOperation * ); - void itemChanged( TQNetworkOperation * ); - void goBack(); - -private: - enum PopupAction { - PA_Open = 0, - PA_Delete, - PA_Rename, - PA_SortName, - PA_SortSize, - PA_SortType, - PA_SortDate, - PA_SortUnsorted, - PA_Cancel, - PA_Reload, - PA_Hidden - }; - - void init(); - bool trySetSelection( bool isDir, const TQUrlOperator &, bool ); - void deleteFile( const TQString &filename ); - void popupContextMenu( const TQString &filename, bool withSort, - PopupAction &action, const TQPoint &p ); - void updatePreviews( const TQUrl &u ); - - TQDir reserved; // was cwd - TQString fileName; - - friend class TQFileDialogTQFileListView; - friend class TQFileListBox; - - TQFileDialogPrivate *d; - TQFileDialogTQFileListView *files; - - TQLineEdit *nameEdit; // also filter - TQPushButton *okB; - TQPushButton *cancelB; - -#if defined(Q_WS_WIN) - static TQString winGetOpenFileName( const TQString &initialSelection, - const TQString &filter, - TQString* workingDirectory, - TQWidget *parent = 0, - const char* name = 0, - const TQString& caption = TQString::null, - TQString* selectedFilter = 0 ); - static TQString winGetSaveFileName( const TQString &initialSelection, - const TQString &filter, - TQString* workingDirectory, - TQWidget *parent = 0, - const char* name = 0, - const TQString& caption = TQString::null, - TQString* selectedFilter = 0 ); - static TQStringList winGetOpenFileNames( const TQString &filter, - TQString* workingDirectory, - TQWidget *parent = 0, - const char* name = 0, - const TQString& caption = TQString::null, - TQString* selectedFilter = 0 ); - static TQString winGetExistingDirectory( const TQString &initialDirectory, - TQWidget* parent = 0, - const char* name = 0, - const TQString& caption = TQString::null); - static TQString resolveLinkFile( const TQString& linkfile ); -#endif -#if defined(Q_WS_MACX) || defined(Q_WS_MAC9) - static TQString macGetSaveFileName( const TQString &, const TQString &, - TQString *, TQWidget *, const char*, - const TQString&, TQString *); - static TQStringList macGetOpenFileNames( const TQString &, TQString*, - TQWidget *, const char *, - const TQString&, TQString *, - bool = TRUE, bool = FALSE ); -#endif - - -private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - TQFileDialog( const TQFileDialog & ); - TQFileDialog &operator=( const TQFileDialog & ); -#endif -}; - -#endif - -#endif // TQFILEDIALOG_H diff --git a/src/dialogs/qfontdialog.cpp b/src/dialogs/qfontdialog.cpp index 317a2ec1e..48ecb3d61 100644 --- a/src/dialogs/qfontdialog.cpp +++ b/src/dialogs/qfontdialog.cpp @@ -38,33 +38,33 @@ ** **********************************************************************/ -#include "qwindowdefs.h" +#include "ntqwindowdefs.h" #ifndef QT_NO_FONTDIALOG -#include "qfontdialog.h" - -#include "qlineedit.h" -#include "qlistbox.h" -#include "qpushbutton.h" -#include "qcheckbox.h" -#include "qcombobox.h" -#include "qlayout.h" -#include "qvgroupbox.h" -#include "qhgroupbox.h" -#include "qlabel.h" -#include "qapplication.h" -#include "qfontdatabase.h" -#include "qstyle.h" +#include "ntqfontdialog.h" + +#include "ntqlineedit.h" +#include "ntqlistbox.h" +#include "ntqpushbutton.h" +#include "ntqcheckbox.h" +#include "ntqcombobox.h" +#include "ntqlayout.h" +#include "ntqvgroupbox.h" +#include "ntqhgroupbox.h" +#include "ntqlabel.h" +#include "ntqapplication.h" +#include "ntqfontdatabase.h" +#include "ntqstyle.h" #include -#include +#include #ifdef Q_WS_X11 #include "private/qtkdeintegration_x11_p.h" #endif /*! - \class TQFontDialog qfontdialog.h + \class TQFontDialog ntqfontdialog.h \ingroup dialogs \mainclass \brief The TQFontDialog class provides a dialog widget for selecting a font. @@ -470,7 +470,7 @@ bool TQFontDialog::eventFilter( TQObject * o , TQEvent * e ) #endif #ifdef SHOW_FONTS_IN_FAMILIES -#include "qpainter.h" +#include "ntqpainter.h" #include class TQListBoxFontText : public TQListBoxText diff --git a/src/dialogs/qfontdialog.h b/src/dialogs/qfontdialog.h deleted file mode 100644 index 53e625f23..000000000 --- a/src/dialogs/qfontdialog.h +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** Definition of TQFontDialog -** -** Created : 970605 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQFONTDIALOG_H -#define TQFONTDIALOG_H - -#include "qwindowdefs.h" - -#ifndef QT_NO_FONTDIALOG - -// -// W A R N I N G -// ------------- -// -// This class is under development and has private constructors. -// -// You may use the public static getFont() functions which are guaranteed -// to be available in the future. -// - -#ifndef QT_H -#include "qdialog.h" -#include "qfont.h" -#endif // QT_H - -class TQFontDialogPrivate; - -class Q_EXPORT TQFontDialog: public TQDialog -{ - Q_OBJECT - -public: - static TQFont getFont( bool *ok, const TQFont &def, - TQWidget* parent=0, const char* name=0); - static TQFont getFont( bool *ok, TQWidget* parent=0, const char* name=0); - -private: - static TQFont getFont( bool *ok, const TQFont *def, - TQWidget* parent=0, const char* name=0); - - TQFontDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, - WFlags f=0 ); - ~TQFontDialog(); - - TQFont font() const; - void setFont( const TQFont &font ); - - bool eventFilter( TQObject *, TQEvent * ); - - void updateFamilies(); - void updateStyles(); - void updateSizes(); - -private slots: - void sizeChanged( const TQString &); - void familyHighlighted( int ); - void scriptHighlighted( int ); - void styleHighlighted( int ); - void sizeHighlighted( const TQString & ); - void updateSample(); - -private: - friend class TQFontDialogPrivate; - TQFontDialogPrivate * d; - -private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - TQFontDialog( const TQFontDialog & ); - TQFontDialog& operator=( const TQFontDialog & ); -#endif -}; - -#endif - -#endif // TQFONTDIALOG_H diff --git a/src/dialogs/qinputdialog.cpp b/src/dialogs/qinputdialog.cpp index a75d24b5c..7b285da97 100644 --- a/src/dialogs/qinputdialog.cpp +++ b/src/dialogs/qinputdialog.cpp @@ -38,19 +38,19 @@ ** **********************************************************************/ -#include "qinputdialog.h" +#include "ntqinputdialog.h" #ifndef QT_NO_INPUTDIALOG -#include "qlayout.h" -#include "qlabel.h" -#include "qlineedit.h" -#include "qpushbutton.h" -#include "qspinbox.h" -#include "qcombobox.h" -#include "qwidgetstack.h" -#include "qvalidator.h" -#include "qapplication.h" +#include "ntqlayout.h" +#include "ntqlabel.h" +#include "ntqlineedit.h" +#include "ntqpushbutton.h" +#include "ntqspinbox.h" +#include "ntqcombobox.h" +#include "ntqwidgetstack.h" +#include "ntqvalidator.h" +#include "ntqapplication.h" class TQInputDialogPrivate { diff --git a/src/dialogs/qinputdialog.h b/src/dialogs/qinputdialog.h deleted file mode 100644 index 96db6e557..000000000 --- a/src/dialogs/qinputdialog.h +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Definition of TQInputDialog class -** -** Created : 991212 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQINPUTDIALOG_H -#define TQINPUTDIALOG_H - -#ifndef QT_H -#include "qdialog.h" -#include "qstring.h" -#include "qlineedit.h" -#endif // QT_H - -#ifndef QT_NO_INPUTDIALOG - -class TQSpinBox; -class TQComboBox; -class TQInputDialogPrivate; - -class Q_EXPORT TQInputDialog : public TQDialog -{ - Q_OBJECT - -private: - enum Type { LineEdit, SpinBox, ComboBox, EditableComboBox }; - - TQInputDialog( const TQString &label, TQWidget* parent=0, const char* name=0, - bool modal = TRUE, Type type = LineEdit ); //### 4.0: widget flag! - ~TQInputDialog(); - - TQLineEdit *lineEdit() const; - TQSpinBox *spinBox() const; - TQComboBox *comboBox() const; - TQComboBox *editableComboBox() const; - - void setType( Type t ); - Type type() const; - -public: - //### 4.0: widget flag! - static TQString getText( const TQString &caption, const TQString &label, TQLineEdit::EchoMode echo = TQLineEdit::Normal, - const TQString &text = TQString::null, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 ); - static int getInteger( const TQString &caption, const TQString &label, int value = 0, int minValue = -2147483647, - int maxValue = 2147483647, - int step = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 ); - static double getDouble( const TQString &caption, const TQString &label, double value = 0, - double minValue = -2147483647, double maxValue = 2147483647, - int decimals = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 ); - static TQString getItem( const TQString &caption, const TQString &label, const TQStringList &list, - int current = 0, bool editable = TRUE, - bool *ok = 0, TQWidget *parent = 0, const char *name = 0 ); - -private slots: - void textChanged( const TQString &s ); - void tryAccept(); - -private: - TQInputDialogPrivate *d; - friend class TQInputDialogPrivate; /* to avoid 'has no friends' warnings... */ - -private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - TQInputDialog( const TQInputDialog & ); - TQInputDialog &operator=( const TQInputDialog & ); -#endif -}; - -#endif // QT_NO_INPUTDIALOG - -#endif // TQINPUTDIALOG_H - diff --git a/src/dialogs/qmessagebox.cpp b/src/dialogs/qmessagebox.cpp index e0545de32..fc902b5a0 100644 --- a/src/dialogs/qmessagebox.cpp +++ b/src/dialogs/qmessagebox.cpp @@ -38,19 +38,19 @@ ** **********************************************************************/ -#include "qmessagebox.h" +#include "ntqmessagebox.h" #ifndef QT_NO_MESSAGEBOX -#include "qaccel.h" -#include "qlabel.h" -#include "qpushbutton.h" -#include "qimage.h" -#include "qapplication.h" -#include "qstyle.h" -#include "qobjectlist.h" +#include "ntqaccel.h" +#include "ntqlabel.h" +#include "ntqpushbutton.h" +#include "ntqimage.h" +#include "ntqapplication.h" +#include "ntqstyle.h" +#include "ntqobjectlist.h" #if defined(QT_ACCESSIBILITY_SUPPORT) -#include "qaccessible.h" +#include "ntqaccessible.h" #endif #if defined QT_NON_COMMERCIAL #include "qnc_win.h" diff --git a/src/dialogs/qmessagebox.h b/src/dialogs/qmessagebox.h deleted file mode 100644 index 65a7b6244..000000000 --- a/src/dialogs/qmessagebox.h +++ /dev/null @@ -1,223 +0,0 @@ -/**************************************************************************** -** -** Definition of TQMessageBox class -** -** Created : 950503 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQMESSAGEBOX_H -#define TQMESSAGEBOX_H - -#ifndef QT_H -#include "qdialog.h" -#endif // QT_H - -#ifndef QT_NO_MESSAGEBOX - -class TQLabel; -class TQPushButton; -struct TQMessageBoxData; - -class Q_EXPORT TQMessageBox : public TQDialog -{ - Q_OBJECT - Q_ENUMS( Icon ) - Q_PROPERTY( TQString text READ text WRITE setText ) - Q_PROPERTY( Icon icon READ icon WRITE setIcon ) - Q_PROPERTY( TQPixmap iconPixmap READ iconPixmap WRITE setIconPixmap ) - Q_PROPERTY( TextFormat textFormat READ textFormat WRITE setTextFormat ) - -public: - enum Icon { NoIcon = 0, Information = 1, Warning = 2, Critical = 3, - Question = 4 }; - - TQMessageBox( TQWidget* parent=0, const char* name=0 ); - TQMessageBox( const TQString& caption, const TQString &text, Icon icon, - int button0, int button1, int button2, - TQWidget* parent=0, const char* name=0, bool modal=TRUE, - WFlags f=WStyle_DialogBorder ); - ~TQMessageBox(); - - enum { NoButton = 0, Ok = 1, Cancel = 2, Yes = 3, No = 4, Abort = 5, - Retry = 6, Ignore = 7, YesAll = 8, NoAll = 9, ButtonMask = 0xff, - Default = 0x100, Escape = 0x200, FlagMask = 0x300 }; - - static int information( TQWidget *parent, const TQString &caption, - const TQString& text, - int button0, int button1=0, int button2=0 ); - static int information( TQWidget *parent, const TQString &caption, - const TQString& text, - const TQString& button0Text = TQString::null, - const TQString& button1Text = TQString::null, - const TQString& button2Text = TQString::null, - int defaultButtonNumber = 0, - int escapeButtonNumber = -1 ); - - static int question( TQWidget *parent, const TQString &caption, - const TQString& text, - int button0, int button1=0, int button2=0 ); - static int question( TQWidget *parent, const TQString &caption, - const TQString& text, - const TQString& button0Text = TQString::null, - const TQString& button1Text = TQString::null, - const TQString& button2Text = TQString::null, - int defaultButtonNumber = 0, - int escapeButtonNumber = -1 ); - - static int warning( TQWidget *parent, const TQString &caption, - const TQString& text, - int button0, int button1, int button2=0 ); - static int warning( TQWidget *parent, const TQString &caption, - const TQString& text, - const TQString& button0Text = TQString::null, - const TQString& button1Text = TQString::null, - const TQString& button2Text = TQString::null, - int defaultButtonNumber = 0, - int escapeButtonNumber = -1 ); - - static int critical( TQWidget *parent, const TQString &caption, - const TQString& text, - int button0, int button1, int button2=0 ); - static int critical( TQWidget *parent, const TQString &caption, - const TQString& text, - const TQString& button0Text = TQString::null, - const TQString& button1Text = TQString::null, - const TQString& button2Text = TQString::null, - int defaultButtonNumber = 0, - int escapeButtonNumber = -1 ); - - static void about( TQWidget *parent, const TQString &caption, - const TQString& text ); - - static void aboutTQt( TQWidget *parent, - const TQString& caption=TQString::null ); - -/* OBSOLETE */ - static int message( const TQString &caption, - const TQString& text, - const TQString& buttonText=TQString::null, - TQWidget *parent=0, const char * =0 ) { - return TQMessageBox::information( parent, caption, text, - buttonText.isEmpty() - ? tr("OK") : buttonText ) == 0; - } - -/* OBSOLETE */ - static bool query( const TQString &caption, - const TQString& text, - const TQString& yesButtonText=TQString::null, - const TQString& noButtonText=TQString::null, - TQWidget *parent=0, const char * = 0 ) { - return TQMessageBox::information( parent, caption, text, - yesButtonText.isEmpty() - ? tr("OK") : yesButtonText, - noButtonText ) == 0; - } - - TQString text() const; - void setText( const TQString &); - - Icon icon() const; - - void setIcon( Icon ); - void setIcon( const TQPixmap & ); - - const TQPixmap *iconPixmap() const; - void setIconPixmap( const TQPixmap & ); - - TQString buttonText( int button ) const; - void setButtonText( int button, const TQString &); - - void adjustSize(); - -/* OBSOLETE */ - static TQPixmap standardIcon( Icon icon, GUIStyle ); - - static TQPixmap standardIcon( Icon icon ); - - TextFormat textFormat() const; - void setTextFormat( TextFormat ); - -protected: - void resizeEvent( TQResizeEvent * ); - void showEvent( TQShowEvent * ); - void closeEvent( TQCloseEvent * ); - void keyPressEvent( TQKeyEvent * ); - void styleChanged( TQStyle& ); - -private slots: - void buttonClicked(); - -private: - void init( int, int, int ); - int indexOf( int ) const; - void resizeButtons(); - TQLabel *label; - TQMessageBoxData *mbd; - void *reserved1; - void *reserved2; - -private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - TQMessageBox( const TQMessageBox & ); - TQMessageBox &operator=( const TQMessageBox & ); -#endif -}; - -/* -* Macro to be used at the beginning of main(), e.g. -* -* #include -* #include -* int main( int argc, char**argv ) -* { -* QT_REQUIRE_VERSION( argc, argv, "3.0.5" ) -* ... -* } -*/ -#define QT_REQUIRE_VERSION( argc, argv, str ) { TQString s=TQString::fromLatin1(str);\ -TQString sq=TQString::fromLatin1(qVersion()); if ( (sq.section('.',0,0).toInt()<<16)+\ -(sq.section('.',1,1).toInt()<<8)+sq.section('.',2,2).toInt()<(s.section('.',0,0).toInt()<<16)+\ -(s.section('.',1,1).toInt()<<8)+s.section('.',2,2).toInt() ){if ( !qApp){ int c=0; new \ -TQApplication(argc,argv);} TQString s = TQApplication::tr("Executable '%1' requires TQt "\ - "%2, found TQt %3.").arg(TQString::fromLatin1(qAppName())).arg(TQString::fromLatin1(\ -str)).arg(TQString::fromLatin1(qVersion()) ); TQMessageBox::critical( 0, TQApplication::tr(\ -"Incompatible TQt Library Error" ), s, TQMessageBox::Abort,0 ); qFatal(s.ascii()); }} - - -#endif // QT_NO_MESSAGEBOX - -#endif // TQMESSAGEBOX_H diff --git a/src/dialogs/qprintdialog.cpp b/src/dialogs/qprintdialog.cpp index 0e00609e4..f46d1a5e6 100644 --- a/src/dialogs/qprintdialog.cpp +++ b/src/dialogs/qprintdialog.cpp @@ -38,31 +38,31 @@ ** **********************************************************************/ -#include "qprintdialog.h" +#include "ntqprintdialog.h" #ifndef QT_NO_PRINTDIALOG -#include "qfiledialog.h" -#include "qfile.h" -#include "qtextstream.h" -#include "qcombobox.h" -#include "qframe.h" -#include "qlabel.h" -#include "qlineedit.h" -#include "qpushbutton.h" -#include "qprinter.h" -#include "qlistview.h" -#include "qlayout.h" -#include "qbuttongroup.h" -#include "qradiobutton.h" -#include "qspinbox.h" -#include "qapplication.h" -#include "qheader.h" -#include "qstyle.h" -#include "qstring.h" -#include "qregexp.h" +#include "ntqfiledialog.h" +#include "ntqfile.h" +#include "ntqtextstream.h" +#include "ntqcombobox.h" +#include "ntqframe.h" +#include "ntqlabel.h" +#include "ntqlineedit.h" +#include "ntqpushbutton.h" +#include "ntqprinter.h" +#include "ntqlistview.h" +#include "ntqlayout.h" +#include "ntqbuttongroup.h" +#include "ntqradiobutton.h" +#include "ntqspinbox.h" +#include "ntqapplication.h" +#include "ntqheader.h" +#include "ntqstyle.h" +#include "ntqstring.h" +#include "ntqregexp.h" #if !defined(QT_NO_CUPS) || !defined(QT_NO_NIS) -#include "qlibrary.h" +#include "ntqlibrary.h" #endif #ifndef QT_NO_NIS @@ -825,7 +825,7 @@ static void qpd_cleanup_globaldialog() } /*! - \class TQPrintDialog qprintdialog.h + \class TQPrintDialog ntqprintdialog.h \brief The TQPrintDialog class provides a dialog for specifying the printer's configuration. diff --git a/src/dialogs/qprintdialog.h b/src/dialogs/qprintdialog.h deleted file mode 100644 index 4d411850a..000000000 --- a/src/dialogs/qprintdialog.h +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Definition of print dialog. -** -** Created : 950829 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQPRINTDIALOG_H -#define TQPRINTDIALOG_H - -#ifndef QT_H -#include "qdialog.h" -#endif // QT_H - -#ifndef QT_NO_PRINTDIALOG - -class TQGroupBox; -class TQPrintDialogPrivate; -class TQListView; - -class Q_EXPORT TQPrintDialog : public TQDialog -{ - Q_OBJECT -public: - TQPrintDialog( TQPrinter *, TQWidget* parent=0, const char* name=0 ); - ~TQPrintDialog(); - - static bool getPrinterSetup( TQPrinter *, TQWidget* = 0 ); - static void setGlobalPrintDialog( TQPrintDialog * ); - - void setPrinter( TQPrinter *, bool = FALSE ); - TQPrinter * printer() const; - - void addButton( TQPushButton *but ); - -private slots: - void browseClicked(); - void okClicked(); - - void printerOrFileSelected( int ); - void landscapeSelected( int ); - void paperSizeSelected( int ); - void orientSelected( int ); - void pageOrderSelected( int ); - void colorModeSelected( int ); - void setNumCopies( int ); - void printRangeSelected( int ); - void setFirstPage( int ); - void setLastPage( int ); - - void fileNameEditChanged( const TQString &text ); - -private: - TQPrintDialogPrivate *d; - - TQGroupBox * setupDestination(); - TQGroupBox * setupOptions(); - TQGroupBox * setupPaper(); - TQGroupBox * setupPrinterSettings(); - -private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - TQPrintDialog( const TQPrintDialog & ); - TQPrintDialog &operator=( const TQPrintDialog & ); -#endif -}; - -#endif - -#endif // TQPRINTDIALOG_H diff --git a/src/dialogs/qprogressdialog.cpp b/src/dialogs/qprogressdialog.cpp index a0f63467e..d29b4c581 100644 --- a/src/dialogs/qprogressdialog.cpp +++ b/src/dialogs/qprogressdialog.cpp @@ -38,19 +38,19 @@ ** **********************************************************************/ -#include "qprogressdialog.h" +#include "ntqprogressdialog.h" #ifndef QT_NO_PROGRESSDIALOG -#include "qaccel.h" -#include "qpainter.h" -#include "qdrawutil.h" -#include "qdatetime.h" -#include "qapplication.h" -#include "qstyle.h" -#include "qpushbutton.h" -#include "qcursor.h" -#include "qtimer.h" +#include "ntqaccel.h" +#include "ntqpainter.h" +#include "ntqdrawutil.h" +#include "ntqdatetime.h" +#include "ntqapplication.h" +#include "ntqstyle.h" +#include "ntqpushbutton.h" +#include "ntqcursor.h" +#include "ntqtimer.h" #include // If the operation is expected to take this long (as predicted by @@ -100,7 +100,7 @@ public: /*! - \class TQProgressDialog qprogressdialog.h + \class TQProgressDialog ntqprogressdialog.h \brief The TQProgressDialog class provides feedback on the progress of a slow operation. \ingroup dialogs \mainclass diff --git a/src/dialogs/qprogressdialog.h b/src/dialogs/qprogressdialog.h deleted file mode 100644 index 13b3129a8..000000000 --- a/src/dialogs/qprogressdialog.h +++ /dev/null @@ -1,141 +0,0 @@ -/**************************************************************************** -** -** Definition of TQProgressDialog class -** -** Created : 970520 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQPROGRESSDIALOG_H -#define TQPROGRESSDIALOG_H - -#ifndef QT_H -#include "qsemimodal.h" -#include "qlabel.h" // ### remove or keep for users' convenience? -#include "qprogressbar.h" // ### remove or keep for users' convenience? -#endif // QT_H - -#ifndef QT_NO_PROGRESSDIALOG - -class TQPushButton; -class TQTimer; -class TQProgressDialogData; - -class Q_EXPORT TQProgressDialog : public TQDialog -{ - Q_OBJECT - Q_PROPERTY( bool wasCancelled READ wasCancelled DESIGNABLE false STORED false ) // ### remove in 4.0 - Q_PROPERTY( bool wasCanceled READ wasCanceled ) - Q_PROPERTY( int totalSteps READ totalSteps WRITE setTotalSteps ) - Q_PROPERTY( int progress READ progress WRITE setProgress ) - Q_PROPERTY( bool autoReset READ autoReset WRITE setAutoReset ) - Q_PROPERTY( bool autoClose READ autoClose WRITE setAutoClose ) - Q_PROPERTY( int minimumDuration READ minimumDuration WRITE setMinimumDuration ) - Q_PROPERTY( TQString labelText READ labelText WRITE setLabelText ) - -public: - TQProgressDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, - WFlags f=0 ); - TQProgressDialog( const TQString& labelText, const TQString &cancelButtonText, - int totalSteps, TQWidget* parent=0, const char* name=0, - bool modal=FALSE, WFlags f=0 ); - ~TQProgressDialog(); - - void setLabel( TQLabel * ); - void setCancelButton( TQPushButton * ); - void setBar( TQProgressBar * ); - - // ### TQt 4.0: remove wasCancelled() in 4.0 - bool wasCancelled() const; - inline bool wasCanceled() const { return wasCancelled(); } - - int totalSteps() const; - int progress() const; - - TQSize sizeHint() const; - - TQString labelText() const; - - void setAutoReset( bool b ); - bool autoReset() const; - void setAutoClose( bool b ); - bool autoClose() const; - -public slots: - void cancel(); - void reset(); - void setTotalSteps( int totalSteps ); - void setProgress( int progress ); - void setProgress( int progress, int totalSteps ); - void setLabelText( const TQString &); - void setCancelButtonText( const TQString &); - - void setMinimumDuration( int ms ); -public: - int minimumDuration() const; - -signals: - // ### remove cancelled() in 4.0 - void cancelled(); - void canceled(); - -protected: - void resizeEvent( TQResizeEvent * ); - void closeEvent( TQCloseEvent * ); - void styleChange( TQStyle& ); - void showEvent( TQShowEvent *e ); - -protected slots: - void forceShow(); - -private: - void init( TQWidget *creator, const TQString& lbl, const TQString &canc, - int totstps); - void layout(); - TQLabel *label() const; - TQProgressBar *bar() const; - TQProgressDialogData *d; - TQTimer *forceTimer; - -private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - TQProgressDialog( const TQProgressDialog & ); - TQProgressDialog &operator=( const TQProgressDialog & ); -#endif -}; - -#endif // QT_NO_PROGRESSDIALOG - -#endif // TQPROGRESSDIALOG_H diff --git a/src/dialogs/qsemimodal.h b/src/dialogs/qsemimodal.h deleted file mode 100644 index 580b97bd9..000000000 --- a/src/dialogs/qsemimodal.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Definition of TQSemiModal class for source compatibility -** -** Created : 001010 -** -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQSEMIMODAL_H -#define TQSEMIMODAL_H - -#ifndef QT_H -#include "qdialog.h" -#endif // QT_H - -#ifndef QT_NO_COMPAT -#ifndef QT_NO_SEMIMODAL -class Q_EXPORT TQSemiModal : public TQDialog -{ - Q_OBJECT -public: - TQSemiModal( TQWidget* parent=0, const char* name=0, bool modal=FALSE, WFlags f=0 ) - : TQDialog( parent, name, modal, f ) { } - -private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - TQSemiModal( const TQSemiModal & ); - TQSemiModal &operator=( const TQSemiModal & ); -#endif -}; -#endif -#endif - -#endif // TQSEMIMODAL_H diff --git a/src/dialogs/qt_dialogs.pri b/src/dialogs/qt_dialogs.pri index 9bd899205..deada26e9 100644 --- a/src/dialogs/qt_dialogs.pri +++ b/src/dialogs/qt_dialogs.pri @@ -3,22 +3,22 @@ dialogs { DIALOGS_P = dialogs - HEADERS += $$DIALOGS_H/qcolordialog.h \ - $$DIALOGS_H/qdialog.h \ - $$DIALOGS_H/qerrormessage.h \ - $$DIALOGS_H/qfiledialog.h \ - $$DIALOGS_H/qfontdialog.h \ - $$DIALOGS_H/qmessagebox.h \ - $$DIALOGS_H/qprogressdialog.h \ - $$DIALOGS_H/qsemimodal.h \ - $$DIALOGS_H/qtabdialog.h \ - $$DIALOGS_H/qwizard.h \ - $$DIALOGS_H/qinputdialog.h + HEADERS += $$DIALOGS_H/ntqcolordialog.h \ + $$DIALOGS_H/ntqdialog.h \ + $$DIALOGS_H/ntqerrormessage.h \ + $$DIALOGS_H/ntqfiledialog.h \ + $$DIALOGS_H/ntqfontdialog.h \ + $$DIALOGS_H/ntqmessagebox.h \ + $$DIALOGS_H/ntqprogressdialog.h \ + $$DIALOGS_H/ntqsemimodal.h \ + $$DIALOGS_H/ntqtabdialog.h \ + $$DIALOGS_H/ntqwizard.h \ + $$DIALOGS_H/ntqinputdialog.h !embedded:mac:SOURCES += $$DIALOGS_CPP/qfiledialog_mac.cpp $$DIALOGS_CPP/qcolordialog_mac.cpp win32:SOURCES += $$DIALOGS_CPP/qfiledialog_win.cpp unix:SOURCES += $$DIALOGS_CPP/qprintdialog.cpp - unix:HEADERS += $$DIALOGS_H/qprintdialog.h + unix:HEADERS += $$DIALOGS_H/ntqprintdialog.h SOURCES += $$DIALOGS_CPP/qcolordialog.cpp \ $$DIALOGS_CPP/qdialog.cpp \ diff --git a/src/dialogs/qtabdialog.cpp b/src/dialogs/qtabdialog.cpp index 8360158b0..2315e4ac1 100644 --- a/src/dialogs/qtabdialog.cpp +++ b/src/dialogs/qtabdialog.cpp @@ -38,23 +38,23 @@ ** **********************************************************************/ -#include "qtabdialog.h" +#include "ntqtabdialog.h" #ifndef QT_NO_TABDIALOG -#include "qobjectlist.h" -#include "qtabbar.h" -#include "qtabwidget.h" -#include "qpushbutton.h" -#include "qpainter.h" -#include "qpixmap.h" -#include "qapplication.h" -#include "qtabwidget.h" -#include "qwidgetstack.h" -#include "qlayout.h" +#include "ntqobjectlist.h" +#include "ntqtabbar.h" +#include "ntqtabwidget.h" +#include "ntqpushbutton.h" +#include "ntqpainter.h" +#include "ntqpixmap.h" +#include "ntqapplication.h" +#include "ntqtabwidget.h" +#include "ntqwidgetstack.h" +#include "ntqlayout.h" /*! - \class TQTabDialog qtabdialog.h + \class TQTabDialog ntqtabdialog.h \brief The TQTabDialog class provides a stack of tabbed widgets. diff --git a/src/dialogs/qtabdialog.h b/src/dialogs/qtabdialog.h deleted file mode 100644 index 6391f6630..000000000 --- a/src/dialogs/qtabdialog.h +++ /dev/null @@ -1,146 +0,0 @@ -/**************************************************************************** -** -** Definition of TQTabDialog class -** -** Created : 960825 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQTABDIALOG_H -#define TQTABDIALOG_H - -#ifndef QT_H -#include "qdialog.h" -#include "qiconset.h" -#endif // QT_H - -#ifndef QT_NO_TABDIALOG - -class TQTabBar; -class TQTab; -class TQTabDialogPrivate; - -class Q_EXPORT TQTabDialog : public TQDialog -{ - Q_OBJECT -public: - TQTabDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, - WFlags f=0 ); - ~TQTabDialog(); - - void show(); - void setFont( const TQFont & font ); - - void addTab( TQWidget *, const TQString &); - void addTab( TQWidget *child, const TQIconSet& iconset, const TQString &label); - void addTab( TQWidget *, TQTab* ); - - void insertTab( TQWidget *, const TQString &, int index = -1); - void insertTab( TQWidget *child, const TQIconSet& iconset, const TQString &label, int index = -1); - void insertTab( TQWidget *, TQTab*, int index = -1 ); - - void changeTab( TQWidget *, const TQString &); - void changeTab( TQWidget *child, const TQIconSet& iconset, const TQString &label); - - bool isTabEnabled( TQWidget * ) const; - void setTabEnabled( TQWidget *, bool ); - bool isTabEnabled( const char* ) const; // compatibility - void setTabEnabled( const char*, bool ); // compatibility - - void showPage( TQWidget * ); - void removePage( TQWidget * ); - TQString tabLabel( TQWidget * ); - - TQWidget * currentPage() const; - - void setDefaultButton( const TQString &text ); - void setDefaultButton(); - bool hasDefaultButton() const; - - void setHelpButton( const TQString &text ); - void setHelpButton(); - bool hasHelpButton() const; - - void setCancelButton( const TQString &text ); - void setCancelButton(); - bool hasCancelButton() const; - - void setApplyButton( const TQString &text ); - void setApplyButton(); - bool hasApplyButton() const; - -#ifndef Q_QDOC - void setOKButton( const TQString &text = TQString::null ); -#endif - void setOkButton( const TQString &text ); - void setOkButton(); - bool hasOkButton() const; - -protected: - void paintEvent( TQPaintEvent * ); - void resizeEvent( TQResizeEvent * ); - void styleChange( TQStyle& ); - void setTabBar( TQTabBar* ); - TQTabBar* tabBar() const; - -signals: - void aboutToShow(); - - void applyButtonPressed(); - void cancelButtonPressed(); - void defaultButtonPressed(); - void helpButtonPressed(); - - void currentChanged( TQWidget * ); - void selected( const TQString& ); // obsolete - -private slots: - void showTab( int i ); - -private: - void setSizes(); - void setUpLayout(); - - TQTabDialogPrivate *d; -private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - TQTabDialog( const TQTabDialog & ); - TQTabDialog& operator=( const TQTabDialog & ); -#endif -}; - -#endif // QT_NO_TABDIALOG - -#endif // TQTABDIALOG_H diff --git a/src/dialogs/qwizard.cpp b/src/dialogs/qwizard.cpp index 3b79098fc..8ab1d13c2 100644 --- a/src/dialogs/qwizard.cpp +++ b/src/dialogs/qwizard.cpp @@ -38,25 +38,25 @@ ** **********************************************************************/ -#include "qwizard.h" +#include "ntqwizard.h" #ifndef QT_NO_WIZARD -#include "qlayout.h" -#include "qpushbutton.h" -#include "qcursor.h" -#include "qlabel.h" -#include "qwidgetstack.h" -#include "qapplication.h" -#include "qptrlist.h" -#include "qpainter.h" -#include "qaccel.h" +#include "ntqlayout.h" +#include "ntqpushbutton.h" +#include "ntqcursor.h" +#include "ntqlabel.h" +#include "ntqwidgetstack.h" +#include "ntqapplication.h" +#include "ntqptrlist.h" +#include "ntqpainter.h" +#include "ntqaccel.h" /*! \file wizard/wizard.cpp */ /*! \file wizard/wizard.h */ /*! - \class TQWizard qwizard.h + \class TQWizard ntqwizard.h \brief The TQWizard class provides a framework for wizard dialogs. \ingroup abstractwidgets diff --git a/src/dialogs/qwizard.h b/src/dialogs/qwizard.h deleted file mode 100644 index 04754fb7b..000000000 --- a/src/dialogs/qwizard.h +++ /dev/null @@ -1,142 +0,0 @@ -/**************************************************************************** -** -** Definition of the TQWizard class. -** -** Created : 990101 -** -** Copyright (C) 1999-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the dialogs 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 files LICENSE.GPL2 -** and LICENSE.GPL3 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 -** Public Licensing requirements will be met: -** 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 TQWIZARDDIALOG_H -#define TQWIZARDDIALOG_H - - -#ifndef QT_H -#include "qdialog.h" -#endif // QT_H - -#ifndef QT_NO_WIZARD - -class TQHBoxLayout; -class TQWizardPrivate; - -class Q_EXPORT TQWizard : public TQDialog -{ - Q_OBJECT - Q_PROPERTY( TQFont titleFont READ titleFont WRITE setTitleFont ) - -public: - TQWizard( TQWidget* parent=0, const char* name=0, bool modal=FALSE, - WFlags f=0 ); - ~TQWizard(); - - void show(); - - void setFont( const TQFont & font ); - - virtual void addPage( TQWidget *, const TQString & ); - virtual void insertPage( TQWidget*, const TQString&, int ); - virtual void removePage( TQWidget * ); - - TQString title( TQWidget * ) const; - void setTitle( TQWidget *, const TQString & ); - TQFont titleFont() const; - void setTitleFont( const TQFont & ); - - virtual void showPage( TQWidget * ); - - TQWidget * currentPage() const; - - TQWidget* page( int ) const; - int pageCount() const; - int indexOf( TQWidget* ) const; - - virtual bool appropriate( TQWidget * ) const; - virtual void setAppropriate( TQWidget *, bool ); - - TQPushButton * backButton() const; - TQPushButton * nextButton() const; - TQPushButton * finishButton() const; - TQPushButton * cancelButton() const; - TQPushButton * helpButton() const; - - bool eventFilter( TQObject *, TQEvent * ); - -public slots: - virtual void setBackEnabled( TQWidget *, bool ); - virtual void setNextEnabled( TQWidget *, bool ); - virtual void setFinishEnabled( TQWidget *, bool ); - - virtual void setHelpEnabled( TQWidget *, bool ); - - // obsolete - virtual void setFinish( TQWidget *, bool ) {} - -protected slots: - virtual void back(); - virtual void next(); - virtual void help(); - -signals: - void helpClicked(); - void selected( const TQString& ); - -protected: - virtual void layOutButtonRow( TQHBoxLayout * ); - virtual void layOutTitleRow( TQHBoxLayout *, const TQString & ); - -private: - void setBackEnabled( bool ); - void setNextEnabled( bool ); - - void setHelpEnabled( bool ); - - void setNextPage( TQWidget * ); - - void updateButtons(); - - void layOut(); - - TQWizardPrivate *d; - -private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) - TQWizard( const TQWizard & ); - TQWizard& operator=( const TQWizard & ); -#endif -}; - -#endif // QT_NO_WIZARD - -#endif // TQWIZARD_H -- cgit v1.2.1