@ -19,7 +19,7 @@
# include "config.h"
# endif
# include < tq clipboard.h>
# include < clipboard.h>
# include <tqslider.h>
# include <tqdragobject.h>
# include <tqtimer.h>
@ -91,14 +91,14 @@ void SQ_GLWidget::createActions()
pAFull = new KToggleAction ( TQString ( ) , 0 , 0 , 0 , ac , " SQ GL Full " ) ;
TQString squirrel_zoom_actions = TQString : : tq fromLatin1( " squirrel_zoom_actions " ) ;
TQString squirrel_zoom_actions = TQString : : fromLatin1( " squirrel_zoom_actions " ) ;
pAZoomW - > setExclusiveGroup ( squirrel_zoom_actions ) ;
pAZoomH - > setExclusiveGroup ( squirrel_zoom_actions ) ;
pAZoomWH - > setExclusiveGroup ( squirrel_zoom_actions ) ;
pAZoom100 - > setExclusiveGroup ( squirrel_zoom_actions ) ;
pAZoomLast - > setExclusiveGroup ( squirrel_zoom_actions ) ;
TQString squirrel_selection_type = TQString : : tq fromLatin1( " squirrel_selection_type " ) ;
TQString squirrel_selection_type = TQString : : fromLatin1( " squirrel_selection_type " ) ;
pASelectionEllipse - > setExclusiveGroup ( squirrel_selection_type ) ;
pASelectionRect - > setExclusiveGroup ( squirrel_selection_type ) ;
@ -236,17 +236,17 @@ void SQ_GLWidget::slotProperties()
// save tab->current image parameters and some additioanl information
// in list
list < < tab - > quickImageInfo
< < TQString : : tq fromLatin1( " %1x%2 " ) . tq arg( tab - > finfo . image [ tab - > current ] . w ) . tq arg( tab - > finfo . image [ tab - > current ] . h )
< < TQString : : tq fromLatin1( " %1 " ) . tq arg( tab - > finfo . image [ tab - > current ] . bpp )
< < TQString : : fromLatin1( " %1x%2 " ) . arg( tab - > finfo . image [ tab - > current ] . w ) . arg( tab - > finfo . image [ tab - > current ] . h )
< < TQString : : fromLatin1( " %1 " ) . arg( tab - > finfo . image [ tab - > current ] . bpp )
< < tab - > finfo . image [ tab - > current ] . colorspace
< < tab - > finfo . image [ tab - > current ] . compression
< < sz
< < TQString : : tq fromLatin1( " %1 " ) . tq arg( ( double ) real_size / tab - > fmt_size , 0 , ' f ' , 2 )
< < TQString : : fromLatin1( " %1 " ) . arg( ( double ) real_size / tab - > fmt_size , 0 , ' f ' , 2 )
< < ( ( tab - > finfo . image [ tab - > current ] . interlaced ) ? i18n ( " yes " ) : i18n ( " no " ) )
< < TQString : : tq fromLatin1( " %1 " ) . tq arg( errors )
< < TQString : : tq fromLatin1( " %1 " ) . tq arg( tab - > finfo . image . size ( ) )
< < TQString : : tq fromLatin1( " #%1 " ) . tq arg( tab - > current + 1 )
< < TQString : : tq fromLatin1( " %1 " ) . tq arg( tab - > finfo . image [ tab - > current ] . delay ) ;
< < TQString : : fromLatin1( " %1 " ) . arg( errors )
< < TQString : : fromLatin1( " %1 " ) . arg( tab - > finfo . image . size ( ) )
< < TQString : : fromLatin1( " #%1 " ) . arg( tab - > current + 1 )
< < TQString : : fromLatin1( " %1 " ) . arg( tab - > finfo . image [ tab - > current ] . delay ) ;
// create dialog and setup it
SQ_ImageProperties prop ( this ) ;
@ -493,7 +493,7 @@ void SQ_GLWidget::saveAs()
if ( ! wlib | | ! wlib - > writestatic )
{
KMessageBox : : error ( this , i18n ( " Sorry, could not perform write operation \n for codec \" %1 \" " ) . tq arg( d . nameFilter ( ) ) ) ;
KMessageBox : : error ( this , i18n ( " Sorry, could not perform write operation \n for codec \" %1 \" " ) . arg( d . nameFilter ( ) ) ) ;
return ;
}
@ -644,9 +644,9 @@ void SQ_GLWidget::toClipboard()
// image doesn't have extra regions
if ( tab - > parts [ tab - > current ] . realw = = tab - > parts [ tab - > current ] . w & & tab - > parts [ tab - > current ] . realh = = tab - > parts [ tab - > current ] . h )
KApplication : : tq clipboard( ) - > setImage ( im , TQClipboard : : Clipboard ) ;
KApplication : : clipboard( ) - > setImage ( im , TQClipboard : : Clipboard ) ;
else
KApplication : : tq clipboard( ) - > setImage ( im . copy ( 0 , 0 , tab - > parts [ tab - > current ] . w , tab - > parts [ tab - > current ] . h ) , TQClipboard : : Clipboard ) ;
KApplication : : clipboard( ) - > setImage ( im . copy ( 0 , 0 , tab - > parts [ tab - > current ] . w , tab - > parts [ tab - > current ] . h ) , TQClipboard : : Clipboard ) ;
}
void SQ_GLWidget : : bcg ( )
@ -867,7 +867,7 @@ void SQ_GLWidget::initAccelsAndMenu()
menu - > insertItem ( i18n ( " Image " ) , menuImage ) ;
# define SQ_ADD_KACTION(b) \
( new KAction ( TQString ( ) , b , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotAccelActivated ( ) ) , ac , TQString : : tq fromLatin1( " action_%1 " ) . tq arg( b ) ) )
( new KAction ( TQString ( ) , b , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotAccelActivated ( ) ) , ac , TQString : : fromLatin1( " action_%1 " ) . arg( b ) ) )
id_saveas = menuFile - > insertItem ( SQ_IconLoader : : instance ( ) - > loadIcon ( " filesaveas " , KIcon : : Desktop , KIcon : : SizeSmall ) , i18n ( " Save As... " ) + " \t S " , SQ_ADD_KACTION ( TQt : : Key_S ) , TQT_SLOT ( activate ( ) ) ) ;
@ -900,13 +900,13 @@ void SQ_GLWidget::initAccelsAndMenu()
menuZoom - > insertItem ( i18n ( " Zoom 2x " ) + " \t Ctrl++ " , SQ_ADD_KACTION ( TQt : : Key_Plus + CTRL ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( i18n ( " Zoom 1/2x " ) + " \t Ctrl+- " , SQ_ADD_KACTION ( TQt : : Key_Minus + CTRL ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertSeparator ( ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom10016.png " ) ) , TQString : : tq fromLatin1( " 100% " ) + " \t 1 " , SQ_ADD_KACTION ( TQt : : Key_1 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom20016.png " ) ) , TQString : : tq fromLatin1( " 200% " ) + " \t 2 " , SQ_ADD_KACTION ( TQt : : Key_2 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom30016.png " ) ) , TQString : : tq fromLatin1( " 300% " ) + " \t 3 " , SQ_ADD_KACTION ( TQt : : Key_3 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom50016.png " ) ) , TQString : : tq fromLatin1( " 500% " ) + " \t 5 " , SQ_ADD_KACTION ( TQt : : Key_5 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom70016.png " ) ) , TQString : : tq fromLatin1( " 700% " ) + " \t 7 " , SQ_ADD_KACTION ( TQt : : Key_7 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom90016.png " ) ) , TQString : : tq fromLatin1( " 900% " ) + " \t 9 " , SQ_ADD_KACTION ( TQt : : Key_9 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom100016.png " ) ) , TQString : : tq fromLatin1( " 1000% " ) + " \t 0 " , SQ_ADD_KACTION ( TQt : : Key_0 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom10016.png " ) ) , TQString : : fromLatin1( " 100% " ) + " \t 1 " , SQ_ADD_KACTION ( TQt : : Key_1 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom20016.png " ) ) , TQString : : fromLatin1( " 200% " ) + " \t 2 " , SQ_ADD_KACTION ( TQt : : Key_2 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom30016.png " ) ) , TQString : : fromLatin1( " 300% " ) + " \t 3 " , SQ_ADD_KACTION ( TQt : : Key_3 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom50016.png " ) ) , TQString : : fromLatin1( " 500% " ) + " \t 5 " , SQ_ADD_KACTION ( TQt : : Key_5 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom70016.png " ) ) , TQString : : fromLatin1( " 700% " ) + " \t 7 " , SQ_ADD_KACTION ( TQt : : Key_7 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom90016.png " ) ) , TQString : : fromLatin1( " 900% " ) + " \t 9 " , SQ_ADD_KACTION ( TQt : : Key_9 ) , TQT_SLOT ( activate ( ) ) ) ;
menuZoom - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/zoom100016.png " ) ) , TQString : : fromLatin1( " 1000% " ) + " \t 0 " , SQ_ADD_KACTION ( TQt : : Key_0 ) , TQT_SLOT ( activate ( ) ) ) ;
menuMove - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/moveLeft16.png " ) ) , i18n ( " Move left " ) + " \t Right " , SQ_ADD_KACTION ( TQt : : Key_Right ) , TQT_SLOT ( activate ( ) ) ) ;
menuMove - > insertItem ( TQPixmap ( locate ( " data " , " images/menu/moveRight16.png " ) ) , i18n ( " Move right " ) + " \t Left " , SQ_ADD_KACTION ( TQt : : Key_Left ) , TQT_SLOT ( activate ( ) ) ) ;
@ -1224,7 +1224,7 @@ void SQ_GLWidget::crop()
{
KMessageBox : : error ( this ,
i18n ( " Memory allocation failed for %1 of memory " )
. tq arg( KIO : : convertSize ( pp . realw * pp . realh * sizeof ( RGBA ) ) ) ) ;
. arg( KIO : : convertSize ( pp . realw * pp . realh * sizeof ( RGBA ) ) ) ) ;
return ;
}
@ -1312,7 +1312,7 @@ void SQ_GLWidget::slotChangeTab(int id)
for ( ; it ! = itEnd ; + + it , + + i )
{
mid = images - > insertItem ( TQString : : tq fromLatin1( " #%1 [%2x%3@%4] " ) . tq arg( i + 1 ) . tq arg( ( * it ) . w ) . tq arg( ( * it ) . h ) . tq arg( ( * it ) . bpp ) ) ;
mid = images - > insertItem ( TQString : : fromLatin1( " #%1 [%2x%3@%4] " ) . arg( i + 1 ) . arg( ( * it ) . w ) . arg( ( * it ) . h ) . arg( ( * it ) . bpp ) ) ;
images - > setItemParameter ( mid , i ) ;
if ( i = = tab - > current )
@ -1493,7 +1493,7 @@ void SQ_GLWidget::setClearColor()
{
// system color
case 0 :
color = tq colorGroup( ) . color ( TQColorGroup : : Base ) ;
color = colorGroup( ) . color ( TQColorGroup : : Base ) ;
break ;
// custom color
@ -1623,10 +1623,10 @@ void SQ_GLWidget::createMarks()
*/
void SQ_GLWidget : : updateCurrentFileInfo ( )
{
TQString status = TQString : : tq fromLatin1( " %1x%2@%3 " )
. tq arg( tab - > finfo . image [ tab - > current ] . w )
. tq arg( tab - > finfo . image [ tab - > current ] . h )
. tq arg( tab - > finfo . image [ tab - > current ] . bpp ) ;
TQString status = TQString : : fromLatin1( " %1x%2@%3 " )
. arg( tab - > finfo . image [ tab - > current ] . w )
. arg( tab - > finfo . image [ tab - > current ] . h )
. arg( tab - > finfo . image [ tab - > current ] . bpp ) ;
# ifndef KSQUIRREL_PART
SQ_GLView : : window ( ) - > sbarWidget ( " SBDecoded " ) - > setText ( status ) ;
@ -1667,7 +1667,7 @@ void SQ_GLWidget::calcFrameLabelWidth()
# ifndef KSQUIRREL_PART
SQ_GLView : : window ( ) - > sbarWidget ( " SBFrame " ) - > setFixedWidth (
SQ_GLView : : window ( ) - > sbarWidget ( " SBFrame " ) - > fontMetrics ( )
. boundingRect ( TQString : : tq fromLatin1( " 0%1/0%2 " ) . tq arg( tab - > total ) . tq arg( tab - > total ) ) . width ( ) ) ;
. boundingRect ( TQString : : fromLatin1( " 0%1/0%2 " ) . arg( tab - > total ) . arg( tab - > total ) ) . width ( ) ) ;
# endif
}
@ -1680,9 +1680,9 @@ void SQ_GLWidget::calcFrameLabelWidth()
void SQ_GLWidget : : frameChanged ( )
{
# ifndef KSQUIRREL_PART
SQ_GLView : : window ( ) - > sbarWidget ( " SBFrame " ) - > setText ( TQString : : tq fromLatin1( " %1/%2 " ) . tq arg( tab - > current + 1 ) . tq arg( tab - > total ) ) ;
SQ_GLView : : window ( ) - > sbarWidget ( " SBFrame " ) - > setText ( TQString : : fromLatin1( " %1/%2 " ) . arg( tab - > current + 1 ) . arg( tab - > total ) ) ;
# else
t_glv . sbarWidget ( " SBFrame " ) - > setText ( TQString : : tq fromLatin1( " %1/%2 " ) . tq arg( tab - > current + 1 ) . tq arg( tab - > total ) ) ;
t_glv . sbarWidget ( " SBFrame " ) - > setText ( TQString : : fromLatin1( " %1/%2 " ) . arg( tab - > current + 1 ) . arg( tab - > total ) ) ;
# endif
}
@ -1755,7 +1755,7 @@ void SQ_GLWidget::slotPrint()
TQSize sz ( img . width ( ) , img . height ( ) ) ;
if ( img . width ( ) > mt . width ( ) | | img . height ( ) > mt . height ( ) )
sz . tq scale( mt . width ( ) , mt . height ( ) , TQSize : : ScaleMin ) ;
sz . scale( mt . width ( ) , mt . height ( ) , TQSize : : ScaleMin ) ;
int cp = printer . numCopies ( ) ;
@ -1774,5 +1774,5 @@ void SQ_GLWidget::copyURL()
if ( ! decoded | | tab - > broken )
return ;
TQApplication : : tq clipboard( ) - > setText ( tab - > m_original . prettyURL ( ) ) ;
TQApplication : : clipboard( ) - > setText ( tab - > m_original . prettyURL ( ) ) ;
}