source: qutecom-coip/libs/qtutil/tests/testimageselector.cpp

tip
Last change on this file was 126:e699782dd54b, checked in by laurent, 3 years ago

update copyright

File size: 1.3 KB
Line 
1/*
2 * QuteCom, a voice over Internet phone
3 * Copyright (C) 2010 Mbdsys
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18 */
19#include <QtCore/QDir>
20
21#include <QtGui/QApplication>
22#include <QtGui/QPixmap>
23
24#include <qtutil/DesktopService.h>
25#include <qtutil/ImageSelector.h>
26
27int main(int argc, char ** argv) {
28        Q_INIT_RESOURCE(qtutil);
29        QApplication app(argc, argv);
30        ImageSelector imageSelector(0);
31        imageSelector.setCurrentDir(QDir::currentPath());
32
33        QString home = QDir::homePath();
34        QPixmap pixmap = DesktopService::getInstance()->pixmapForPath(home, 32);
35        imageSelector.addStartDirItem(home, "Home", pixmap);
36
37        return imageSelector.exec();
38}
Note: See TracBrowser for help on using the repository browser.