Originally Posted by
chap19150
what should I use. e.g. an array of filenames etc.
It depends. If those files are selected by the user, it will be easier for you if you could pass a list of file names to that class, but if images will be generated (or corrected) on the fly it will be easier to operate on QPixmaps. You can even consider splitting the implementation into two classes --- one that manages the slideshow and one that provides the data (actually you can have many providers that share a common interface).
Originally Posted by
chap19150
can you explain "connect QTimer to nextFrame()" to me
You can make QTimer instance emit a timeout() signal with a given frequency and use this signal to advance to the next frame.
Originally Posted by
chap19150
can you dumb this down for me?
You can do this:
class SlideShowWidget
: public QWidget{
Q_OBJECT
public:
...
public slots:
void start();
void stop();
...
};
class SlideShowWidget : public QWidget
{
Q_OBJECT
public:
...
public slots:
void start();
void stop();
...
};
To copy to clipboard, switch view to plain text mode
or this:
{
Q_OBJECT
public:
...
void setLabel
( QLabel * label
);
public slots:
void start();
void stop();
...
};
class SlideShow : public QObject
{
Q_OBJECT
public:
...
void setLabel( QLabel * label );
public slots:
void start();
void stop();
...
};
To copy to clipboard, switch view to plain text mode
SlideShowWidget is a widget that displays a slideshow, while SlideShow can display a slideshow on a given QLabel. There's not much difference between them, but it's up to you to decide which one will suit you better.
Bookmarks