I have just started following the KDE development tuorials from 2004. Everything has gone well and I have managed to work through most problems I have encountered. However this one has me stumped. Tutorial 5 from LXF58 (Oct 2004) contains the code ( in selectionbarcode.cpp )
#include "selectionbarcode.h"
#include <qmessagebox.h>
#include <qdir.h>
#include <qimage.h>
#include <qpixmap.h>
SelectionBarCode::SelectionBarCode(QWidget *parent, const char *name)
: SelectionBar(parent, name)
{
QDir dir("/sources/lxfgallery/testalbum");
if (!dir.exists())
{
qWarning("Cannot find the example directory");
}
else
{
const QFileInfoList *list = dir.entryInfoList("*.jpg *.png *.jpeg *.bmp *.tiff *.gif *.xpm");
QFileInfoListIterator iter( *list );
QFileInfo *fileinc;
while ( (fileinc = iter.current()) !=0)
{
QImage img(fileinc->absFilePath().latin1());
QPixmap pix(img.scale(64, 48, QImage::ScaleFree));
picList->insertItem(pix, fileinc->fileName().latin1());
++iter;
}
}
SelectionBarCode::~SelectionBarCode()
{
}
void SelectionBarCode::addAlbum()
{ QMessageBox::information( this,"LXFGallery","This Feature is not implemented yet.\n Because Your the developer couldn't be arsed!");
}
if I try and build this I get the following error
"/home/matthew/lxfgallery/src/selectionbarcode.cpp:45: error: `picList' undeclared (first use this function)
*** Exited with status: 2 ***"
Has anyone done the tutorials and had the same problem? if not where do I declare "picList"