Qtopia Home - Classes - Annotated - Functions - Qt Embedded |
|
This is the verbatim text of the imageselector.h include file. It is provided only for illustration; the copyright remains with Trolltech.
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** 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.
**
**********************************************************************/
#ifndef IMAGESELECTOR_H
#define IMAGESELECTOR_H
#include <qvbox.h>
#include <qdialog.h>
#include <qtopia/qpeglobal.h>
#include <qtopia/applnk.h>
class ImageSelectorPrivate;
class ImageSelectorDialogPrivate;
class ContextMenu;
//
//
//
class QTOPIA_EXPORT ImageSelector: public QVBox
{
Q_OBJECT
public:
ImageSelector(QWidget *parent = 0, const char *name = 0,
const QString &srcdir = QString::null, int wflags = 0);
~ImageSelector(void);
QSize sizeHint(void) const;
QString selectedFilename(void) const;
DocLnk selectedDocument(void) const;
QPixmap selectedImage(const int width, const int height) const;
QValueList<DocLnk> fileList() const;
void setThumbnailSize(const int pixels);
int thumbnailSize(void) const;
void showImageView(bool show, bool fullscreen=FALSE);
bool imageViewVisible() const;
#ifdef QTOPIA_PHONE
ContextMenu *menu() const;
#endif
signals:
void selected(const DocLnk &);
public:
void setCategory(int);
private:
void obtainFileList(const QString &srcdir,
const QString &mask = "image/*");
ImageSelectorPrivate *d;
private slots:
void selectedThumbnail(int index);
void fullScreen(int index);
void selectedFullscreen(void);
void toggleFullscreen(void);
void preshow(QWidget *);
void slideShow(int delay, bool wrap);
};
class QTOPIA_EXPORT ImageSelectorDialog : public QDialog
{
Q_OBJECT
public:
ImageSelectorDialog (QWidget *parent = 0, const char *name = 0, bool modal=TRUE,
const QString &srcdir = QString::null, int wflags = 0);
~ImageSelectorDialog ();
QString selectedFilename() const { return selector->selectedFilename(); }
DocLnk selectedDocument() const { return selector->selectedDocument(); }
QPixmap selectedImage(const int width, const int height) const {
return selector->selectedImage(width, height); }
QValueList<DocLnk> fileList() const { return selector->fileList(); }
void setThumbnailSize(const int pixels) { selector->setThumbnailSize(pixels); }
int thumbnailSize() const { return selector->thumbnailSize(); }
#ifdef QTOPIA_PHONE
ContextMenu *menu() const { return selector->menu(); }
#endif
signals:
void selected(const DocLnk &);
private:
ImageSelectorDialogPrivate *d;
ImageSelector *selector;
};
#endif // IMAGESELECTOR_H
| Copyright © 2001-2004 Trolltech | Trademarks | Qtopia version 2.0.1
|