Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Quoted
it seems like it would be an overloading of the display method for that particular object, but what method? It appears to be very similar to the QFilePreview tactic, but I cannot seem to find the function I am looking for.
![:]](wcf/images/smilies/pleased.gif)
Quoted
Originally posted by hatulflezet
Well, you might be right about that, but I think its the filtering method/principle you should overload/change/enhance.
On the other hand, if you change your sequence naming convention to nnnnn_basname.jpg(or similar so that the numbers are at the begining of the name), you could use the filtering as it is, since by defalut the names are sorted a-z and 0-9999...
Wont this (renaming) be easier?
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#ifndef SEQUENCE_LISTING_H
#define SEQUENCE_LISTING_H
#include <qlocalfs.h>
class sequenceListing : public QLocalFs
{
Q_OBJECT
public:
sequenceListing();
virtual ~sequenceListing();
protected:
virtual void operationListChildren( QNetworkOperation *op );
private:
QDir dir;
};
#endif
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 |
sequenceListing :: sequenceListing() : QLocalFs()
{ //nothing... }
sequenceListing :: ~sequenceListing()
{ //once again... nothing... }
void sequenceListing::operationListChildren( QNetworkOperation *op )
{
//insert or modify from qlocalfs.h...
//be sure to emit() signals like qlocalfs does....
}
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#include <qapplication.h>
#include <qnetwork.h>
#include "mainform.h"
#include "include/sequenceListing.h"
int main( int argc, char ** argv )
{
QApplication a( argc, argv );
qInitNetworkProtocols(); //filesequence viewer protocol init
// QNetworkProtocol::registerNetworkProtocol( "filesequence", new QNetworkProtocolFactory<sequenceListing> );
QNetworkProtocol::registerNetworkProtocol( "file", new QNetworkProtocolFactory<sequenceListing> );
mainForm w;
w.show();
a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
return a.exec();
}
|