@ -19,14 +19,14 @@
# include <stdio.h>
# include <stdio.h>
# include <assert.h>
# include <assert.h>
# include < qdir.h>
# include < t qdir.h>
# include < qdesktopwidget.h>
# include < t qdesktopwidget.h>
# include < qdialog.h>
# include < t qdialog.h>
# include < qglobal.h>
# include < t qglobal.h>
# include < qkeycode.h>
# include < t qkeycode.h>
# include < qlayout.h>
# include < t qlayout.h>
# include < qsize.h>
# include < t qsize.h>
# include < qstring.h>
# include < t qstring.h>
# include <kaboutdata.h>
# include <kaboutdata.h>
# include <kaccel.h>
# include <kaccel.h>
@ -89,7 +89,7 @@ KuickData* kdata;
static const int URL_ITEM = 0 ;
static const int URL_ITEM = 0 ;
static const int META_ITEM = 1 ;
static const int META_ITEM = 1 ;
QValueList< ImageWindow * > KuickShow : : s_viewers ;
T QValueList< ImageWindow * > KuickShow : : s_viewers ;
KuickShow : : KuickShow ( const char * name )
KuickShow : : KuickShow ( const char * name )
: KMainWindow ( 0L , name ) ,
: KMainWindow ( 0L , name ) ,
@ -110,8 +110,8 @@ KuickShow::KuickShow( const char *name )
initImlib ( ) ;
initImlib ( ) ;
resize ( 400 , 500 ) ;
resize ( 400 , 500 ) ;
m_slideTimer = new QTimer( this ) ;
m_slideTimer = new T QTimer( this ) ;
connect ( m_slideTimer , SIGNAL( timeout ( ) ) , SLOT( nextSlide ( ) ) ) ;
connect ( m_slideTimer , TQT_ SIGNAL( timeout ( ) ) , TQT_ SLOT( nextSlide ( ) ) ) ;
KConfig * kc = KGlobal : : config ( ) ;
KConfig * kc = KGlobal : : config ( ) ;
@ -124,7 +124,7 @@ KuickShow::KuickShow( const char *name )
// files to display
// files to display
// either a directory to display, an absolute path, a relative path, or a URL
// either a directory to display, an absolute path, a relative path, or a URL
KURL startDir ;
KURL startDir ;
startDir . setPath ( QDir: : currentDirPath ( ) + ' / ' ) ;
startDir . setPath ( T QDir: : currentDirPath ( ) + ' / ' ) ;
int numArgs = args - > count ( ) ;
int numArgs = args - > count ( ) ;
if ( numArgs > = 10 )
if ( numArgs > = 10 )
@ -133,7 +133,7 @@ KuickShow::KuickShow( const char *name )
if ( KMessageBox : : warningYesNo (
if ( KMessageBox : : warningYesNo (
this ,
this ,
i18n ( " Do you really want to display this 1 image at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown. " ,
i18n ( " Do you really want to display this 1 image at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown. " ,
" Do you really want to display these %n images at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown. " , numArgs ) . arg( KStdGuiItem : : no ( ) . plainText ( ) ) ,
" Do you really want to display these %n images at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown. " , numArgs ) . tq arg( KStdGuiItem : : no ( ) . plainText ( ) ) ,
i18n ( " Display Multiple Images? " ) )
i18n ( " Display Multiple Images? " ) )
! = KMessageBox : : Yes )
! = KMessageBox : : Yes )
{
{
@ -164,7 +164,7 @@ KuickShow::KuickShow( const char *name )
else if ( ! url . isLocalFile ( ) )
else if ( ! url . isLocalFile ( ) )
{
{
KMimeType : : Ptr mime = KMimeType : : findByURL ( url ) ;
KMimeType : : Ptr mime = KMimeType : : findByURL ( url ) ;
QString name = mime - > name ( ) ;
T QString name = mime - > name ( ) ;
if ( name = = " application/octet-stream " ) // unknown -> stat()
if ( name = = " application/octet-stream " ) // unknown -> stat()
name = KIO : : NetAccess : : mimetype ( url , this ) ;
name = KIO : : NetAccess : : mimetype ( url , this ) ;
@ -231,39 +231,39 @@ void KuickShow::initGUI( const KURL& startDir )
redirectDeleteAndTrashActions ( coll ) ;
redirectDeleteAndTrashActions ( coll ) ;
connect ( fileWidget , SIGNAL( fileSelected ( const KFileItem * ) ) ,
connect ( fileWidget , TQT_ SIGNAL( fileSelected ( const KFileItem * ) ) ,
this , SLOT( slotSelected ( const KFileItem * ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSelected ( const KFileItem * ) ) ) ;
connect ( fileWidget , SIGNAL( fileHighlighted ( const KFileItem * ) ) ,
connect ( fileWidget , TQT_ SIGNAL( fileHighlighted ( const KFileItem * ) ) ,
this , SLOT( slotHighlighted ( const KFileItem * ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotHighlighted ( const KFileItem * ) ) ) ;
connect ( fileWidget , SIGNAL( urlEntered ( const KURL & ) ) ,
connect ( fileWidget , TQT_ SIGNAL( urlEntered ( const KURL & ) ) ,
this , SLOT( dirSelected ( const KURL & ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( dirSelected ( const KURL & ) ) ) ;
fileWidget - > setAcceptDrops ( true ) ;
fileWidget - > setAcceptDrops ( true ) ;
connect ( fileWidget , SIGNAL( dropped ( const KFileItem * , QDropEvent * , const KURL : : List & ) ) ,
connect ( fileWidget , TQT_ SIGNAL( dropped ( const KFileItem * , T QDropEvent * , const KURL : : List & ) ) ,
this , SLOT( slotDropped ( const KFileItem * , QDropEvent * , const KURL : : List & ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotDropped ( const KFileItem * , T QDropEvent * , const KURL : : List & ) ) ) ;
// setup actions
// setup actions
KAction * open = KStdAction : : open ( this , SLOT( slotOpenURL ( ) ) ,
KAction * open = KStdAction : : open ( TQT_TQOBJECT ( this ) , TQT_ SLOT( slotOpenURL ( ) ) ,
coll , " openURL " ) ;
coll , " openURL " ) ;
KAction * print = KStdAction : : print ( this , SLOT( slotPrint ( ) ) ,
KAction * print = KStdAction : : print ( TQT_TQOBJECT ( this ) , TQT_ SLOT( slotPrint ( ) ) ,
coll , " kuick_print " ) ;
coll , " kuick_print " ) ;
print - > setText ( i18n ( " Print Image... " ) ) ;
print - > setText ( i18n ( " Print Image... " ) ) ;
KAction * configure = new KAction ( i18n ( " Configure %1... " ) . arg( KGlobal : : instance ( ) - > aboutData ( ) - > programName ( ) ) , " configure " ,
KAction * configure = new KAction ( i18n ( " Configure %1... " ) . tq arg( KGlobal : : instance ( ) - > aboutData ( ) - > programName ( ) ) , " configure " ,
KShortcut ( ) ,
KShortcut ( ) ,
this , SLOT( configuration ( ) ) ,
TQT_TQOBJECT ( this ) , TQT_ SLOT( configuration ( ) ) ,
coll , " kuick_configure " ) ;
coll , " kuick_configure " ) ;
KAction * slide = new KAction ( i18n ( " Start Slideshow " ) , " ksslide " ,
KAction * slide = new KAction ( i18n ( " Start Slideshow " ) , " ksslide " ,
KShortcut ( Key_F2 ) ,
KShortcut ( Key_F2 ) ,
this , SLOT( startSlideShow ( ) ) ,
TQT_TQOBJECT ( this ) , TQT_ SLOT( startSlideShow ( ) ) ,
coll , " kuick_slideshow " ) ;
coll , " kuick_slideshow " ) ;
KAction * about = new KAction ( i18n ( " About KuickShow " ) , " about " ,
KAction * about = new KAction ( i18n ( " About KuickShow " ) , " about " ,
KShortcut ( ) ,
KShortcut ( ) ,
this , SLOT( about ( ) ) , coll , " about " ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( about ( ) ) , coll , " about " ) ;
oneWindowAction = new KToggleAction ( i18n ( " Open Only One Image Window " ) ,
oneWindowAction = new KToggleAction ( i18n ( " Open Only One Image Window " ) ,
" window_new " ,
" window_new " ,
@ -272,29 +272,29 @@ void KuickShow::initGUI( const KURL& startDir )
m_toggleBrowserAction = new KToggleAction ( i18n ( " Show File Browser " ) , KShortcut ( Key_Space ) , coll , " toggleBrowser " ) ;
m_toggleBrowserAction = new KToggleAction ( i18n ( " Show File Browser " ) , KShortcut ( Key_Space ) , coll , " toggleBrowser " ) ;
m_toggleBrowserAction - > setCheckedState ( i18n ( " Hide File Browser " ) ) ;
m_toggleBrowserAction - > setCheckedState ( i18n ( " Hide File Browser " ) ) ;
connect ( m_toggleBrowserAction , SIGNAL( toggled ( bool ) ) ,
connect ( m_toggleBrowserAction , TQT_ SIGNAL( toggled ( bool ) ) ,
SLOT( toggleBrowser ( ) ) ) ;
TQT_ SLOT( toggleBrowser ( ) ) ) ;
KAction * showInOther = new KAction ( i18n ( " Show Image " ) , KShortcut ( ) ,
KAction * showInOther = new KAction ( i18n ( " Show Image " ) , KShortcut ( ) ,
this , SLOT( slotShowInOtherWindow ( ) ) ,
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotShowInOtherWindow ( ) ) ,
coll , " kuick_showInOtherWindow " ) ;
coll , " kuick_showInOtherWindow " ) ;
KAction * showInSame = new KAction ( i18n ( " Show Image in Active Window " ) ,
KAction * showInSame = new KAction ( i18n ( " Show Image in Active Window " ) ,
KShortcut ( ) ,
KShortcut ( ) ,
this , SLOT( slotShowInSameWindow ( ) ) ,
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotShowInSameWindow ( ) ) ,
coll , " kuick_showInSameWindow " ) ;
coll , " kuick_showInSameWindow " ) ;
KAction * showFullscreen = new KAction ( i18n ( " Show Image in Fullscreen Mode " ) ,
KAction * showFullscreen = new KAction ( i18n ( " Show Image in Fullscreen Mode " ) ,
KShortcut ( ) , this , SLOT( slotShowFullscreen ( ) ) ,
KShortcut ( ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotShowFullscreen ( ) ) ,
coll , " kuick_showFullscreen " ) ;
coll , " kuick_showFullscreen " ) ;
KAction * quit = KStdAction : : quit ( this , SLOT( slotQuit ( ) ) , coll , " quit " ) ;
KAction * quit = KStdAction : : quit ( TQT_TQOBJECT ( this ) , TQT_ SLOT( slotQuit ( ) ) , coll , " quit " ) ;
// remove QString::null parameter -- ellis
// remove TQString() parameter -- ellis
coll - > readShortcutSettings ( QString: : null ) ;
coll - > readShortcutSettings ( TQString( ) ) ;
m_accel = coll - > accel ( ) ;
m_accel = coll - > accel ( ) ;
// menubar
// menubar
KMenuBar * mBar = menuBar ( ) ;
KMenuBar * mBar = menuBar ( ) ;
QPopupMenu * fileMenu = new QPopupMenu( mBar , " file " ) ;
T QPopupMenu * fileMenu = new T QPopupMenu( mBar , " file " ) ;
open - > plug ( fileMenu ) ;
open - > plug ( fileMenu ) ;
showInOther - > plug ( fileMenu ) ;
showInOther - > plug ( fileMenu ) ;
showInSame - > plug ( fileMenu ) ;
showInSame - > plug ( fileMenu ) ;
@ -305,7 +305,7 @@ void KuickShow::initGUI( const KURL& startDir )
fileMenu - > insertSeparator ( ) ;
fileMenu - > insertSeparator ( ) ;
quit - > plug ( fileMenu ) ;
quit - > plug ( fileMenu ) ;
QPopupMenu * editMenu = new QPopupMenu( mBar , " edit " ) ;
T QPopupMenu * editMenu = new T QPopupMenu( mBar , " edit " ) ;
coll - > action ( " mkdir " ) - > plug ( editMenu ) ;
coll - > action ( " mkdir " ) - > plug ( editMenu ) ;
coll - > action ( " delete " ) - > plug ( editMenu ) ;
coll - > action ( " delete " ) - > plug ( editMenu ) ;
editMenu - > insertSeparator ( ) ;
editMenu - > insertSeparator ( ) ;
@ -316,10 +316,10 @@ void KuickShow::initGUI( const KURL& startDir )
// from the main contextmenu
// from the main contextmenu
KActionMenu * sortingMenu = static_cast < KActionMenu * > ( coll - > action ( " sorting menu " ) ) ;
KActionMenu * sortingMenu = static_cast < KActionMenu * > ( coll - > action ( " sorting menu " ) ) ;
KActionMenu * mainActionMenu = static_cast < KActionMenu * > ( coll - > action ( " popupMenu " ) ) ;
KActionMenu * mainActionMenu = static_cast < KActionMenu * > ( coll - > action ( " popupMenu " ) ) ;
QPopupMenu * mainPopup = mainActionMenu - > popupMenu ( ) ;
T QPopupMenu * mainPopup = mainActionMenu - > popupMenu ( ) ;
int sortingIndex = mainPopup - > indexOf ( sortingMenu - > itemId ( 0 ) ) ;
int sortingIndex = mainPopup - > indexOf ( sortingMenu - > itemId ( 0 ) ) ;
int separatorId = mainPopup - > idAt ( sortingIndex + 1 ) ;
int separatorId = mainPopup - > idAt ( sortingIndex + 1 ) ;
QMenuItem * separatorItem = mainPopup - > findItem( separatorId ) ;
T QMenuItem * separatorItem = mainPopup - > tq findItem( separatorId ) ;
if ( separatorItem & & separatorItem - > isSeparator ( ) )
if ( separatorItem & & separatorItem - > isSeparator ( ) )
mainPopup - > removeItem ( separatorId ) ;
mainPopup - > removeItem ( separatorId ) ;
mainActionMenu - > remove ( sortingMenu ) ;
mainActionMenu - > remove ( sortingMenu ) ;
@ -330,7 +330,7 @@ void KuickShow::initGUI( const KURL& startDir )
sortingMenu - > plug ( viewActionMenu - > popupMenu ( ) , 0 ) ; // on top of the menu
sortingMenu - > plug ( viewActionMenu - > popupMenu ( ) , 0 ) ; // on top of the menu
QPopupMenu * settingsMenu = new QPopupMenu( mBar , " settings " ) ;
T QPopupMenu * settingsMenu = new T QPopupMenu( mBar , " settings " ) ;
configure - > plug ( settingsMenu ) ;
configure - > plug ( settingsMenu ) ;
mBar - > insertItem ( i18n ( " &File " ) , fileMenu ) ;
mBar - > insertItem ( i18n ( " &File " ) , fileMenu ) ;
@ -363,14 +363,14 @@ void KuickShow::initGUI( const KURL& startDir )
tBar - > insertSeparator ( ) ;
tBar - > insertSeparator ( ) ;
about - > plug ( tBar ) ;
about - > plug ( tBar ) ;
QPopupMenu * help = helpMenu ( QString: : null , false ) ;
T QPopupMenu * help = helpMenu ( TQString( ) , false ) ;
mBar - > insertItem ( KStdGuiItem : : help ( ) . text ( ) , help ) ;
mBar - > insertItem ( KStdGuiItem : : help ( ) . text ( ) , help ) ;
KStatusBar * sBar = statusBar ( ) ;
KStatusBar * sBar = statusBar ( ) ;
sBar - > insertItem ( " " , URL_ITEM , 10 ) ;
sBar - > insertItem ( " " , URL_ITEM , 10 ) ;
sBar - > insertItem ( " " , META_ITEM , 2 ) ;
sBar - > insertItem ( " " , META_ITEM , 2 ) ;
sBar - > setItemAlignment ( URL_ITEM , QLabel: : AlignVCenter | QLabel: : AlignLeft ) ;
sBar - > setItemAlignment ( URL_ITEM , T QLabel: : AlignVCenter | T QLabel: : AlignLeft ) ;
fileWidget - > setFocus ( ) ;
fileWidget - > setFocus ( ) ;
@ -394,10 +394,10 @@ void KuickShow::initGUI( const KURL& startDir )
addressToolBar - > insertWidget ( ID_ADDRESSBAR , 1 , cmbPath ) ;
addressToolBar - > insertWidget ( ID_ADDRESSBAR , 1 , cmbPath ) ;
addressToolBar - > setItemAutoSized ( ID_ADDRESSBAR ) ;
addressToolBar - > setItemAutoSized ( ID_ADDRESSBAR ) ;
connect ( cmbPath , SIGNAL( urlActivated ( const KURL & ) ) ,
connect ( cmbPath , TQT_ SIGNAL( urlActivated ( const KURL & ) ) ,
this , SLOT( slotSetURL ( const KURL & ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSetURL ( const KURL & ) ) ) ;
connect ( cmbPath , SIGNAL( returnPressed ( ) ) ,
connect ( cmbPath , TQT_ SIGNAL( returnPressed ( ) ) ,
this , SLOT( slotURLComboReturnPressed ( ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotURLComboReturnPressed ( ) ) ) ;
fileWidget - > initActions ( ) ;
fileWidget - > initActions ( ) ;
@ -422,14 +422,14 @@ void KuickShow::redirectDeleteAndTrashActions(KActionCollection *coll)
if ( action )
if ( action )
{
{
action - > disconnect ( fileWidget ) ;
action - > disconnect ( fileWidget ) ;
connect ( action , SIGNAL( activated ( ) ) , this , SLOT( slotDeleteCurrentImage ( ) ) ) ;
connect ( action , TQT_ SIGNAL( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotDeleteCurrentImage ( ) ) ) ;
}
}
action = coll - > action ( " trash " ) ;
action = coll - > action ( " trash " ) ;
if ( action )
if ( action )
{
{
action - > disconnect ( fileWidget ) ;
action - > disconnect ( fileWidget ) ;
connect ( action , SIGNAL( activated ( ) ) , this , SLOT( slotTrashCurrentImage ( ) ) ) ;
connect ( action , TQT_ SIGNAL( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotTrashCurrentImage ( ) ) ) ;
}
}
}
}
@ -478,7 +478,7 @@ void KuickShow::slotHighlighted( const KFileItem *fi )
statusBar ( ) - > changeItem ( item - > getStatusBarInfo ( ) , URL_ITEM ) ;
statusBar ( ) - > changeItem ( item - > getStatusBarInfo ( ) , URL_ITEM ) ;
bool image = FileWidget : : isImage ( fi ) ;
bool image = FileWidget : : isImage ( fi ) ;
QString meta ;
T QString meta ;
if ( image )
if ( image )
{
{
KFileMetaInfo info = item - > metaInfo ( ) ;
KFileMetaInfo info = item - > metaInfo ( ) ;
@ -488,7 +488,7 @@ void KuickShow::slotHighlighted( const KFileItem *fi )
KFileMetaInfoGroup group = info . group ( " Technical " ) ;
KFileMetaInfoGroup group = info . group ( " Technical " ) ;
if ( group . isValid ( ) )
if ( group . isValid ( ) )
{
{
QString bpp = group . item ( " BitDepth " ) . string ( ) ;
T QString bpp = group . item ( " BitDepth " ) . string ( ) ;
if ( ! bpp . isEmpty ( ) )
if ( ! bpp . isEmpty ( ) )
meta . append ( " , " ) . append ( bpp ) ;
meta . append ( " , " ) . append ( bpp ) ;
}
}
@ -537,22 +537,22 @@ bool KuickShow::showImage( const KFileItem *fi,
m_viewer - > setFullscreen ( fullscreen ) ;
m_viewer - > setFullscreen ( fullscreen ) ;
s_viewers . append ( m_viewer ) ;
s_viewers . append ( m_viewer ) ;
connect ( m_viewer , SIGNAL( destroyed ( ) ) , SLOT( viewerDeleted ( ) ) ) ;
connect ( m_viewer , TQT_ SIGNAL( destroyed ( ) ) , TQT_ SLOT( viewerDeleted ( ) ) ) ;
connect ( m_viewer , SIGNAL( sigFocusWindow ( ImageWindow * ) ) ,
connect ( m_viewer , TQT_ SIGNAL( sigFocusWindow ( ImageWindow * ) ) ,
this , SLOT( slotSetActiveViewer ( ImageWindow * ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotSetActiveViewer ( ImageWindow * ) ) ) ;
connect ( m_viewer , SIGNAL( sigImageError ( const KuickFile * , const QString& ) ) ,
connect ( m_viewer , TQT_ SIGNAL( sigImageError ( const KuickFile * , const T QString& ) ) ,
this , SLOT( messageCantLoadImage ( const KuickFile * , const QString & ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( messageCantLoadImage ( const KuickFile * , const T QString & ) ) ) ;
connect ( m_viewer , SIGNAL( requestImage ( ImageWindow * , int ) ) ,
connect ( m_viewer , TQT_ SIGNAL( requestImage ( ImageWindow * , int ) ) ,
this , SLOT( slotAdvanceImage ( ImageWindow * , int ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotAdvanceImage ( ImageWindow * , int ) ) ) ;
connect ( m_viewer , SIGNAL( pauseSlideShowSignal ( ) ) ,
connect ( m_viewer , TQT_ SIGNAL( pauseSlideShowSignal ( ) ) ,
this , SLOT( pauseSlideShow ( ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( pauseSlideShow ( ) ) ) ;
connect ( m_viewer , SIGNAL ( deleteImage ( ImageWindow * ) ) ,
connect ( m_viewer , TQT_ SIGNAL ( deleteImage ( ImageWindow * ) ) ,
this , SLOT ( slotDeleteCurrentImage ( ImageWindow * ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT ( slotDeleteCurrentImage ( ImageWindow * ) ) ) ;
connect ( m_viewer , SIGNAL ( trashImage ( ImageWindow * ) ) ,
connect ( m_viewer , TQT_ SIGNAL ( trashImage ( ImageWindow * ) ) ,
this , SLOT ( slotTrashCurrentImage ( ImageWindow * ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT ( slotTrashCurrentImage ( ImageWindow * ) ) ) ;
if ( s_viewers . count ( ) = = 1 & & moveToTopLeft ) {
if ( s_viewers . count ( ) = = 1 & & moveToTopLeft ) {
// we have to move to 0x0 before showing _and_
// we have to move to 0x0 before showing _and_
// after showing, otherwise we get some bogus geometry()
// after showing, otherwise we get some bogus tq geometry()
m_viewer - > move ( Kuick : : workArea ( ) . topLeft ( ) ) ;
m_viewer - > move ( Kuick : : workArea ( ) . topLeft ( ) ) ;
}
}
@ -568,7 +568,7 @@ bool KuickShow::showImage( const KFileItem *fi,
ImageWindow * safeViewer = m_viewer ;
ImageWindow * safeViewer = m_viewer ;
// file->waitForDownload( this );
// file->waitForDownload( this );
// QString filename;
// T QString filename;
// KIO::NetAccess::download(fi->url(), filename, this);
// KIO::NetAccess::download(fi->url(), filename, this);
if ( ! safeViewer - > showNextImage ( fi - > url ( ) ) ) {
if ( ! safeViewer - > showNextImage ( fi - > url ( ) ) ) {
@ -631,7 +631,7 @@ void KuickShow::slotTrashCurrentImage(ImageWindow *viewer)
performTrashCurrentImage ( viewer ) ;
performTrashCurrentImage ( viewer ) ;
}
}
void KuickShow : : performDeleteCurrentImage ( QWidget * parent)
void KuickShow : : performDeleteCurrentImage ( T QWidget * tq parent)
{
{
assert ( fileWidget ! = 0L ) ;
assert ( fileWidget ! = 0L ) ;
@ -640,8 +640,8 @@ void KuickShow::performDeleteCurrentImage(QWidget *parent)
list . append ( item ) ;
list . append ( item ) ;
if ( KMessageBox : : warningContinueCancel (
if ( KMessageBox : : warningContinueCancel (
parent,
tq parent,
i18n ( " <qt>Do you really want to delete \n <b>'%1'</b>?</qt> " ) . arg( item - > url ( ) . pathOrURL ( ) ) ,
i18n ( " <qt>Do you really want to delete \n <b>'%1'</b>?</qt> " ) . tq arg( item - > url ( ) . pathOrURL ( ) ) ,
i18n ( " Delete File " ) ,
i18n ( " Delete File " ) ,
KStdGuiItem : : del ( ) ,
KStdGuiItem : : del ( ) ,
" Kuick_delete_current_image " )
" Kuick_delete_current_image " )
@ -654,7 +654,7 @@ void KuickShow::performDeleteCurrentImage(QWidget *parent)
fileWidget - > del ( list , false , false ) ;
fileWidget - > del ( list , false , false ) ;
}
}
void KuickShow : : performTrashCurrentImage ( QWidget * parent)
void KuickShow : : performTrashCurrentImage ( T QWidget * tq parent)
{
{
assert ( fileWidget ! = 0L ) ;
assert ( fileWidget ! = 0L ) ;
@ -665,8 +665,8 @@ void KuickShow::performTrashCurrentImage(QWidget *parent)
list . append ( item ) ;
list . append ( item ) ;
if ( KMessageBox : : warningContinueCancel (
if ( KMessageBox : : warningContinueCancel (
parent,
tq parent,
i18n ( " <qt>Do you really want to trash \n <b>'%1'</b>?</qt> " ) . arg( item - > url ( ) . pathOrURL ( ) ) ,
i18n ( " <qt>Do you really want to trash \n <b>'%1'</b>?</qt> " ) . tq arg( item - > url ( ) . pathOrURL ( ) ) ,
i18n ( " Trash File " ) ,
i18n ( " Trash File " ) ,
KGuiItem ( i18n ( " to trash " , " &Trash " ) , " edittrash " ) ,
KGuiItem ( i18n ( " to trash " , " &Trash " ) , " edittrash " ) ,
" Kuick_trash_current_image " )
" Kuick_trash_current_image " )
@ -676,7 +676,7 @@ void KuickShow::performTrashCurrentImage(QWidget *parent)
}
}
tryShowNextImage ( ) ;
tryShowNextImage ( ) ;
fileWidget - > trash ( list , parent, false , false ) ;
fileWidget - > trash ( list , tq parent, false , false ) ;
}
}
void KuickShow : : tryShowNextImage ( )
void KuickShow : : tryShowNextImage ( )
@ -698,7 +698,7 @@ void KuickShow::tryShowNextImage()
if ( ! haveBrowser ( ) )
if ( ! haveBrowser ( ) )
{
{
// ### when simply calling toggleBrowser(), this main window is completely messed up
// ### when simply calling toggleBrowser(), this main window is completely messed up
QTimer: : singleShot ( 0 , this , SLOT( toggleBrowser ( ) ) ) ;
T QTimer: : singleShot ( 0 , TQT_TQOBJECT ( this ) , TQT_ SLOT( toggleBrowser ( ) ) ) ;
}
}
m_viewer - > deleteLater ( ) ;
m_viewer - > deleteLater ( ) ;
}
}
@ -805,7 +805,7 @@ void KuickShow::slotShowFullscreen()
showImage ( fileWidget - > getCurrentItem ( false ) , false , true ) ;
showImage ( fileWidget - > getCurrentItem ( false ) , false , true ) ;
}
}
void KuickShow : : slotDropped ( const KFileItem * , QDropEvent * , const KURL : : List & urls )
void KuickShow : : slotDropped ( const KFileItem * , T QDropEvent * , const KURL : : List & urls )
{
{
KURL : : List : : ConstIterator it = urls . begin ( ) ;
KURL : : List : : ConstIterator it = urls . begin ( ) ;
for ( ; it ! = urls . end ( ) ; + + it )
for ( ; it ! = urls . end ( ) ; + + it )
@ -855,7 +855,7 @@ void KuickShow::slotAdvanceImage( ImageWindow *view, int steps )
}
}
if ( FileWidget : : isImage ( item ) ) {
if ( FileWidget : : isImage ( item ) ) {
// QString filename;
// T QString filename;
// KIO::NetAccess::download(item->url(), filename, this);
// KIO::NetAccess::download(item->url(), filename, this);
view - > showNextImage ( item - > url ( ) ) ;
view - > showNextImage ( item - > url ( ) ) ;
if ( m_slideTimer - > isActive ( ) & & kdata - > slideDelay )
if ( m_slideTimer - > isActive ( ) & & kdata - > slideDelay )
@ -869,7 +869,7 @@ void KuickShow::slotAdvanceImage( ImageWindow *view, int steps )
}
}
}
}
bool KuickShow : : eventFilter ( QObject * o , QEvent * e )
bool KuickShow : : eventFilter ( T QObject * o , T QEvent * e )
{
{
if ( m_delayedRepeatItem ) // we probably need to install an eventFilter over
if ( m_delayedRepeatItem ) // we probably need to install an eventFilter over
{
{
@ -878,9 +878,9 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
bool ret = false ;
bool ret = false ;
int eventType = e - > type ( ) ;
int eventType = e - > type ( ) ;
QKeyEvent * k = 0L ;
T QKeyEvent * k = 0L ;
if ( eventType = = QEvent: : KeyPress )
if ( eventType = = T QEvent: : KeyPress )
k = static_cast < QKeyEvent * > ( e ) ;
k = TQT_TQKEYEVENT ( e ) ;
if ( k ) {
if ( k ) {
if ( KStdAccel : : quit ( ) . contains ( KKey ( k ) ) ) {
if ( KStdAccel : : quit ( ) . contains ( KKey ( k ) ) ) {
@ -903,11 +903,11 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
// switching images, causing enter- and leaveevents for this
// switching images, causing enter- and leaveevents for this
// ImageWindow, leading to the cursor being unhidden. So we simply
// ImageWindow, leading to the cursor being unhidden. So we simply
// don't pass those events to KCursor to prevent that.
// don't pass those events to KCursor to prevent that.
if ( eventType ! = QEvent: : Leave & & eventType ! = QEvent: : Enter )
if ( eventType ! = T QEvent: : Leave & & eventType ! = T QEvent: : Enter )
KCursor : : autoHideEventFilter ( o , e ) ;
KCursor : : autoHideEventFilter ( o , e ) ;
m_viewer = window ;
m_viewer = window ;
QString img ;
T QString img ;
KFileItem * item = 0L ; // the image to be shown
KFileItem * item = 0L ; // the image to be shown
KFileItem * item_next = 0L ; // the image to be cached
KFileItem * item_next = 0L ; // the image to be cached
@ -925,7 +925,7 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
if ( key ! = Key_Escape & & key ! = Key_Shift & & key ! = Key_Alt )
if ( key ! = Key_Escape & & key ! = Key_Shift & & key ! = Key_Alt )
{
{
KuickFile * file = m_viewer - > currentFile ( ) ;
KuickFile * file = m_viewer - > currentFile ( ) ;
// QFileInfo fi( m_viewer->filename() );
// T QFileInfo fi( m_viewer->filename() );
// start.setPath( fi.dirPath( true ) );
// start.setPath( fi.dirPath( true ) );
initGUI ( file - > url ( ) . upURL ( ) ) ;
initGUI ( file - > url ( ) . upURL ( ) ) ;
@ -952,7 +952,7 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
if ( fileWidget - > dirLister ( ) - > rootItem ( ) )
if ( fileWidget - > dirLister ( ) - > rootItem ( ) )
{
{
fileWidget - > setCurrentItem ( file - > url ( ) . fileName ( ) ) ;
fileWidget - > setCurrentItem ( file - > url ( ) . fileName ( ) ) ;
QTimer: : singleShot ( 0 , this , SLOT( slotReplayEvent ( ) ) ) ;
T QTimer: : singleShot ( 0 , TQT_TQOBJECT ( this ) , TQT_ SLOT( slotReplayEvent ( ) ) ) ;
}
}
else // finished, but no root-item -- probably an error, kill repeat-item!
else // finished, but no root-item -- probably an error, kill repeat-item!
{
{
@ -962,8 +962,8 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
else // not finished yet
else // not finished yet
{
{
fileWidget - > setInitialItem ( file - > url ( ) . fileName ( ) ) ;
fileWidget - > setInitialItem ( file - > url ( ) . fileName ( ) ) ;
connect ( fileWidget , SIGNAL( finished ( ) ) ,
connect ( fileWidget , TQT_ SIGNAL( finished ( ) ) ,
SLOT( slotReplayEvent ( ) ) ) ;
TQT_ SLOT( slotReplayEvent ( ) ) ) ;
}
}
return true ;
return true ;
@ -1018,7 +1018,7 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
if ( FileWidget : : isImage ( item ) ) {
if ( FileWidget : : isImage ( item ) ) {
// QString filename;
// T QString filename;
// KIO::NetAccess::download(item->url(), filename, this);
// KIO::NetAccess::download(item->url(), filename, this);
m_viewer - > showNextImage ( item - > url ( ) ) ;
m_viewer - > showNextImage ( item - > url ( ) ) ;
@ -1034,17 +1034,17 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
// doubleclick closes image window
// doubleclick closes image window
// and shows browser when last window closed via doubleclick
// and shows browser when last window closed via doubleclick
else if ( eventType = = QEvent: : MouseButtonDblClick )
else if ( eventType = = T QEvent: : MouseButtonDblClick )
{
{
QMouseEvent * ev = static_cast < QMouseEvent * > ( e ) ;
TQMouseEvent * ev = TQT_TQMOUSEEVENT ( e ) ;
if ( ev - > button ( ) = = LeftButton )
if ( ev - > button ( ) = = Qt: : LeftButton )
{
{
if ( s_viewers . count ( ) = = 1 )
if ( s_viewers . count ( ) = = 1 )
{
{
if ( ! fileWidget )
if ( ! fileWidget )
{
{
// KURL start;
// KURL start;
// QFileInfo fi( window->filename() );
// T QFileInfo fi( window->filename() );
// start.setPath( fi.dirPath( true ) );
// start.setPath( fi.dirPath( true ) );
initGUI ( window - > currentFile ( ) - > url ( ) . fileName ( ) ) ;
initGUI ( window - > currentFile ( ) - > url ( ) . fileName ( ) ) ;
}
}
@ -1072,8 +1072,8 @@ void KuickShow::configuration()
{
{
if ( ! m_accel ) {
if ( ! m_accel ) {
KURL start ;
KURL start ;
start . setPath ( QDir: : homeDirPath ( ) ) ;
start . setPath ( T QDir: : homeDirPath ( ) ) ;
initGUI ( KURL : : fromPathOrURL ( QDir: : homeDirPath ( ) ) ) ;
initGUI ( KURL : : fromPathOrURL ( T QDir: : homeDirPath ( ) ) ) ;
}
}
dialog = new KuickConfigDialog ( fileWidget - > actionCollection ( ) , 0L ,
dialog = new KuickConfigDialog ( fileWidget - > actionCollection ( ) , 0L ,
@ -1081,12 +1081,12 @@ void KuickShow::configuration()
dialog - > resize ( 540 , 510 ) ;
dialog - > resize ( 540 , 510 ) ;
dialog - > setIcon ( kapp - > miniIcon ( ) ) ;
dialog - > setIcon ( kapp - > miniIcon ( ) ) ;
connect ( dialog , SIGNAL( okClicked ( ) ) ,
connect ( dialog , TQT_ SIGNAL( okClicked ( ) ) ,
this , SLOT( slotConfigApplied ( ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotConfigApplied ( ) ) ) ;
connect ( dialog , SIGNAL( applyClicked ( ) ) ,
connect ( dialog , TQT_ SIGNAL( applyClicked ( ) ) ,
this , SLOT( slotConfigApplied ( ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotConfigApplied ( ) ) ) ;
connect ( dialog , SIGNAL( finished ( ) ) ,
connect ( dialog , TQT_ SIGNAL( finished ( ) ) ,
this , SLOT( slotConfigClosed ( ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotConfigClosed ( ) ) ) ;
fileWidget - > actionCollection ( ) - > action ( " kuick_configure " ) - > setEnabled ( false ) ;
fileWidget - > actionCollection ( ) - > action ( " kuick_configure " ) - > setEnabled ( false ) ;
dialog - > show ( ) ;
dialog - > show ( ) ;
@ -1101,7 +1101,7 @@ void KuickShow::slotConfigApplied()
kdata - > save ( ) ;
kdata - > save ( ) ;
ImageWindow * viewer ;
ImageWindow * viewer ;
QValueListIterator< ImageWindow * > it = s_viewers . begin ( ) ;
T QValueListIterator< ImageWindow * > it = s_viewers . begin ( ) ;
while ( it ! = s_viewers . end ( ) ) {
while ( it ! = s_viewers . end ( ) ) {
viewer = * it ;
viewer = * it ;
viewer - > updateActions ( ) ;
viewer - > updateActions ( ) ;
@ -1129,12 +1129,12 @@ void KuickShow::about()
KDialog : : centerOnScreen ( aboutWidget ) ;
KDialog : : centerOnScreen ( aboutWidget ) ;
# else
# else
// Not fixed because it must be dead code now.
// Not fixed because it must be dead code now.
QDesktopWidget * desktop = QApplication: : desktop ( ) ;
T QDesktopWidget * desktop = T QApplication: : desktop ( ) ;
int screen = desktop - > screenNumber ( aboutWidget ) ;
int screen = desktop - > screenNumber ( aboutWidget ) ;
if ( screen = = - 1 )
if ( screen = = - 1 )
screen = desktop - > primaryScreen ( ) ;
screen = desktop - > primaryScreen ( ) ;
QRect r = desktop - > screenGeometry ( screen ) ;
T QRect r = desktop - > screenGeometry ( screen ) ;
aboutWidget - > move ( r . center ( ) . x ( ) - aboutWidget - > width ( ) / 2 ,
aboutWidget - > move ( r . center ( ) . x ( ) - aboutWidget - > width ( ) / 2 ,
r . center ( ) . y ( ) - aboutWidget - > height ( ) / 2 ) ;
r . center ( ) . y ( ) - aboutWidget - > height ( ) / 2 ) ;
# endif
# endif
@ -1146,15 +1146,15 @@ void KuickShow::about()
void KuickShow : : readProperties ( KConfig * kc )
void KuickShow : : readProperties ( KConfig * kc )
{
{
assert ( fileWidget ) ; // from SM, we should always have initGUI on startup
assert ( fileWidget ) ; // from SM, we should always have initGUI on startup
QString dir = kc - > readPathEntry ( " CurrentDirectory " ) ;
T QString dir = kc - > readPathEntry ( " CurrentDirectory " ) ;
if ( ! dir . isEmpty ( ) ) {
if ( ! dir . isEmpty ( ) ) {
fileWidget - > setURL ( KURL : : fromPathOrURL ( dir ) , true ) ;
fileWidget - > setURL ( KURL : : fromPathOrURL ( dir ) , true ) ;
fileWidget - > clearHistory ( ) ;
fileWidget - > clearHistory ( ) ;
}
}
const KURL & listedURL = fileWidget - > url ( ) ;
const KURL & listedURL = fileWidget - > url ( ) ;
QStringList images = kc - > readPathListEntry ( " Images shown " ) ;
T QStringList images = kc - > readPathListEntry ( " Images shown " ) ;
QStringList: : Iterator it ;
T QStringList: : Iterator it ;
bool hasCurrentURL = false ;
bool hasCurrentURL = false ;
for ( it = images . begin ( ) ; it ! = images . end ( ) ; + + it ) {
for ( it = images . begin ( ) ; it ! = images . end ( ) ; + + it ) {
@ -1179,8 +1179,8 @@ void KuickShow::saveProperties( KConfig *kc )
if ( fileWidget )
if ( fileWidget )
kc - > writePathEntry ( " CurrentDirectory " , fileWidget - > url ( ) . url ( ) ) ;
kc - > writePathEntry ( " CurrentDirectory " , fileWidget - > url ( ) . url ( ) ) ;
QStringList urls ;
T QStringList urls ;
QValueListIterator< ImageWindow * > it ;
T QValueListIterator< ImageWindow * > it ;
for ( it = s_viewers . begin ( ) ; it ! = s_viewers . end ( ) ; + + it )
for ( it = s_viewers . begin ( ) ; it ! = s_viewers . end ( ) ; + + it )
{
{
const KURL & url = ( * it ) - > currentFile ( ) - > url ( ) ;
const KURL & url = ( * it ) - > currentFile ( ) - > url ( ) ;
@ -1212,7 +1212,7 @@ void KuickShow::saveSettings()
}
}
void KuickShow : : messageCantLoadImage ( const KuickFile * , const QString& message )
void KuickShow : : messageCantLoadImage ( const KuickFile * , const T QString& message )
{
{
m_viewer - > clearFocus ( ) ;
m_viewer - > clearFocus ( ) ;
KMessageBox : : information ( m_viewer , message , i18n ( " Error " ) , " kuick_cant_load_image " ) ;
KMessageBox : : information ( m_viewer , message , i18n ( " Error " ) , " kuick_cant_load_image " ) ;
@ -1229,7 +1229,7 @@ void KuickShow::initImlib()
initImlibParams ( idata , & par ) ;
initImlibParams ( idata , & par ) ;
qWarning ( " *** KuickShow: Whoops, can't initialize imlib, trying my own palettefile now. " ) ;
qWarning ( " *** KuickShow: Whoops, can't initialize imlib, trying my own palettefile now. " ) ;
QString paletteFile = locate ( " data " , " kuickshow/im_palette.pal " ) ;
T QString paletteFile = locate ( " data " , " kuickshow/im_palette.pal " ) ;
// ### - does the qstrdup() cure the segfault in imlib eventually?
// ### - does the qstrdup() cure the segfault in imlib eventually?
char * file = qstrdup ( paletteFile . local8Bit ( ) ) ;
char * file = qstrdup ( paletteFile . local8Bit ( ) ) ;
par . palettefile = file ;
par . palettefile = file ;
@ -1240,7 +1240,7 @@ void KuickShow::initImlib()
id = Imlib_init_with_params ( x11Display ( ) , & par ) ;
id = Imlib_init_with_params ( x11Display ( ) , & par ) ;
if ( ! id ) {
if ( ! id ) {
QString tmp = i18n ( " Unable to initialize \" Imlib \" . \n "
T QString tmp = i18n ( " Unable to initialize \" Imlib \" . \n "
" Start kuickshow from the command line "
" Start kuickshow from the command line "
" and look for error messages. \n "
" and look for error messages. \n "
" The program will now quit. " ) ;
" The program will now quit. " ) ;
@ -1281,9 +1281,9 @@ bool KuickShow::haveBrowser() const
return fileWidget & & fileWidget - > isVisible ( ) ;
return fileWidget & & fileWidget - > isVisible ( ) ;
}
}
void KuickShow : : delayedRepeatEvent ( ImageWindow * w , QKeyEvent * e )
void KuickShow : : delayedRepeatEvent ( ImageWindow * w , T QKeyEvent * e )
{
{
m_delayedRepeatItem = new DelayedRepeatEvent ( w , new QKeyEvent( * e ) ) ;
m_delayedRepeatItem = new DelayedRepeatEvent ( w , new T QKeyEvent( * e ) ) ;
}
}
void KuickShow : : abortDelayedEvent ( )
void KuickShow : : abortDelayedEvent ( )
@ -1294,19 +1294,19 @@ void KuickShow::abortDelayedEvent()
void KuickShow : : slotReplayEvent ( )
void KuickShow : : slotReplayEvent ( )
{
{
disconnect ( fileWidget , SIGNAL( finished ( ) ) ,
disconnect ( fileWidget , TQT_ SIGNAL( finished ( ) ) ,
this , SLOT( slotReplayEvent ( ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( slotReplayEvent ( ) ) ) ;
DelayedRepeatEvent * e = m_delayedRepeatItem ;
DelayedRepeatEvent * e = m_delayedRepeatItem ;
m_delayedRepeatItem = 0L ; // otherwise, eventFilter aborts
m_delayedRepeatItem = 0L ; // otherwise, eventFilter aborts
eventFilter ( e- > viewer , e- > event ) ;
eventFilter ( TQT_TQOBJECT( e- > viewer ) , TQT_TQEVENT( e- > event ) ) ;
delete e ;
delete e ;
// ### WORKAROUND for QIconView bug in Qt <= 3.0.3 at least
// ### WORKAROUND for T QIconView bug in T Qt <= 3.0.3 at least
if ( fileWidget & & fileWidget - > view ( ) ) {
if ( fileWidget & & fileWidget - > view ( ) ) {
QWidget * widget = fileWidget - > view ( ) - > widget ( ) ;
T QWidget * widget = fileWidget - > view ( ) - > widget ( ) ;
if ( widget - > inherits ( " QIconView " ) | | widget - > child ( 0 , " QIconView " ) ) {
if ( widget - > inherits ( TQICONVIEW_OBJECT_NAME_STRING ) | | widget - > child ( 0 , TQICONVIEW_OBJECT_NAME_STRING ) ) {
fileWidget - > setSorting ( fileWidget - > sorting ( ) ) ;
fileWidget - > setSorting ( fileWidget - > sorting ( ) ) ;
}
}
}
}
@ -1315,12 +1315,12 @@ void KuickShow::slotReplayEvent()
void KuickShow : : replayAdvance ( DelayedRepeatEvent * event )
void KuickShow : : replayAdvance ( DelayedRepeatEvent * event )
{
{
// ### WORKAROUND for QIconView bug in Qt <= 3.0.3 at least
// ### WORKAROUND for T QIconView bug in T Qt <= 3.0.3 at least
// Sigh. According to qt-bugs, they won't fix this bug ever. So you can't
// Sigh. According to qt-bugs, they won't fix this bug ever. So you can't
// rely on sorting to be correct before the QIconView has been show()n.
// rely on sorting to be correct before the T QIconView has been show()n.
if ( fileWidget & & fileWidget - > view ( ) ) {
if ( fileWidget & & fileWidget - > view ( ) ) {
QWidget * widget = fileWidget - > view ( ) - > widget ( ) ;
T QWidget * widget = fileWidget - > view ( ) - > widget ( ) ;
if ( widget - > inherits ( " QIconView " ) | | widget - > child ( 0 , " QIconView " ) ) {
if ( widget - > inherits ( TQICONVIEW_OBJECT_NAME_STRING ) | | widget - > child ( 0 , TQICONVIEW_OBJECT_NAME_STRING ) ) {
fileWidget - > setSorting ( fileWidget - > sorting ( ) ) ;
fileWidget - > setSorting ( fileWidget - > sorting ( ) ) ;
}
}
}
}
@ -1337,7 +1337,7 @@ void KuickShow::delayAction(DelayedRepeatEvent *event)
m_delayedRepeatItem = event ;
m_delayedRepeatItem = event ;
KURL url = event - > viewer - > currentFile ( ) - > url ( ) ;
KURL url = event - > viewer - > currentFile ( ) - > url ( ) ;
// QFileInfo fi( event->viewer->filename() );
// T QFileInfo fi( event->viewer->filename() );
// start.setPath( fi.dirPath( true ) );
// start.setPath( fi.dirPath( true ) );
initGUI ( url . upURL ( ) ) ;
initGUI ( url . upURL ( ) ) ;
@ -1346,13 +1346,13 @@ void KuickShow::delayAction(DelayedRepeatEvent *event)
fileWidget - > dirLister ( ) - > rootItem ( ) )
fileWidget - > dirLister ( ) - > rootItem ( ) )
{
{
fileWidget - > setCurrentItem ( url . fileName ( ) ) ;
fileWidget - > setCurrentItem ( url . fileName ( ) ) ;
QTimer: : singleShot ( 0 , this , SLOT( doReplay ( ) ) ) ;
T QTimer: : singleShot ( 0 , TQT_TQOBJECT ( this ) , TQT_ SLOT( doReplay ( ) ) ) ;
}
}
else
else
{
{
fileWidget - > setInitialItem ( url . fileName ( ) ) ;
fileWidget - > setInitialItem ( url . fileName ( ) ) ;
connect ( fileWidget , SIGNAL( finished ( ) ) ,
connect ( fileWidget , TQT_ SIGNAL( finished ( ) ) ,
SLOT( doReplay ( ) ) ) ;
TQT_ SLOT( doReplay ( ) ) ) ;
}
}
}
}
@ -1361,16 +1361,16 @@ void KuickShow::doReplay()
if ( ! m_delayedRepeatItem )
if ( ! m_delayedRepeatItem )
return ;
return ;
disconnect ( fileWidget , SIGNAL( finished ( ) ) ,
disconnect ( fileWidget , TQT_ SIGNAL( finished ( ) ) ,
this , SLOT( doReplay ( ) ) ) ;
TQT_TQOBJECT ( this ) , TQT_ SLOT( doReplay ( ) ) ) ;
switch ( m_delayedRepeatItem - > action )
switch ( m_delayedRepeatItem - > action )
{
{
case DelayedRepeatEvent : : DeleteCurrentFile :
case DelayedRepeatEvent : : DeleteCurrentFile :
performDeleteCurrentImage ( ( QWidget * ) m_delayedRepeatItem - > data ) ;
performDeleteCurrentImage ( ( T QWidget * ) m_delayedRepeatItem - > data ) ;
break ;
break ;
case DelayedRepeatEvent : : TrashCurrentFile :
case DelayedRepeatEvent : : TrashCurrentFile :
performTrashCurrentImage ( ( QWidget * ) m_delayedRepeatItem - > data ) ;
performTrashCurrentImage ( ( T QWidget * ) m_delayedRepeatItem - > data ) ;
break ;
break ;
case DelayedRepeatEvent : : AdvanceViewer :
case DelayedRepeatEvent : : AdvanceViewer :
replayAdvance ( m_delayedRepeatItem ) ;
replayAdvance ( m_delayedRepeatItem ) ;
@ -1401,11 +1401,11 @@ void KuickShow::toggleBrowser()
void KuickShow : : slotOpenURL ( )
void KuickShow : : slotOpenURL ( )
{
{
KFileDialog dlg ( QString: : null , kdata - > fileFilter , this , " filedialog " , true ) ;
KFileDialog dlg ( TQString( ) , kdata - > fileFilter , this , " filedialog " , true ) ;
dlg . setMode ( KFile : : Files | KFile : : Directory ) ;
dlg . setMode ( KFile : : Files | KFile : : Directory ) ;
dlg . setCaption ( i18n ( " Select Files or Folder to Open " ) ) ;
dlg . setCaption ( i18n ( " Select Files or Folder to Open " ) ) ;
if ( dlg . exec ( ) = = QDialog: : Accepted )
if ( dlg . exec ( ) = = T QDialog: : Accepted )
{
{
KURL : : List urls = dlg . selectedURLs ( ) ;
KURL : : List urls = dlg . selectedURLs ( ) ;
KURL : : List : : ConstIterator it = urls . begin ( ) ;
KURL : : List : : ConstIterator it = urls . begin ( ) ;
@ -1422,9 +1422,9 @@ void KuickShow::slotOpenURL()
void KuickShow : : deleteAllViewers ( )
void KuickShow : : deleteAllViewers ( )
{
{
QValueListIterator< ImageWindow * > it = s_viewers . begin ( ) ;
T QValueListIterator< ImageWindow * > it = s_viewers . begin ( ) ;
for ( ; it ! = s_viewers . end ( ) ; + + it ) {
for ( ; it ! = s_viewers . end ( ) ; + + it ) {
( * it ) - > disconnect ( SIGNAL( destroyed ( ) ) , this , SLOT( viewerDeleted ( ) ) ) ;
( * it ) - > disconnect ( TQT_ SIGNAL( destroyed ( ) ) , TQT_TQOBJECT ( this ) , TQT_ SLOT( viewerDeleted ( ) ) ) ;
( * it ) - > close ( true ) ;
( * it ) - > close ( true ) ;
}
}