summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-10-27 20:26:56 (UTC)
committer mickeyl <mickeyl>2003-10-27 20:26:56 (UTC)
commit1fed961e25a6afd4070d8873b431aba8342406c3 (patch) (side-by-side diff)
tree8ef9a1b3ad5cf50406ac500ccfb77cff60b77796
parent651d29249946e7221fc85580453750d9e4be4fb0 (diff)
downloadopie-1fed961e25a6afd4070d8873b431aba8342406c3.zip
opie-1fed961e25a6afd4070d8873b431aba8342406c3.tar.gz
opie-1fed961e25a6afd4070d8873b431aba8342406c3.tar.bz2
merge noncore/multimedia/showimg
- opieplayer2 and opierec generate lots of conflicts in merge I'll gladly leave that to the experts ljp and Harlekin ;)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/showimg/main.cpp10
-rw-r--r--noncore/multimedia/showimg/showimg.cpp6
-rw-r--r--noncore/multimedia/showimg/showimg.h1
-rw-r--r--noncore/multimedia/showimg/showimg.pro4
4 files changed, 8 insertions, 13 deletions
diff --git a/noncore/multimedia/showimg/main.cpp b/noncore/multimedia/showimg/main.cpp
index c28cc85..efb1c68 100644
--- a/noncore/multimedia/showimg/main.cpp
+++ b/noncore/multimedia/showimg/main.cpp
@@ -9,25 +9,19 @@
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "showimg.h"
#include <qpe/qpeapplication.h>
-int main( int argc, char **argv )
-{
- QPEApplication a( argc, argv );
+#include <opie/oapplicationfactory.h>
- ImageViewer w(0, "new window", Qt::WResizeNoErase );
- a.showMainDocumentWidget(&w);
-
- return a.exec();
-}
+OPIE_EXPORT_APP( OApplicationFactory<ImageViewer> ) \ No newline at end of file
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp
index d6f0733..56bdecf 100644
--- a/noncore/multimedia/showimg/showimg.cpp
+++ b/noncore/multimedia/showimg/showimg.cpp
@@ -105,33 +105,35 @@ void ControlsDialog::accept()
*b=spb->value();
done(1);
}
//===========================================================================
InfoDialog::InfoDialog(const QString &caption, const QStringList text,QWidget *parent)
: QDialog(parent,0,true)
{
setCaption(caption);
if ( parent )
{
setPalette(parent->palette());
}
- const char *labels[]={"File Name","Format","File Size","Size","Colors","Alpha"};
+
+
+ QString labels[]={ tr("File Name"),tr("Format"),tr("File Size"),tr("Size"),tr("Colors"),tr("Alpha") };
setMinimumSize(180,80);
int num=ImageViewer::LAST+1;
if ( text[ImageViewer::ALPHA].isEmpty() )
num--;
QGridLayout *gl= new QGridLayout(this,num,2,4,2);
QLabel *l;
int count=0;
for ( int i=0;i<num;i++ )
{
if ( i==1 )
{
QFrame *frm=new QFrame(this);
frm->setFrameStyle(QFrame::HLine|QFrame::Sunken);
gl->addMultiCellWidget(frm,i,i,0,1);
}
@@ -197,33 +199,33 @@ void ImageWidget::paintEvent( QPaintEvent *e )
painter.fillRect(0,0,width(),height(),QColor(0,0,0));
if ( pixmap.size() != QSize( 0, 0 ) )
{ // is an image loaded?
painter.drawPixmap((width() - pixmap.width()) / 2, (height() - pixmap.height()) / 2, pixmap);
}
}
void ImageWidget::mouseReleaseEvent(QMouseEvent *)
{
emit clicked();
}
//===========================================================================
ImageViewer::ImageViewer( QWidget *parent, const char *name, int wFlags )
-: QMainWindow( parent, name, wFlags ), filename( 0 ), bFromDocView( FALSE )
+: QMainWindow( parent, name, WResizeNoErase ), filename( 0 ), bFromDocView( FALSE )
{
setCaption( tr("Image Viewer") );
setIcon( Resource::loadPixmap( "ImageViewer" ) );
Config cfg("Image Viewer");
cfg.setGroup("Image Viewer");
showThumbView=cfg.readBoolEntry("ShowThumbnails",false);
isSized=cfg.readBoolEntry("SizeToScreen",true);
isFullScreen = FALSE;
setToolBarsMovable( FALSE );
toolBar = new QPEToolBar( this );
diff --git a/noncore/multimedia/showimg/showimg.h b/noncore/multimedia/showimg/showimg.h
index 8555ff0..abbd976 100644
--- a/noncore/multimedia/showimg/showimg.h
+++ b/noncore/multimedia/showimg/showimg.h
@@ -145,32 +145,33 @@ signals:
void clicked();
private:
QScrollView *image;
ImageWidget *pic;
QVBoxLayout *vb;
private slots:
void imageClicked();
};
class ImageViewer : public QMainWindow
{
Q_OBJECT
public:
+ static QString appName() { return QString::fromLatin1("showimg"); }
ImageViewer( QWidget *parent=0, const char *name=0, int wFlags=0 );
~ImageViewer();
void loadImage( const char *fileName );
void show(const QString& fileref);
void show();
enum INFO_STRINGS {
PATH,
FORMAT,
FILE_SIZE,
SIZE,
COLORS,
ALPHA,
LAST
diff --git a/noncore/multimedia/showimg/showimg.pro b/noncore/multimedia/showimg/showimg.pro
index d369e62..e8d753b 100644
--- a/noncore/multimedia/showimg/showimg.pro
+++ b/noncore/multimedia/showimg/showimg.pro
@@ -1,19 +1,17 @@
-TEMPLATE = app
-CONFIG += qt warn_on release
-DESTDIR = $(OPIEDIR)/bin
+CONFIG += qt warn_on release quick-app
HEADERS = showimg.h ImageFileSelector.h settingsdialog.h settingsdialogbase.h
SOURCES = main.cpp showimg.cpp ImageFileSelector.cpp settingsdialog.cpp settingsdialogbase.cpp
TARGET = showimg
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
TRANSLATIONS = ../../../i18n/de/showimg.ts \
../../../i18n/nl/showimg.ts \
../../../i18n/xx/showimg.ts \
../../../i18n/en/showimg.ts \
../../../i18n/es/showimg.ts \
../../../i18n/fr/showimg.ts \
../../../i18n/hu/showimg.ts \
../../../i18n/ja/showimg.ts \
../../../i18n/ko/showimg.ts \