author | fbarros <fbarros> | 2002-07-17 18:11:28 (UTC) |
---|---|---|
committer | fbarros <fbarros> | 2002-07-17 18:11:28 (UTC) |
commit | b498618d255732f8620055439bf25eab8feefdc0 (patch) (unidiff) | |
tree | 41020f7fb72d6816910b86d4373df727c6b6476d | |
parent | f9a3edf09f28811d57ee834833dd6fb49cb4178f (diff) | |
download | opie-b498618d255732f8620055439bf25eab8feefdc0.zip opie-b498618d255732f8620055439bf25eab8feefdc0.tar.gz opie-b498618d255732f8620055439bf25eab8feefdc0.tar.bz2 |
just 2 tr()
-rw-r--r-- | noncore/multimedia/showimg/showimg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp index 7c43e11..24218e6 100644 --- a/noncore/multimedia/showimg/showimg.cpp +++ b/noncore/multimedia/showimg/showimg.cpp | |||
@@ -88,98 +88,98 @@ void ImagePane::hideStatus() | |||
88 | 88 | ||
89 | //=========================================================================== | 89 | //=========================================================================== |
90 | /* | 90 | /* |
91 | Draws the portion of the scaled pixmap that needs to be updated | 91 | Draws the portion of the scaled pixmap that needs to be updated |
92 | */ | 92 | */ |
93 | 93 | ||
94 | void ImageWidget::paintEvent( QPaintEvent *e ) | 94 | void ImageWidget::paintEvent( QPaintEvent *e ) |
95 | { | 95 | { |
96 | QPainter painter(this); | 96 | QPainter painter(this); |
97 | 97 | ||
98 | painter.setClipRect(e->rect()); | 98 | painter.setClipRect(e->rect()); |
99 | painter.setBrush( black ); | 99 | painter.setBrush( black ); |
100 | painter.drawRect( 0, 0, width(), height() ); | 100 | painter.drawRect( 0, 0, width(), height() ); |
101 | 101 | ||
102 | if ( pixmap.size() != QSize( 0, 0 ) ) { // is an image loaded? | 102 | if ( pixmap.size() != QSize( 0, 0 ) ) { // is an image loaded? |
103 | painter.drawPixmap((width() - pixmap.width()) / 2, (height() - pixmap.height()) / 2, pixmap); | 103 | painter.drawPixmap((width() - pixmap.width()) / 2, (height() - pixmap.height()) / 2, pixmap); |
104 | } | 104 | } |
105 | } | 105 | } |
106 | 106 | ||
107 | void ImageWidget::mouseReleaseEvent(QMouseEvent *) | 107 | void ImageWidget::mouseReleaseEvent(QMouseEvent *) |
108 | { | 108 | { |
109 | emit clicked(); | 109 | emit clicked(); |
110 | } | 110 | } |
111 | 111 | ||
112 | 112 | ||
113 | //=========================================================================== | 113 | //=========================================================================== |
114 | 114 | ||
115 | ImageViewer::ImageViewer( QWidget *parent, const char *name, int wFlags ) | 115 | ImageViewer::ImageViewer( QWidget *parent, const char *name, int wFlags ) |
116 | : QMainWindow( parent, name, wFlags ), filename( 0 ), | 116 | : QMainWindow( parent, name, wFlags ), filename( 0 ), |
117 | pickx( -1 ), picky( -1 ), clickx( -1 ), clicky( -1 ), bFromDocView( FALSE ) | 117 | pickx( -1 ), picky( -1 ), clickx( -1 ), clicky( -1 ), bFromDocView( FALSE ) |
118 | { | 118 | { |
119 | setCaption( tr("Image Viewer") ); | 119 | setCaption( tr("Image Viewer") ); |
120 | setIcon( Resource::loadPixmap( "ImageViewer" ) ); | 120 | setIcon( Resource::loadPixmap( "ImageViewer" ) ); |
121 | 121 | ||
122 | isFullScreen = FALSE; | 122 | isFullScreen = FALSE; |
123 | 123 | ||
124 | setToolBarsMovable( FALSE ); | 124 | setToolBarsMovable( FALSE ); |
125 | 125 | ||
126 | toolBar = new QPEToolBar( this ); | 126 | toolBar = new QPEToolBar( this ); |
127 | toolBar->setHorizontalStretchable( TRUE ); | 127 | toolBar->setHorizontalStretchable( TRUE ); |
128 | 128 | ||
129 | menubar = new QPEMenuBar( toolBar ); | 129 | menubar = new QPEMenuBar( toolBar ); |
130 | 130 | ||
131 | QStrList fmt = QImage::outputFormats(); | 131 | QStrList fmt = QImage::outputFormats(); |
132 | 132 | ||
133 | QPopupMenu *edit = new QPopupMenu( menubar ); | 133 | QPopupMenu *edit = new QPopupMenu( menubar ); |
134 | QPopupMenu *view = new QPopupMenu( menubar ); | 134 | QPopupMenu *view = new QPopupMenu( menubar ); |
135 | 135 | ||
136 | menubar->insertItem( "Edit", edit ); | 136 | menubar->insertItem(tr("Edit"), edit ); |
137 | menubar->insertItem( "View", view ); | 137 | menubar->insertItem(tr("View"), view ); |
138 | 138 | ||
139 | edit->insertItem(tr("Horizontal flip"), this, SLOT(hFlip()), 0); | 139 | edit->insertItem(tr("Horizontal flip"), this, SLOT(hFlip()), 0); |
140 | edit->insertItem(tr("Vertical flip"), this, SLOT(vFlip()), 0); | 140 | edit->insertItem(tr("Vertical flip"), this, SLOT(vFlip()), 0); |
141 | 141 | ||
142 | stack = new QWidgetStack( this ); | 142 | stack = new QWidgetStack( this ); |
143 | stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); | 143 | stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); |
144 | setCentralWidget( stack ); | 144 | setCentralWidget( stack ); |
145 | 145 | ||
146 | imagePanel = new ImagePane( stack ); | 146 | imagePanel = new ImagePane( stack ); |
147 | connect(imagePanel, SIGNAL(clicked()), this, SLOT(normalView())); | 147 | connect(imagePanel, SIGNAL(clicked()), this, SLOT(normalView())); |
148 | 148 | ||
149 | fileSelector = new FileSelector("image/*", stack, "fs"); | 149 | fileSelector = new FileSelector("image/*", stack, "fs"); |
150 | fileSelector->setNewVisible(FALSE); | 150 | fileSelector->setNewVisible(FALSE); |
151 | fileSelector->setCloseVisible(FALSE); | 151 | fileSelector->setCloseVisible(FALSE); |
152 | connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( closeFileSelector() ) ); | 152 | connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( closeFileSelector() ) ); |
153 | connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( openFile( const DocLnk & ) ) ); | 153 | connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( openFile( const DocLnk & ) ) ); |
154 | 154 | ||
155 | toolBar = new QPEToolBar( this ); | 155 | toolBar = new QPEToolBar( this ); |
156 | 156 | ||
157 | QAction *a; | 157 | QAction *a; |
158 | 158 | ||
159 | a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 ); | 159 | a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 ); |
160 | connect( a, SIGNAL( activated() ), this, SLOT( open() ) ); | 160 | connect( a, SIGNAL( activated() ), this, SLOT( open() ) ); |
161 | a->addTo( toolBar ); | 161 | a->addTo( toolBar ); |
162 | 162 | ||
163 | a = new QAction( tr( "Rotate 180" ), Resource::loadPixmap( "repeat" ), QString::null, 0, this, 0 ); | 163 | a = new QAction( tr( "Rotate 180" ), Resource::loadPixmap( "repeat" ), QString::null, 0, this, 0 ); |
164 | connect( a, SIGNAL( activated() ), this, SLOT( rot180() ) ); | 164 | connect( a, SIGNAL( activated() ), this, SLOT( rot180() ) ); |
165 | a->addTo( toolBar ); | 165 | a->addTo( toolBar ); |
166 | a->addTo( edit ); | 166 | a->addTo( edit ); |
167 | 167 | ||
168 | a = new QAction( tr( "Rotate 90"), Resource::loadPixmap( "rotate90" ), QString::null, 0, this, 0); | 168 | a = new QAction( tr( "Rotate 90"), Resource::loadPixmap( "rotate90" ), QString::null, 0, this, 0); |
169 | connect( a, SIGNAL( activated() ), this, SLOT( rot90() ) ); | 169 | connect( a, SIGNAL( activated() ), this, SLOT( rot90() ) ); |
170 | a->addTo( toolBar ); | 170 | a->addTo( toolBar ); |
171 | a->addTo( edit ); | 171 | a->addTo( edit ); |
172 | 172 | ||
173 | a = new QAction( tr( "Fullscreen" ), Resource::loadPixmap( "fullscreen" ), QString::null, 0, this, 0 ); | 173 | a = new QAction( tr( "Fullscreen" ), Resource::loadPixmap( "fullscreen" ), QString::null, 0, this, 0 ); |
174 | connect( a, SIGNAL( activated() ), this, SLOT( fullScreen() ) ); | 174 | connect( a, SIGNAL( activated() ), this, SLOT( fullScreen() ) ); |
175 | a->addTo( toolBar ); | 175 | a->addTo( toolBar ); |
176 | a->addTo( view); | 176 | a->addTo( view); |
177 | 177 | ||
178 | stack->raiseWidget( fileSelector ); | 178 | stack->raiseWidget( fileSelector ); |
179 | 179 | ||
180 | setMouseTracking( TRUE ); | 180 | setMouseTracking( TRUE ); |
181 | } | 181 | } |
182 | 182 | ||
183 | ImageViewer::~ImageViewer() | 183 | ImageViewer::~ImageViewer() |
184 | { | 184 | { |
185 | delete imagePanel; // in case it is fullscreen | 185 | delete imagePanel; // in case it is fullscreen |