PDA

View Full Version : simulation of navigator and image gallery



sufyane68
7th April 2015, 23:12
Hi everyone,

I am new here and i need some help for my project.
My project is to download pictures from the web and store it in a directory..And then display all the pictures like a gallery..
So i want to know which classes i have to use and how i have to organize my project.


thank you very much ;)

wysota
8th April 2015, 08:00
Do you want us to design your application for you?

sufyane68
14th April 2015, 08:25
no i just want some help like : which classes i have to use ? I am really new in Qt and C++

wysota
14th April 2015, 09:30
If you are new in C++ then how are you going to use those classes without knowing the programming language?

But ok, have it your way - QApplication, QNetworkAccessManager, QNetworkRequest, QNetworkReply, QFile, QAbstractItemModel subclass or QFileSystemModel, QListView and QAbstractItemDelegate subclass (or alternatively QGraphicsView, QGraphicsScene and QGraphicsPixmapItem), QWidget, subclasses of QLayout, QMainWindow, QString, QVariant, QUrl, QByteArray, possibly also QAction, QMenu, QToolBar, QIcon, QPixmap, QImage, QDialog, QMessageBox, QRect, QSize. That should be enough to get you started. For more you can see the full list of Qt classes.

sufyane68
23rd April 2015, 22:47
Thank you



void CHttpImageDownloader::downloadImage(const QString &imageUrl)
{

buffer.open(QBuffer::ReadWrite);

QUrl url(imageUrl);

QHttp::ConnectionMode mode = url.scheme().toLower() == "https" ? QHttp::ConnectionModeHttps : QHttp::ConnectionModeHttp;
http->setHost(url.host(), mode, url.port() == -1 ? 0 : url.port());

if (!url.userName().isEmpty())
http->setUser(url.userName(), url.password());

httpGetId = http->get(url.toString(), &buffer);
}

Thats what i wanted to do but QHttp is obsolete and i know i have to use QNetworkAccessManager but i need some help