-rw-r--r-- | noncore/multimedia/showimg/main.cpp | 10 | ||||
-rw-r--r-- | noncore/multimedia/showimg/showimg.cpp | 6 | ||||
-rw-r--r-- | noncore/multimedia/showimg/showimg.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/showimg/showimg.pro | 4 |
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 @@ -19,15 +19,9 @@ **********************************************************************/ #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 @@ -115,13 +115,15 @@ InfoDialog::InfoDialog(const QString &caption, const QStringList text,QWidget *p 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); @@ -207,13 +209,13 @@ 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"); 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 @@ -155,12 +155,13 @@ private slots: 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(); 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,9 +1,7 @@ -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 |