diff options
Diffstat (limited to 'tqtinterface/qt4/src/dialogs/tqfiledialog.cpp')
-rw-r--r-- | tqtinterface/qt4/src/dialogs/tqfiledialog.cpp | 152 |
1 files changed, 76 insertions, 76 deletions
diff --git a/tqtinterface/qt4/src/dialogs/tqfiledialog.cpp b/tqtinterface/qt4/src/dialogs/tqfiledialog.cpp index 424ac7e..d2763bf 100644 --- a/tqtinterface/qt4/src/dialogs/tqfiledialog.cpp +++ b/tqtinterface/qt4/src/dialogs/tqfiledialog.cpp @@ -551,7 +551,7 @@ static void resolveLibs() class TQWindowsIconProvider : public TQFileIconProvider { public: - TQWindowsIconProvider( TQObject *tqparent=0, const char *name=0 ); + TQWindowsIconProvider( TQObject *parent=0, const char *name=0 ); ~TQWindowsIconProvider(); const TQPixmap * pixmap( const TQFileInfo &fi ); @@ -629,8 +629,8 @@ class TQRenameEdit : public TQLineEdit TQ_OBJECT public: - TQRenameEdit( TQWidget *tqparent ) - : TQLineEdit( tqparent, "qt_rename_edit" ), doRenameAlreadyEmitted(FALSE) + TQRenameEdit( TQWidget *parent ) + : TQLineEdit( parent, "qt_rename_edit" ), doRenameAlreadyEmitted(FALSE) { connect( this, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()) ); } @@ -658,7 +658,7 @@ class TQFileListBox : public TQListBox TQ_OBJECT private: - TQFileListBox( TQWidget *tqparent, TQFileDialog *d ); + TQFileListBox( TQWidget *parent, TQFileDialog *d ); void clear(); void show(); @@ -709,7 +709,7 @@ class TQFileDialogTQFileListView : public TQListView TQ_OBJECT public: - TQFileDialogTQFileListView( TQWidget *tqparent, TQFileDialog *d ); + TQFileDialogTQFileListView( TQWidget *parent, TQFileDialog *d ); void clear(); void startRename( bool check = TRUE ); @@ -771,7 +771,7 @@ class TQFDProgressAnimation : public TQWidget TQ_OBJECT public: - TQFDProgressAnimation( TQWidget *tqparent ); + TQFDProgressAnimation( TQWidget *parent ); void start(); private Q_SLOTS: @@ -786,8 +786,8 @@ private: }; -TQFDProgressAnimation::TQFDProgressAnimation( TQWidget *tqparent ) - : TQWidget( tqparent, "qt_progressanimation" ) +TQFDProgressAnimation::TQFDProgressAnimation( TQWidget *parent ) + : TQWidget( parent, "qt_progressanimation" ) { setFixedSize( 300, 50 ); step = -1; @@ -846,7 +846,7 @@ class TQFDProgressDialog : public TQDialog TQ_OBJECT public: - TQFDProgressDialog( TQWidget *tqparent, const TQString &fn, int steps ); + TQFDProgressDialog( TQWidget *parent, const TQString &fn, int steps ); void setReadProgress( int p ); void setWriteProgress( int p ); @@ -863,8 +863,8 @@ private: }; -TQFDProgressDialog::TQFDProgressDialog( TQWidget *tqparent, const TQString &fn, int steps ) - : TQDialog( tqparent, "", TRUE ) +TQFDProgressDialog::TQFDProgressDialog( TQWidget *parent, const TQString &fn, int steps ) + : TQDialog( parent, "", TRUE ) { #ifndef TQT_NO_WIDGET_TOPEXTRA setCaption( TQFileDialog::tr( "Copy or Move a File" ) ); @@ -955,16 +955,16 @@ public: struct File: public TQListViewItem { File( TQFileDialogPrivate * dlgp, - const TQUrlInfo * fi, TQListViewItem * tqparent ) - : TQListViewItem( tqparent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE ) + const TQUrlInfo * fi, TQListViewItem * parent ) + : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE ) { setup(); dlgp->last = this; } File( TQFileDialogPrivate * dlgp, - const TQUrlInfo * fi, TQListView * tqparent ) - : TQListViewItem( tqparent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE ) + const TQUrlInfo * fi, TQListView * parent ) + : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE ) { setup(); dlgp->last = this; } File( TQFileDialogPrivate * dlgp, - const TQUrlInfo * fi, TQListView * tqparent, TQListViewItem * after ) - : TQListViewItem( tqparent, after ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE ) + const TQUrlInfo * fi, TQListView * parent, TQListViewItem * after ) + : TQListViewItem( parent, after ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE ) { setup(); if ( !nextSibling() ) dlgp->last = this; } ~File(); @@ -1171,8 +1171,8 @@ void TQRenameEdit::slotReturnPressed() * ************************************************************************/ -TQFileListBox::TQFileListBox( TQWidget *tqparent, TQFileDialog *dlg ) - : TQListBox( tqparent, "filelistbox" ), filedialog( dlg ), +TQFileListBox::TQFileListBox( TQWidget *parent, TQFileDialog *dlg ) + : TQListBox( parent, "filelistbox" ), filedialog( dlg ), renaming( FALSE ), renameItem( 0 ), mousePressed( FALSE ), firstMousePressEvent( TRUE ) { @@ -1572,8 +1572,8 @@ void TQFileListBox::contentsMoved( int, int ) * ************************************************************************/ -TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *tqparent, TQFileDialog *dlg ) - : TQListView( tqparent, "qt_filedlg_listview" ), renaming( FALSE ), renameItem( 0 ), +TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFileDialog *dlg ) + : TQListView( parent, "qt_filedlg_listview" ), renaming( FALSE ), renameItem( 0 ), filedialog( dlg ), mousePressed( FALSE ), firstMousePressEvent( TRUE ) { @@ -2189,7 +2189,7 @@ static TQStringList makeFiltersList( const TQString &filter ) In the above example, a modal TQFileDialog is created using a static function. The startup directory is set to "/home". The file filter - is set to "Images (*.png *.xpm *.jpg)". The tqparent of the file dialog + is set to "Images (*.png *.xpm *.jpg)". The parent of the file dialog is set to \e this and it is given the identification name - "open file dialog". The caption at the top of file dialog is set to "Choose a file". If you want to use multiple filters, separate each one with @@ -2275,7 +2275,7 @@ static TQStringList makeFiltersList( const TQString &filter ) class Preview : public TQLabel, public TQFilePreview { public: - Preview( TQWidget *tqparent=0 ) : TQLabel( tqparent ) {} + Preview( TQWidget *parent=0 ) : TQLabel( parent ) {} void previewUrl( const TQUrl &u ) { @@ -2386,13 +2386,13 @@ extern const char qt_file_dialog_filter_reg_exp[] = "([a-zA-Z0-9 ]*)\\(([a-zA-Z0-9_.*? +;#\\[\\]]*)\\)$"; /*! - Constructs a file dialog called \a name, with the tqparent, \a tqparent. + Constructs a file dialog called \a name, with the parent, \a parent. If \a modal is TRUE then the file dialog is modal; otherwise it is modeless. */ -TQFileDialog::TQFileDialog( TQWidget *tqparent, const char *name, bool modal ) - : TQDialog( tqparent, name, modal, +TQFileDialog::TQFileDialog( TQWidget *parent, const char *name, bool modal ) + : TQDialog( parent, name, modal, (modal ? (WFlags)(WStyle_Customize | TQt::WStyle_DialogBorder | TQt::WStyle_Title | TQt::WStyle_SysMenu) : (WFlags)0) ) { @@ -2406,7 +2406,7 @@ TQFileDialog::TQFileDialog( TQWidget *tqparent, const char *name, bool modal ) /*! - Constructs a file dialog called \a name with the tqparent, \a tqparent. + Constructs a file dialog called \a name with the parent, \a parent. If \a modal is TRUE then the file dialog is modal; otherwise it is modeless. @@ -2418,8 +2418,8 @@ TQFileDialog::TQFileDialog( TQWidget *tqparent, const char *name, bool modal ) */ TQFileDialog::TQFileDialog( const TQString& dirName, const TQString & filter, - TQWidget *tqparent, const char *name, bool modal ) - : TQDialog( tqparent, name, modal, + TQWidget *parent, const char *name, bool modal ) + : TQDialog( parent, name, modal, (modal ? (WFlags)(WStyle_Customize | TQt::WStyle_DialogBorder | TQt::WStyle_Title | TQt::WStyle_SysMenu) : (WFlags)0) ) { @@ -2615,7 +2615,7 @@ void TQFileDialog::init() #endif d->goBack->setIconSet( *goBackIcon ); - d->cdToParent = new TQToolButton( this, "cd to tqparent" ); + d->cdToParent = new TQToolButton( this, "cd to parent" ); d->cdToParent->setFocusPolicy( Qt::TabFocus ); #ifndef TQT_NO_TOOLTIP TQToolTip::add( d->cdToParent, tr( "One directory up" ) ); @@ -2995,17 +2995,17 @@ void TQFileDialog::setSelectedFilter( int n ) /*! Sets the current filter selected in the file dialog to the first - one that contains the text \a tqmask. + one that contains the text \a mask. */ -void TQFileDialog::setSelectedFilter( const TQString& tqmask ) +void TQFileDialog::setSelectedFilter( const TQString& mask ) { int n; for ( n = 0; n < d->types->count(); n++ ) { - if ( d->types->text( n ).contains( tqmask, FALSE ) ) { + if ( d->types->text( n ).contains( mask, FALSE ) ) { d->types->setCurrentItem( n ); - TQString f = tqmask; + TQString f = mask; TQRegExp r( TQString::tqfromLatin1(qt_file_dialog_filter_reg_exp) ); int index = r.search( f ); if ( index >= 0 ) @@ -3423,8 +3423,8 @@ bool TQ_EXPORT qt_use_native_dialogs = TRUE; \endcode The function creates a modal file dialog called \a name, with - tqparent, \a tqparent. If a tqparent is not 0, the dialog will be shown - centered over the tqparent. + parent, \a parent. If a parent is not 0, the dialog will be shown + centered over the parent. The file dialog's working directory will be set to \a startWith. If \a startWith includes a file name, the file will be selected. The filter @@ -3439,8 +3439,8 @@ bool TQ_EXPORT qt_use_native_dialogs = TRUE; file dialog and not a TQFileDialog, unless the style of the application is set to something other than the native style (Note that on Windows the dialog will spin a blocking modal event loop that will not dispatch any - TQTimers and if tqparent is not 0 then it will position the dialog just under - the tqparent's titlebar). + TQTimers and if parent is not 0 then it will position the dialog just under + the parent's titlebar). Under Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, @@ -3453,7 +3453,7 @@ bool TQ_EXPORT qt_use_native_dialogs = TRUE; TQString TQFileDialog::getOpenFileName( const TQString & startWith, const TQString& filter, - TQWidget *tqparent, const char* name, + TQWidget *parent, const char* name, const TQString& caption, TQString *selectedFilter, bool resolveSymlinks ) @@ -3497,16 +3497,16 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith, #if defined(TQ_WS_WIN) if ( qt_use_native_dialogs && tqApp->tqstyle().tqstyleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) return winGetOpenFileName( initialSelection, filter, workingDirectory, - tqparent, name, caption, selectedFilter ); + parent, name, caption, selectedFilter ); #elif defined(TQ_WS_MAC) if (qt_use_native_dialogs && (tqApp->tqstyle().inherits(TQMAC_DEFAULT_STYLE) || tqApp->tqstyle().inherits("TQMacStyle"))) return qt_mac_precomposeFileName(macGetOpenFileNames(filter, startWith.isEmpty() ? 0 : workingDirectory, - tqparent, name, caption, selectedFilter, FALSE).first()); + parent, name, caption, selectedFilter, FALSE).first()); #endif - TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, tqparent, name ? name : "qt_filedlg_gofn", TRUE ); + TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofn", TRUE ); TQ_CHECK_PTR( dlg ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -3540,9 +3540,9 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith, This is a convenience static function that will return a file name selected by the user. The file does not have to exist. - It creates a modal file dialog called \a name, with tqparent, \a tqparent. - If a tqparent is not 0, the dialog will be shown centered over the - tqparent. + It creates a modal file dialog called \a name, with parent, \a parent. + If a parent is not 0, the dialog will be shown centered over the + parent. \code TQString s = TQFileDialog::getSaveFileName( @@ -3566,8 +3566,8 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith, file dialog and not a TQFileDialog, unless the style of the application is set to something other than the native style. (Note that on Windows the dialog will spin a blocking modal event loop that will not dispatch any - TQTimers and if tqparent is not 0 then it will position the dialog just under - the tqparent's titlebar. + TQTimers and if parent is not 0 then it will position the dialog just under + the parent's titlebar. Under Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, @@ -3580,7 +3580,7 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith, TQString TQFileDialog::getSaveFileName( const TQString & startWith, const TQString& filter, - TQWidget *tqparent, const char* name, + TQWidget *parent, const char* name, const TQString& caption, TQString *selectedFilter, bool resolveSymlinks) @@ -3618,16 +3618,16 @@ TQString TQFileDialog::getSaveFileName( const TQString & startWith, #if defined(TQ_WS_WIN) if ( qt_use_native_dialogs && tqApp->tqstyle().tqstyleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) return winGetSaveFileName( initialSelection, filter, workingDirectory, - tqparent, name, caption, selectedFilter ); + parent, name, caption, selectedFilter ); #elif defined(TQ_WS_MAC) if (qt_use_native_dialogs && (tqApp->tqstyle().inherits(TQMAC_DEFAULT_STYLE) || tqApp->tqstyle().inherits("TQMacStyle"))) return qt_mac_precomposeFileName(macGetSaveFileName(initialSelection, filter, - startWith.isEmpty() ? 0 : workingDirectory, tqparent, name, + startWith.isEmpty() ? 0 : workingDirectory, parent, name, caption, selectedFilter)); #endif - TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, tqparent, name ? name : "qt_filedlg_gsfn", TRUE ); + TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gsfn", TRUE ); TQ_CHECK_PTR( dlg ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -4461,8 +4461,8 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation * \endcode This function creates a modal file dialog called \a name, with - tqparent, \a tqparent. If tqparent is not 0, the dialog will be shown - centered over the tqparent. + parent, \a parent. If parent is not 0, the dialog will be shown + centered over the parent. The dialog's working directory is set to \a dir, and the caption is set to \a caption. Either of these may be TQString::null in which case @@ -4484,14 +4484,14 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation * file dialog and not a TQFileDialog, unless the style of the application is set to something other than the native style. (Note that on Windows the dialog will spin a blocking modal event loop that will not dispatch any - TQTimers and if tqparent is not 0 then it will position the dialog just under - the tqparent's titlebar). + TQTimers and if parent is not 0 then it will position the dialog just under + the parent's titlebar). \sa getOpenFileName(), getOpenFileNames(), getSaveFileName() */ TQString TQFileDialog::getExistingDirectory( const TQString & dir, - TQWidget *tqparent, + TQWidget *parent, const char* name, const TQString& caption, bool dirOnly, @@ -4514,7 +4514,7 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir, } else initialDir = TQString::null; if ( qt_use_native_dialogs && tqApp->tqstyle().tqstyleHint( TQStyle::SH_GUIStyle ) == WindowsStyle && dirOnly ) - return winGetExistingDirectory( initialDir, tqparent, name, caption ); + return winGetExistingDirectory( initialDir, parent, name, caption ); #endif #if defined(TQ_WS_MAC) TQString *initialDir = 0; @@ -4525,11 +4525,11 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir, } if( qt_use_native_dialogs && (tqApp->tqstyle().inherits(TQMAC_DEFAULT_STYLE) || tqApp->tqstyle().inherits("TQMacStyle"))) - return qt_mac_precomposeFileName(macGetOpenFileNames("", initialDir, tqparent, name, + return qt_mac_precomposeFileName(macGetOpenFileNames("", initialDir, parent, name, caption, 0, FALSE, TRUE).first()); #endif - TQFileDialog *dlg = new TQFileDialog( tqparent, name ? name : "qt_filedlg_ged", TRUE ); + TQFileDialog *dlg = new TQFileDialog( parent, name ? name : "qt_filedlg_ged", TRUE ); TQ_CHECK_PTR( dlg ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -4784,8 +4784,8 @@ TQFileDialog::PreviewMode TQFileDialog::previewMode() const The button \a b is placed underneath the Cancel pushbutton. \code - MyFileDialog::MyFileDialog( TQWidget* tqparent, const char* name ) : - TQFileDialog( tqparent, name ) + MyFileDialog::MyFileDialog( TQWidget* parent, const char* name ) : + TQFileDialog( parent, name ) { TQLabel* label = new TQLabel( "Added widgets", this ); TQLineEdit* lineedit = new TQLineEdit( this ); @@ -4972,11 +4972,11 @@ void TQFileDialog::keyPressEvent( TQKeyEvent * ke ) /*! Constructs an empty file icon provider called \a name, with the - tqparent \a tqparent. + parent \a parent. */ -TQFileIconProvider::TQFileIconProvider( TQObject * tqparent, const char* name ) - : TQObject( tqparent, name ) +TQFileIconProvider::TQFileIconProvider( TQObject * parent, const char* name ) + : TQObject( parent, name ) { // nothing necessary } @@ -5081,8 +5081,8 @@ static void initPixmap( TQPixmap &pm ) } -TQWindowsIconProvider::TQWindowsIconProvider( TQObject *tqparent, const char *name ) - : TQFileIconProvider( tqparent, name ) +TQWindowsIconProvider::TQWindowsIconProvider( TQObject *parent, const char *name ) + : TQFileIconProvider( parent, name ) { pixw = GetSystemMetrics( SM_CXSMICON ); pixh = GetSystemMetrics( SM_CYSMICON ); @@ -5600,8 +5600,8 @@ void TQFileDialog::modeButtonsDestroyed() \endcode This function creates a modal file dialog called \a name, with - tqparent \a tqparent. If \a tqparent is not 0, the dialog will be shown - centered over the tqparent. + parent \a parent. If \a parent is not 0, the dialog will be shown + centered over the parent. The file dialog's working directory will be set to \a dir. If \a dir includes a file name, the file will be selected. The filter @@ -5616,8 +5616,8 @@ void TQFileDialog::modeButtonsDestroyed() file dialog and not a TQFileDialog, unless the style of the application is set to something other than the native style. (Note that on Windows the dialog will spin a blocking modal event loop that will not dispatch any - TQTimers and if tqparent is not 0 then it will position the dialog just under - the tqparent's titlebar). + TQTimers and if parent is not 0 then it will position the dialog just under + the parent's titlebar). Under Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, @@ -5641,7 +5641,7 @@ void TQFileDialog::modeButtonsDestroyed() TQStringList TQFileDialog::getOpenFileNames( const TQString & filter, const TQString& dir, - TQWidget *tqparent, + TQWidget *parent, const char* name, const TQString& caption, TQString *selectedFilter, @@ -5671,11 +5671,11 @@ TQStringList TQFileDialog::getOpenFileNames( const TQString & filter, #if defined(TQ_WS_WIN) if ( qt_use_native_dialogs && tqApp->tqstyle().tqstyleHint( TQStyle::SH_GUIStyle ) == WindowsStyle ) - return winGetOpenFileNames( filter, workingDirectory, tqparent, name, caption, selectedFilter ); + return winGetOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter ); #elif defined(TQ_WS_MAC) if (qt_use_native_dialogs && (tqApp->tqstyle().inherits(TQMAC_DEFAULT_STYLE) || tqApp->tqstyle().inherits("TQMacStyle"))) { - TQStringList sl = macGetOpenFileNames(filter, dir.isEmpty() ? 0 : workingDirectory, tqparent, + TQStringList sl = macGetOpenFileNames(filter, dir.isEmpty() ? 0 : workingDirectory, parent, name, caption, selectedFilter); TQStringList::iterator it = sl.begin(); while (it != sl.end()) { @@ -5686,7 +5686,7 @@ TQStringList TQFileDialog::getOpenFileNames( const TQString & filter, } #endif - TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, tqparent, name ? name : "qt_filedlg_gofns", TRUE ); + TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofns", TRUE ); TQ_CHECK_PTR( dlg ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -6144,7 +6144,7 @@ void TQFileDialog::setContentsPreviewEnabled( bool contents ) class Preview : public TQLabel, public TQFilePreview { public: - Preview( TQWidget *tqparent=0 ) : TQLabel( tqparent ) {} + Preview( TQWidget *parent=0 ) : TQLabel( parent ) {} void previewUrl( const TQUrl &u ) { @@ -6204,7 +6204,7 @@ void TQFileDialog::setInfoPreview( TQWidget *w, TQFilePreview *preview ) class Preview : public TQLabel, public TQFilePreview { public: - Preview( TQWidget *tqparent=0 ) : TQLabel( tqparent ) {} + Preview( TQWidget *parent=0 ) : TQLabel( parent ) {} void previewUrl( const TQUrl &u ) { |