sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/animatedtiles
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000D7D1
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
view->setBackgroundBrush(bgPix);
view->setCacheMode(QGraphicsView::CacheBackground);
view->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
-#ifdef Q_OS_SYMBIAN
- view->showMaximized();
-#else
view->show();
-#endif
QStateMachine states;
states.addState(rootState);
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/appchooser
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000E3F5
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
machine.setInitialState(group);
machine.start();
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- window.showMaximized();
-#else
window.resize(300, 300);
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/easing
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000E3F6
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
Window w;
-#if defined(Q_OS_SYMBIAN)
- w.showMaximized();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- w.show();
-#else
w.resize(400, 400);
w.show();
-#endif
return app.exec();
}
Window::Window(QWidget *parent)
: QWidget(parent),
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
- m_iconSize(32, 32)
-#else
m_iconSize(64, 64)
-#endif
{
m_ui.setupUi(this);
QButtonGroup *buttonGroup = findChild<QButtonGroup *>(); // ### workaround for uic in 4.4
machine.start();
//![9]
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- window.showMaximized();
- window.fitInView(scene.sceneRect() );
-#else
window.resize(300, 300);
window.show();
-#endif
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/moveblocks
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000E3F7
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
GraphicsView view(&scene);
-#if defined(Q_OS_SYMBIAN)
- view.showMaximized();
-#else
view.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/states
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000E3F8
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
StickMan *stickMan = new StickMan;
stickMan->setDrawSticks(false);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- RectButton *buttonJump = new RectButton("Jump"); buttonJump->setPos(100, 125);
- RectButton *buttonDance = new RectButton("Dance"); buttonDance->setPos(100, 200);
- RectButton *buttonChill = new RectButton("Chill"); buttonChill->setPos(100, 275);
-#else
QGraphicsTextItem *textItem = new QGraphicsTextItem();
textItem->setHtml("<font color=\"white\"><b>Stickman</b>"
"<p>"
qreal w = textItem->boundingRect().width();
QRectF stickManBoundingRect = stickMan->mapToScene(stickMan->boundingRect()).boundingRect();
textItem->setPos(-w / 2.0, stickManBoundingRect.bottom() + 25.0);
-#endif
QGraphicsScene scene;
scene.addItem(stickMan);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- scene.addItem(buttonJump);
- scene.addItem(buttonDance);
- scene.addItem(buttonChill);
-#else
scene.addItem(textItem);
-#endif
scene.setBackgroundBrush(Qt::black);
GraphicsView view;
view.resize(sceneRect.width() + 100, sceneRect.height() + 100);
view.setSceneRect(sceneRect);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- view.showMaximized();
- view.fitInView(scene.sceneRect(), Qt::KeepAspectRatio);
-#else
view.show();
view.setFocus();
-#endif
LifeCycle cycle(stickMan, &view);
cycle.setDeathAnimation(":/animations/dead");
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- cycle.addActivity(":/animations/jumping", Qt::Key_J, buttonJump, SIGNAL(clicked()));
- cycle.addActivity(":/animations/dancing", Qt::Key_D, buttonDance, SIGNAL(clicked()));
- cycle.addActivity(":/animations/chilling", Qt::Key_C, buttonChill, SIGNAL(clicked()));
-#else
cycle.addActivity(":/animations/jumping", Qt::Key_J);
cycle.addActivity(":/animations/dancing", Qt::Key_D);
cycle.addActivity(":/animations/chilling", Qt::Key_C);
-#endif
cycle.start();
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/stickman
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000E3F9
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/complexpingpong
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/complexpingpong
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/chat
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus
INSTALLS += sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/listnames
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/pingpong
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/pingpong
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/remotecontrolledcar/car
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/remotecontrolledcar/controller
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/remotecontrolledcar
INSTALLS += sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/desktop
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/desktop/screenshot
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/classwizard
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/configdialog
INSTALLS += target sources
-symbian: CONFIG += qt_example
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
tabdialog \
trivialwizard
-!symbian:!wince*: SUBDIRS += licensewizard \
+!wince*: SUBDIRS += licensewizard \
extension \
findfiles
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs
INSTALLS += sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/extension
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
//! [2]
//! [3]
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
- // Create menu
- QMenu *menu = new QMenu(this);
-
- // Create Find menu item
- menu->addAction(tr("Find"));
-
- // Create More menu item
- QAction *moreAction = menu->addAction(tr("More"));
- moreAction->setCheckable(true);
-
- // Create Options CBA
- QAction *optionAction = new QAction(tr("Options"), this);
-
- // Set defined menu into Options button
- optionAction->setMenu(menu);
- optionAction->setSoftKeyRole(QAction::PositiveSoftKey);
- addAction(optionAction);
-
- // Connect More menu item to setVisible slot
- connect(moreAction, SIGNAL(triggered(bool)), extension, SLOT(setVisible(bool)));
-
- // Create Exit CBA
- QAction *backSoftKeyAction = new QAction(QString(tr("Exit")), this);
- backSoftKeyAction->setSoftKeyRole(QAction::NegativeSoftKey);
-
- // Exit button closes the application
- connect(backSoftKeyAction, SIGNAL(triggered()), qApp, SLOT(quit()));
- addAction(backSoftKeyAction);
-#else
buttonBox = new QDialogButtonBox(Qt::Vertical);
buttonBox->addButton(findButton, QDialogButtonBox::ActionRole);
buttonBox->addButton(moreButton, QDialogButtonBox::ActionRole);
connect(moreButton, SIGNAL(toggled(bool)), extension, SLOT(setVisible(bool)));
-#endif
QVBoxLayout *extensionLayout = new QVBoxLayout;
extensionLayout->setMargin(0);
leftLayout->addWidget(fromStartCheckBox);
QGridLayout *mainLayout = new QGridLayout;
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
mainLayout->setSizeConstraint(QLayout::SetFixedSize);
-#endif
mainLayout->addLayout(leftLayout, 0, 0);
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_SIMULATOR)
mainLayout->addWidget(buttonBox, 0, 1);
-#endif
mainLayout->addWidget(extension, 1, 0, 1, 2);
mainLayout->setRowStretch(2, 1);
QApplication app(argc, argv);
FindDialog dialog;
-#ifdef Q_OS_SYMBIAN
- dialog.showMaximized();
-#else
dialog.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/findfiles
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Window window;
-#ifdef Q_OS_SYMBIAN
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
setLayout(mainLayout);
setWindowTitle(tr("Find Files"));
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
resize(700, 300);
-#endif
}
//! [1]
filesTable->setItem(row, 1, sizeItem);
}
filesFoundLabel->setText(tr("%1 file(s) found").arg(files.size()) +
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
- (" (Select file to open it)"));
-#else
(" (Double click on a file to open it)"));
-#endif
filesFoundLabel->setWordWrap(true);
}
//! [8]
comboBox->setEditable(true);
comboBox->addItem(text);
comboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- comboBox->setMinimumContentsLength(3);
-#endif
return comboBox;
}
//! [10]
//! [2]
//! [3]
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
//! [3] //! [4]
setWizardStyle(ModernStyle);
#endif
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/licensewizard
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets printsupport
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/sipdialog
INSTALLS += target sources
-symbian: CONFIG += qt_example
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
layout->addWidget(errorButton, 14, 0);
layout->addWidget(errorLabel, 14, 1);
layout->addWidget(native, 15, 0);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- QWidget *widget = new QWidget;
- widget->setLayout(layout);
-
- QScrollArea *scrollArea = new QScrollArea(this);
- scrollArea->setWidget(widget);
-
- QHBoxLayout *mainLayout = new QHBoxLayout;
- mainLayout->addWidget(scrollArea);
- setLayout(mainLayout);
-#else
setLayout(layout);
-#endif
setWindowTitle(tr("Standard Dialogs"));
}
app.installTranslator(translator);
Dialog dialog;
-#ifdef Q_OS_SYMBIAN
- dialog.showMaximized();
-#else
dialog.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/standarddialogs
INSTALLS += target sources
-symbian: CONFIG += qt_example
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
QT += widgets
-maemo5: CONFIG += qt_example
fileName = ".";
TabDialog tabdialog(fileName);
-#ifdef Q_OS_SYMBIAN
- tabdialog.showMaximized();
-#else
tabdialog.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/tabdialog
INSTALLS += target sources
-symbian: CONFIG += qt_example
wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
wizard.addPage(createConclusionPage());
wizard.setWindowTitle("Trivial Wizard");
-#ifdef Q_OS_SYMBIAN
- wizard.showMaximized();
-#else
wizard.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/trivialwizard
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
simulator: warning(This example might not fully work on Simulator platform)
puzzle
wince*: SUBDIRS -= dropsite
-symbian: SUBDIRS -= dropsite
# install
sources.files = README *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/draggableicons
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C615
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
DragWidget::DragWidget(QWidget *parent)
: QFrame(parent)
{
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
-#else
setMinimumSize(200, 200);
-#endif
setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
setAcceptDrops(true);
mainWidget.setLayout(horizontalLayout);
mainWidget.setWindowTitle(QObject::tr("Draggable Icons"));
-#ifdef Q_OS_SYMBIAN
- mainWidget.showMaximized();
-#else
mainWidget.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/draggabletext
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000CF64
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-simulator: warning(This example might not fully work on Simulator platform)
+
QApplication app(argc, argv);
DragWidget window;
-#ifdef Q_OS_SYMBIAN
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/dropsite
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
wordLabel->show();
wordLabel->setAttribute(Qt::WA_DeleteOnClose);
x += wordLabel->width() + 2;
-#if defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- if (x >= 345) {
-#else
if (x >= 245) {
-#endif
x = 5;
y += wordLabel->height() + 2;
}
//! [1]
//! [2]
- #ifndef Q_WS_S60
//Fridge magnets is used for demoing Qt on S60 and themed backgrounds look better than white
QPalette newPalette = palette();
newPalette.setColor(QPalette::Window, Qt::white);
setPalette(newPalette);
- #endif
setMinimumSize(400, qMax(200, y));
setWindowTitle(tr("Fridge Magnets"));
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/fridgemagnets
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C610
- CONFIG += qt_example
-}
-
QT += widgets
-maemo5: CONFIG += qt_example
#endif
DragWidget window;
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- window.showMaximized();
-#else
bool smallScreen = QApplication::arguments().contains("-small-screen");
if (smallScreen)
window.showFullScreen();
else
window.show();
-#endif
return app.exec();
}
QApplication app(argc, argv);
MainWindow window;
window.openImage(":/images/example.jpg");
-#ifdef Q_OS_SYMBIAN
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
{
QFrame *frame = new QFrame;
QHBoxLayout *frameLayout = new QHBoxLayout(frame);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
- puzzleWidget = new PuzzleWidget(260);
-#else
puzzleWidget = new PuzzleWidget(400);
-#endif
piecesList = new PiecesList(puzzleWidget->pieceSize(), this);
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/puzzle
INSTALLS += target sources
-symbian:{
- TARGET.UID3 = 0xA000CF65
- CONFIG += qt_example
- addFile.files = example.jpg
- addFile.path = .
- DEPLOYMENT += addFile
-}
wince*: {
addFile.files = example.jpg
addFile.path = .
DEPLOYMENT += addFile
}
QT += widgets
-maemo5: CONFIG += qt_example
void BlurPicker::resizeEvent(QResizeEvent */*event*/)
{
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- fitInView(sceneRect(), Qt::KeepAspectRatio);
-#endif
}
void BlurPicker::mousePressEvent(QMouseEvent *event)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
BlurPicker blurPicker;
blurPicker.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Application Picker"));
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- blurPicker.showMaximized();
-#else
blurPicker.setFixedSize(400, 300);
blurPicker.show();
-#endif
return app.exec();
}
connect(press, SIGNAL(clicked()), SLOT(togglePopup()));
m_scene.addWidget(press);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- press->move(200, 210);
-#else
press->move(300, 500);
-#endif
}
fademessage.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/fademessage
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
QT += widgets
simulator: warning(This example might not fully work on Simulator platform)
FadeMessage widget;
widget.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Popup Message with Effect"));
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- widget.showMaximized();
-#else
widget.setFixedSize(400, 600);
widget.show();
-#endif
return app.exec();
}
void Lighting::resizeEvent(QResizeEvent */*event*/)
{
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- fitInView(sceneRect(), Qt::KeepAspectRatio);
-#endif
}
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
Lighting lighting;
lighting.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Lighting and Shadows"));
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- lighting.showMaximized();
-#else
lighting.resize(640, 480);
lighting.show();
-#endif
return app.exec();
}
QPixmap drawDigits(int n, const QRect &rect) {
int scaleFactor = 2;
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
- if (rect.height() > 240)
- scaleFactor = 1;
-#endif
QString str = QString::number(n);
if (str.length() == 1)
void paintFlip() {
QPainter p(this);
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_WINCE_WM)
p.setRenderHint(QPainter::SmoothPixmapTransform, true);
p.setRenderHint(QPainter::Antialiasing, true);
-#endif
p.fillRect(rect(), Qt::black);
int hw = width() / 2;
connect(slideAction, SIGNAL(triggered()), SLOT(chooseSlide()));
connect(flipAction, SIGNAL(triggered()), SLOT(chooseFlip()));
connect(rotateAction, SIGNAL(triggered()), SLOT(chooseRotate()));
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
- menuBar()->addAction(slideAction);
- menuBar()->addAction(flipAction);
- menuBar()->addAction(rotateAction);
-#else
addAction(slideAction);
addAction(flipAction);
addAction(rotateAction);
setContextMenuPolicy(Qt::ActionsContextMenu);
-#endif
}
void updateTime() {
QApplication app(argc, argv);
DigiFlip time;
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
- time.showMaximized();
-#else
time.resize(320, 240);
time.show();
-#endif
return app.exec();
}
SOURCES = digiflip.cpp
-symbian {
- TARGET.UID3 = 0xA000CF72
- CONFIG += qt_example
-}
-
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/digiflip
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/digiflip
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded
INSTALLS += sources
-symbian: CONFIG += qt_demo
QT += widgets widgets
SOURCES = flickable.cpp main.cpp
HEADERS = flickable.h
-symbian {
- TARGET.UID3 = 0xA000CF73
- CONFIG += qt_example
-}
-
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flickable
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flickable
ColorList list;
list.setWindowTitle("Kinetic Scrolling");
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
- list.showMaximized();
-#else
list.resize(320, 320);
list.show();
-#endif
return app.exec();
}
connect(randomAction, SIGNAL(triggered()), SLOT(randomFlight()));
connect(&m_manager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(handleNetworkData(QNetworkReply*)));
-#if defined(Q_OS_SYMBIAN)
- menuBar()->addAction(searchTodayAction);
- menuBar()->addAction(searchYesterdayAction);
- menuBar()->addAction(randomAction);
-#else
addAction(searchTodayAction);
addAction(searchYesterdayAction);
addAction(randomAction);
setContextMenuPolicy(Qt::ActionsContextMenu);
-#endif
}
private slots:
QApplication app(argc, argv);
FlightInfo w;
-#if defined(Q_OS_SYMBIAN)
- w.showMaximized();
-#else
w.resize(360, 504);
w.show();
-#endif
return app.exec();
}
RESOURCES = flightinfo.qrc
QT += network widgets
-symbian {
- TARGET.UID3 = 0xA000CF74
- CONFIG += qt_example
- TARGET.CAPABILITY = NetworkServices
-}
-
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flightinfo
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flightinfo
p.begin(this);
m_normalMap->render(&p, event->rect());
p.setPen(Qt::black);
-#if defined(Q_OS_SYMBIAN)
- QFont font = p.font();
- font.setPixelSize(13);
- p.setFont(font);
-#endif
p.drawText(rect(), Qt::AlignBottom | Qt::TextWordWrap,
"Map data CCBYSA 2009 OpenStreetMap.org contributors");
p.end();
slippymap.cpp
QT += network widgets
-symbian {
- TARGET.UID3 = 0xA000CF75
- CONFIG += qt_example
- TARGET.CAPABILITY = NetworkServices
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
-}
-
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/lightmaps
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/lightmaps
int main(int argc, char **argv)
{
-#if defined(Q_WS_X11)
- QApplication::setGraphicsSystem("raster");
-#endif
QApplication app(argc, argv);
app.setApplicationName("LightMaps");
MapZoom w;
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
- w.showMaximized();
-#else
w.resize(600, 450);
w.show();
-#endif
return app.exec();
}
connect(nightModeAction, SIGNAL(triggered()), map, SLOT(toggleNightMode()));
connect(osmAction, SIGNAL(triggered()), SLOT(aboutOsm()));
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
- menuBar()->addAction(osloAction);
- menuBar()->addAction(berlinAction);
- menuBar()->addAction(jakartaAction);
- menuBar()->addAction(nightModeAction);
- menuBar()->addAction(osmAction);
-#else
QMenu *menu = menuBar()->addMenu(tr("&Options"));
menu->addAction(osloAction);
menu->addAction(berlinAction);
menu->addSeparator();
menu->addAction(nightModeAction);
menu->addAction(osmAction);
-#endif
QNetworkConfigurationManager manager;
if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
Raycasting w;
w.setWindowTitle("Raycasting");
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
- w.showMaximized();
-#else
w.resize(640, 480);
w.show();
-#endif
return app.exec();
}
SOURCES = raycasting.cpp
RESOURCES += raycasting.qrc
-symbian {
- TARGET.UID3 = 0xA000CF76
- CONFIG += qt_example
-}
-
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/raycasting
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/raycasting
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styleexample
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A63F
- CONFIG += qt_example
-}
QT += widgets widgets
gestures
}
-symbian: SUBDIRS = \
- graphicsview \
- itemviews \
- network \
- painting \
- widgets \
- draganddrop \
- mainwindows \
- sql \
- animation \
- gestures \
- xml
-
qpa:SUBDIRS += qpa
-wince*|symbian|embedded|x11:!contains(QT_CONFIG, no-gui): SUBDIRS += embedded
+wince*|embedded|x11:!contains(QT_CONFIG, no-gui): SUBDIRS += embedded
embedded:SUBDIRS += qws
contains(QT_BUILD_PARTS, tools):!contains(QT_CONFIG, no-gui):SUBDIRS += qtestlib
sources.path = $$[QT_INSTALL_EXAMPLES]
INSTALLS += sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
INSTALLS += target \
sources
-symbian {
- TARGET.UID3 = 0xA000D7D0
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
-maemo5: warning(This example does not work on Maemo platform)
-simulator: warning(This example does not work on Simulator platform)
+
TARGET = anchorlayout
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
scene.setBackgroundBrush(Qt::darkGreen);
QGraphicsView view(&scene);
-#if defined(Q_WS_S60)
- view.showMaximized();
-#else
view.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/basicgraphicslayouts
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A645
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-simulator: warning(This example might not fully work on Simulator platform)
Window *window = new Window;
scene.addItem(window);
QGraphicsView view(&scene);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- view.showMaximized();
-#else
view.resize(600, 600);
view.show();
-#endif
return app.exec();
}
glUnmapBuffer
*/
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
# ifndef APIENTRYP
# ifdef APIENTRY
# define APIENTRYP APIENTRY *
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/chip
INSTALLS += target sources
-symbian: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/collidingmice
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A643
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-simulator: warning(This example might not fully work on Simulator platform)
+
view.setDragMode(QGraphicsView::ScrollHandDrag);
//! [5] //! [6]
view.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Colliding Mice"));
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- view.showMaximized();
-#else
view.resize(400, 300);
view.show();
-#endif
QTimer timer;
QObject::connect(&timer, SIGNAL(timeout()), &scene, SLOT(advance()));
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/diagramscene
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
QT += widgets
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/dragdroprobot
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
protected:
virtual void resizeEvent(QResizeEvent *)
{
-#if defined(Q_OS_SYMBIAN)
- fitInView(sceneRect(), Qt::KeepAspectRatio);
-#endif
}
};
view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
view.setBackgroundBrush(QColor(230, 200, 167));
view.setWindowTitle("Drag and Drop Robot");
-#if defined(Q_OS_SYMBIAN)
- view.showMaximized();
-#else
view.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/elasticnodes
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A642
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-
-simulator: warning(This example might not fully work on Simulator platform)
painter->setBrush(Qt::NoBrush);
painter->drawRect(sceneRect);
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
// Text
QRectF textRect(sceneRect.left() + 4, sceneRect.top() + 4,
sceneRect.width() - 4, sceneRect.height() - 4);
painter->drawText(textRect.translated(2, 2), message);
painter->setPen(Qt::black);
painter->drawText(textRect, message);
-#endif
}
//! [6]
QMainWindow mainWindow;
mainWindow.setCentralWidget(widget);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
- mainWindow.menuBar()->addAction("Shuffle", widget, SLOT(shuffle()));
- mainWindow.menuBar()->addAction("Zoom In", widget, SLOT(zoomIn()));
- mainWindow.menuBar()->addAction("Zoom Out", widget, SLOT(zoomOut()));
- mainWindow.showMaximized();
-#else
mainWindow.show();
-#endif
return app.exec();
}
//! [8]
QRectF Node::boundingRect() const
{
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
- // Add some extra space around the circle for easier touching with finger
- qreal adjust = 30;
- return QRectF( -10 - adjust, -10 - adjust,
- 20 + adjust * 2, 20 + adjust * 2);
-#else
qreal adjust = 2;
return QRectF( -10 - adjust, -10 - adjust,
23 + adjust, 23 + adjust);
-#endif
}
//! [8]
QPainterPath Node::shape() const
{
QPainterPath path;
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
- // Add some extra space around the circle for easier touching with finger
- path.addEllipse( -40, -40, 80, 80);
-#else
path.addEllipse(-10, -10, 20, 20);
-#endif
return path;
}
//! [9]
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
SOURCES += flowlayout.cpp main.cpp window.cpp
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
Window *w = new Window;
scene.addItem(w);
-#if defined(Q_OS_SYMBIAN)
- view->showMaximized();
-#else
view->resize(400, 300);
view->show();
-#endif
return app.exec();
}
embeddeddialogs \
collidingmice \
padnavigator \
- basicgraphicslayouts
-
-!symbian: SUBDIRS += \
+ basicgraphicslayouts \
diagramscene \
dragdroprobot \
flowlayout \
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
Q_INIT_RESOURCE(padnavigator);
PadNavigator navigator(QSize(3, 3));
-#if defined(Q_OS_SYMBIAN)
- navigator.showMaximized();
-#else
navigator.show();
-#endif
return app.exec();
}
//! [0]
INSTALLS += target sources
CONFIG += console
-
-symbian {
- TARGET.UID3 = 0xA000A644
- CONFIG += qt_example
-}
-maemo5: CONFIG += qt_example
-
-simulator: warning(This example might not fully work on Simulator platform)
view->setScene(scene);
view->setWindowTitle(QApplication::translate("simpleanchorlayout", "Simple Anchor Layout"));
-#if defined(Q_OS_SYMBIAN)
- view->showMaximized();
-#elif defined(Q_WS_MAEMO_5)
- view-show();
-#else
view->resize(360, 320);
view->show();
-#endif
return app.exec();
}
TARGET = simpleanchorlayout
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
QApplication app(argc, argv);
QGraphicsScene scene;
-#if defined(Q_OS_SYMBIAN)
-#else
scene.setSceneRect(0, 0, 800, 480);
-#endif
// pixmaps widgets
PixmapWidget *title = new PixmapWidget(QPixmap(":/images/title.jpg"));
// QGV setup
scene.addItem(w);
scene.setBackgroundBrush(Qt::white);
-#if defined(Q_OS_SYMBIAN)
- GraphicsView *view = new GraphicsView(&scene, w);
- view->showMaximized();
-#else
QGraphicsView *view = new QGraphicsView(&scene);
view->show();
-#endif
return app.exec();
}
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc
INSTALLS += sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
#include "client.h"
Client::Client(QWidget *parent)
-#ifdef Q_WS_MAEMO_5
- : QWidget(parent)
-#else
: QDialog(parent)
-#endif
{
hostLabel = new QLabel(tr("&Server name:"));
hostLineEdit = new QLineEdit("fortune");
#ifndef CLIENT_H
#define CLIENT_H
-#ifdef Q_WS_MAEMO_5
-#include <QWidget>
-#else
#include <QDialog>
-#endif
#include <qlocalsocket.h>
class QLocalSocket;
QT_END_NAMESPACE
-#ifdef Q_WS_MAEMO_5
-class Client : public QWidget
-#else
class Client : public QDialog
-#endif
{
Q_OBJECT
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/localfortuneclient
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
Client client;
-#if defined(Q_WS_S60)
- client.showMaximized();
-#else
client.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/localfortuneserver
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
Server server;
-#if defined(Q_WS_S60)
- server.showMaximized();
-#else
server.show();
-#endif
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
return app.exec();
}
#include <qlocalsocket.h>
Server::Server(QWidget *parent)
-#ifdef Q_WS_MAEMO_5
- : QWidget(parent)
-#else
: QDialog(parent)
-#endif
{
statusLabel = new QLabel;
statusLabel->setWordWrap(true);
#ifndef SERVER_H
#define SERVER_H
-#ifdef Q_WS_MAEMO_5
-#include <QWidget>
-#else
#include <QDialog>
-#endif
QT_BEGIN_NAMESPACE
class QLabel;
class QLocalServer;
QT_END_NAMESPACE
-#ifdef Q_WS_MAEMO_5
-class Server : public QWidget
-#else
class Server : public QDialog
-#endif
{
Q_OBJECT
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/sharedmemory
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
-maemo5: warning(This example does not work on Maemo platform)
simulator: warning(This example does not work on Simulator platform)
sources.files = $$SOURCES $$HEADERS $$RESOURCES addressbook.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/addressbook
INSTALLS += target sources
-
-symbian {
- TARGET.UID3 = 0xA000A646
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
MainWindow mw;
-#if defined(Q_OS_SYMBIAN)
- mw.showMaximized();
-#else
mw.show();
-#endif
return app.exec();
}
//! [0]
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/basicsortfiltermodel
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
Window window;
window.setSourceModel(createMailModel(&window));
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
connect(sortCaseSensitivityCheckBox, SIGNAL(toggled(bool)),
this, SLOT(sortChanged()));
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- sourceWidget = new QWidget;
- filterWidget = new QWidget;
- proxyWidget = new QWidget;
-
- QHBoxLayout *sourceLayout = new QHBoxLayout;
- sourceLayout->addWidget(sourceView);
- sourceWidget->setLayout(sourceLayout);
-
- QGridLayout *filterLayout = new QGridLayout;
- filterLayout->addWidget(filterPatternLabel, 1, 0);
- filterLayout->addWidget(filterPatternLineEdit, 1, 1, 1, 2);
- filterLayout->addWidget(filterSyntaxLabel, 2, 0);
- filterLayout->addWidget(filterSyntaxComboBox, 2, 1, 1, 2);
- filterLayout->addWidget(filterColumnLabel, 3, 0);
- filterLayout->addWidget(filterColumnComboBox, 3, 1, 1, 2);
- filterLayout->addWidget(filterCaseSensitivityCheckBox, 4, 0, 1, 2);
- filterLayout->addWidget(sortCaseSensitivityCheckBox, 4, 2);
- filterWidget->setLayout(filterLayout);
-
- QHBoxLayout *proxyLayout = new QHBoxLayout;
- proxyLayout->addWidget(proxyView);
- proxyWidget->setLayout(proxyLayout);
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
-
- QTabWidget *tabWidget = new QTabWidget;
- tabWidget->addTab(sourceWidget, "Source");
- tabWidget->addTab(filterWidget, "Filters");
- tabWidget->addTab(proxyWidget, "Proxy");
- mainLayout->addWidget(tabWidget);
-#else
sourceGroupBox = new QGroupBox(tr("Original Model"));
proxyGroupBox = new QGroupBox(tr("Sorted/Filtered Model"));
mainLayout->addWidget(sourceGroupBox);
mainLayout->addWidget(proxyGroupBox);
-#endif
setLayout(mainLayout);
private:
QSortFilterProxyModel *proxyModel;
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- QWidget *sourceWidget;
- QWidget *filterWidget;
- QWidget *proxyWidget;
-#else
QGroupBox *sourceGroupBox;
QGroupBox *proxyGroupBox;
-#endif
QTreeView *sourceView;
QTreeView *proxyView;
QCheckBox *filterCaseSensitivityCheckBox;
SOURCES = main.cpp \
mainwindow.cpp \
pieview.cpp
-unix:!mac:!symbian:!vxworks:!integrity:LIBS+= -lm
+unix:!mac:!vxworks:!integrity:LIBS+= -lm
TARGET.EPOCHEAPSIZE = 0x200000 0x800000
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/chart
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A647
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
MainWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/coloreditorfactory
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
QApplication app(argv, args);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/customsortfiltermodel
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
Window window;
window.setSourceModel(createMailModel(&window));
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
//! [0]
QHBoxLayout *sourceLayout = new QHBoxLayout;
//! [2]
sourceLayout->addWidget(sourceView);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- sourceWidget = new QWidget;
- sourceWidget->setLayout(sourceLayout);
-#else
sourceGroupBox = new QGroupBox(tr("Original Model"));
sourceGroupBox->setLayout(sourceLayout);
-#endif
//! [2]
//! [3]
proxyView->setSortingEnabled(true);
proxyView->sortByColumn(1, Qt::AscendingOrder);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- QGridLayout *filterLayout = new QGridLayout;
- filterLayout->addWidget(filterPatternLabel, 0, 0);
- filterLayout->addWidget(filterPatternLineEdit, 0, 1);
- filterLayout->addWidget(filterSyntaxComboBox, 0, 2);
- filterLayout->addWidget(filterCaseSensitivityCheckBox, 1, 0, 1, 3);
- filterLayout->addWidget(fromLabel, 2, 0);
- filterLayout->addWidget(fromDateEdit, 2, 1, 1, 2);
- filterLayout->addWidget(toLabel, 3, 0);
- filterLayout->addWidget(toDateEdit, 3, 1, 1, 2);
-
- filterWidget = new QWidget;
- filterWidget->setLayout(filterLayout);
-
- QHBoxLayout *proxyLayout = new QHBoxLayout;
- proxyLayout->addWidget(proxyView);
-
- proxyWidget = new QWidget;
- proxyWidget->setLayout(proxyLayout);
-#else
QGridLayout *proxyLayout = new QGridLayout;
proxyLayout->addWidget(proxyView, 0, 0, 1, 3);
proxyLayout->addWidget(filterPatternLabel, 1, 0);
proxyGroupBox = new QGroupBox(tr("Sorted/Filtered Model"));
proxyGroupBox->setLayout(proxyLayout);
-#endif
//! [5]
//! [6]
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- QTabWidget *tabWidget = new QTabWidget;
- tabWidget->addTab(sourceWidget, "Original");
- tabWidget->addTab(filterWidget, "Filters");
- tabWidget->addTab(proxyWidget, "Sorted");
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(tabWidget);
- setLayout(mainLayout);
- setWindowTitle(tr("Custom Model"));
-#else
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(sourceGroupBox);
mainLayout->addWidget(proxyGroupBox);
setWindowTitle(tr("Custom Sort/Filter Model"));
resize(500, 450);
-#endif
}
//! [6]
private:
MySortFilterProxyModel *proxyModel;
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5 ) || defined(Q_WS_SIMULATOR)
- QWidget *sourceWidget;
- QWidget *filterWidget;
- QWidget *proxyWidget;
-#else
QGroupBox *sourceGroupBox;
QGroupBox *proxyGroupBox;
-#endif
QTreeView *sourceView;
QTreeView *proxyView;
QCheckBox *filterCaseSensitivityCheckBox;
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/dirview
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
tree.setSortingEnabled(true);
tree.setWindowTitle(QObject::tr("Dir View"));
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
- tree.showMaximized();
-#else
tree.resize(640, 480);
tree.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/editabletreemodel
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
MainWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
{
setupUi(this);
-#ifdef Q_WS_MAEMO_5
- // Alternating row colors look bad on Maemo
- view->setAlternatingRowColors(false);
-#endif
QStringList headers;
headers << tr("Title") << tr("Description");
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
FreezeTableWidget *tableView = new FreezeTableWidget(model);
tableView->setWindowTitle(QObject::tr("Frozen Column Example"));
-#if defined(Q_OS_SYMBIAN)
- tableView->showMaximized();
-#elif defined(Q_WS_MAEMO_5)
- tableView->show();
-#else
tableView->resize(560,680);
tableView->show();
-#endif
return app.exec();
}
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews
INSTALLS += sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
MainWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
window.openImage(":/images/qt.png");
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/pixelator
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets printsupport
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
MainWindow window;
window.openImage(":/images/example.jpg");
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
QFrame *frame = new QFrame;
QHBoxLayout *frameLayout = new QHBoxLayout(frame);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
- puzzleWidget = new PuzzleWidget(260);
-#else
puzzleWidget = new PuzzleWidget(400);
-#endif
piecesList = new QListView;
piecesList->setDragEnabled(true);
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/puzzle
INSTALLS += target sources
-symbian: CONFIG += qt_example
wince* {
DEPLOYMENT_PLUGIN += qjpeg qgif qtiff
}
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
MainWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#elif defined(Q_WS_MAEMO_5)
- window.show();
-#else
window.resize(640, 480);
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/simpledommodel
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
QTreeView view;
view.setModel(&model);
view.setWindowTitle(QObject::tr("Simple Tree Model"));
-#if defined(Q_OS_SYMBIAN)
- view.showMaximized();
-#else
view.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/simpletreemodel
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/simplewidgetmapper
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
//! [3]
tableView.setWindowTitle(QObject::tr("Spin Box Delegate"));
-#if defined(Q_OS_SYMBIAN)
- tableView.showMaximized();
-#else
tableView.show();
-#endif
return app.exec();
}
//! [3]
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/spinboxdelegate
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/spreadsheet
INSTALLS += target sources
-symbian: CONFIG += qt_example
tableWidget.resizeColumnsToContents();
tableWidget.resize(500, 300);
-#if defined(Q_OS_SYMBIAN)
- tableWidget.showMaximized();
-#else
tableWidget.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/stardelegate
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
QT += widgets
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/hellotr
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/basiclayouts
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
Dialog dialog;
-#if defined(Q_OS_SYMBIAN)
- dialog.showMaximized();
-#else
dialog.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/borderlayout
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
#include "dialog.h"
Dialog::Dialog(QWidget *parent)
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- : QWidget(parent)
-#else
: QDialog(parent)
-#endif
{
createRotableGroupBox();
createOptionsGroupBox();
class QPushButton;
QT_END_NAMESPACE
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
-class Dialog : public QWidget
-#else
class Dialog : public QDialog
-#endif
{
Q_OBJECT
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/dynamiclayouts
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
Dialog dialog;
-#if defined(Q_OS_SYMBIAN)
- dialog.showMaximized();
-#else
dialog.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/flowlayout
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts
INSTALLS += sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/arrowpad
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/hellotr
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist
INSTALLS += sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/trollprint
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/application
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
simulator: warning(This example might not fully work on Simulator platform)
app.setOrganizationName("Trolltech");
app.setApplicationName("Application Example");
MainWindow mainWin;
-#if defined(Q_OS_SYMBIAN)
- mainWin.showMaximized();
-#else
mainWin.show();
-#endif
return app.exec();
}
//! [0]
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/dockwidgets
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets printsupport
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
"<p>Each dock widget contains a colored frame and a context "
"(right-click) menu.</p>"
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
"<p>On Mac OS X, the \"Black\" dock widget has been created as a "
"<em>Drawer</em>, which is a special kind of QDockWidget.</p>"
#endif
uint flags;
Qt::DockWidgetArea area;
} sets [] = {
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
{ "Black", 0, Qt::LeftDockWidgetArea },
#else
{ "Black", Qt::Drawer, Qt::LeftDockWidgetArea },
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
MainWindow mainWin;
-#if defined(Q_OS_SYMBIAN)
- mainWin.showMaximized();
-#else
mainWin.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/mdi
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
MainWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
QWidget *topFiller = new QWidget;
topFiller->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-#ifdef Q_OS_SYMBIAN
- infoLabel = new QLabel(tr("<i>Choose a menu option</i>"));
-#else
infoLabel = new QLabel(tr("<i>Choose a menu option, or right-click to "
"invoke a context menu</i>"));
-#endif
infoLabel->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
infoLabel->setAlignment(Qt::AlignCenter);
createActions();
createMenus();
-#ifndef Q_OS_SYMBIAN
QString message = tr("A context menu is available by right-clicking");
statusBar()->showMessage(message);
-#endif
setWindowTitle(tr("Menus"));
setMinimumSize(160, 160);
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/menus
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000CF66
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-
-simulator: warning(This example might not fully work on Simulator platform)
app.setOrganizationName("Trolltech");
app.setApplicationName("Recent Files Example");
MainWindow *mainWin = new MainWindow;
-#if defined(Q_OS_SYMBIAN)
- mainWin->showMaximized();
-#else
mainWin->show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/recentfiles
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
app.setApplicationName("SDI Example");
app.setOrganizationName("Trolltech");
MainWindow *mainWin = new MainWindow;
-#if defined(Q_OS_SYMBIAN)
- mainWin->showMaximized();
-#else
mainWin->show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/sdi
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
simulator: warning(This example might not fully work on Simulator platform)
delete tabWidget->currentWidget();
sessionGroup->hide();
#endif
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(MAEMO_UI) || defined(Q_WS_SIMULATOR)
- setWindowState(Qt::WindowMaximized);
-#endif
updateConfigurations();
onlineStateChanged(!manager.allConfigurations(QNetworkConfiguration::Active).isEmpty());
QNetworkConfiguration defaultConfiguration = manager.defaultConfiguration();
#include <qnetworkconfigmanager.h>
#include <qnetworksession.h>
-#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(Q_WS_SIMULATOR)
-#include "ui_bearermonitor_240_320.h"
-#elif defined(MAEMO_UI)
-#include "ui_bearermonitor_maemo.h"
-#else
#include "ui_bearermonitor_640_480.h"
-#endif
QT_USE_NAMESPACE
void onlineStateChanged(bool isOnline);
-#if defined(Q_OS_WIN) || defined(Q_WS_SIMULATOR)
+#if defined(Q_OS_WIN)
void registerNetwork();
void unregisterNetwork();
#endif
void createSessionFor(QTreeWidgetItem *item);
void createNewSession();
-#ifndef MAEMO_UI
void deleteSession();
-#endif
void performScan();
private:
CONFIG += console
-symbian: {
- TARGET.CAPABILITY = NetworkServices ReadUserData
- CONFIG += qt_example
-}
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
portLineEdit = new QLineEdit;
portLineEdit->setValidator(new QIntValidator(1, 65535, this));
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- Qt::InputMethodHint hints = Qt::ImhDigitsOnly;
- portLineEdit->setInputMethodHints(hints);
-#endif
hostLabel->setBuddy(hostLineEdit);
portLabel->setBuddy(portLineEdit);
"Fortune Server example as well."));
statusLabel->setWordWrap(true);
-#ifdef Q_OS_SYMBIAN
- QMenu *menu = new QMenu(this);
- fortuneAction = menu->addAction(tr("Get Fortune"));
- fortuneAction->setVisible(false);
-
- QAction *optionsAction = new QAction(tr("Options"), this);
- optionsAction->setMenu(menu);
- optionsAction->setSoftKeyRole(QAction::PositiveSoftKey);
- addAction(optionsAction);
-
- exitAction = new QAction(tr("Exit"), this);
- exitAction->setSoftKeyRole(QAction::NegativeSoftKey);
- addAction(exitAction);
-
- connect(fortuneAction, SIGNAL(triggered()), this, SLOT(requestNewFortune()));
- connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
-#else
getFortuneButton = new QPushButton(tr("Get Fortune"));
getFortuneButton->setDefault(true);
getFortuneButton->setEnabled(false);
connect(getFortuneButton, SIGNAL(clicked()), this, SLOT(requestNewFortune()));
connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
-#endif
connect(hostLineEdit, SIGNAL(textChanged(QString)),
this, SLOT(enableGetFortuneButton()));
mainLayout->addWidget(portLabel, 1, 0);
mainLayout->addWidget(portLineEdit, 1, 1);
mainLayout->addWidget(statusLabel, 2, 0, 1, 2);
-#ifndef Q_OS_SYMBIAN
mainLayout->addWidget(buttonBox, 3, 0, 1, 2);
-#endif
setLayout(mainLayout);
setWindowTitle(tr("Blocking Fortune Client"));
//! [2]
void BlockingClient::requestNewFortune()
{
-#ifdef Q_OS_SYMBIAN
- fortuneAction->setVisible(false);
-#else
getFortuneButton->setEnabled(false);
-#endif
thread.requestNewFortune(hostLineEdit->text(),
portLineEdit->text().toInt());
}
//! [4]
currentFortune = nextFortune;
statusLabel->setText(currentFortune);
-#ifdef Q_OS_SYMBIAN
- fortuneAction->setVisible(true);
-#else
getFortuneButton->setEnabled(true);
-#endif
}
//! [4]
.arg(message));
}
-#ifdef Q_OS_SYMBIAN
- fortuneAction->setVisible(true);
-#else
getFortuneButton->setEnabled(true);
-#endif
}
void BlockingClient::enableGetFortuneButton()
{
bool enable(!hostLineEdit->text().isEmpty() && !portLineEdit->text().isEmpty());
-#ifdef Q_OS_SYMBIAN
- fortuneAction->setVisible(enable);
-#else
getFortuneButton->setEnabled(enable);
-#endif
}
QLineEdit *hostLineEdit;
QLineEdit *portLineEdit;
QLabel *statusLabel;
-#ifdef Q_OS_SYMBIAN
- QAction *fortuneAction;
- QAction *exitAction;
-#else
QPushButton *getFortuneButton;
QPushButton *quitButton;
QDialogButtonBox *buttonBox;
-#endif
FortuneThread thread;
QString currentFortune;
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/blockingfortuneclient
INSTALLS += target sources
-symbian: {
- CONFIG += qt_example
- TARGET.CAPABILITY = NetworkServices
-}
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
{
QApplication app(argc, argv);
BlockingClient client;
-#ifdef Q_OS_SYMBIAN
- client.showMaximized();
-#else
client.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/broadcastreceiver
INSTALLS += target sources
-symbian: {
- CONFIG += qt_example
- TARGET.CAPABILITY = NetworkServices
-}
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Receiver receiver;
-#ifdef Q_OS_SYMBIAN
- receiver.showMaximized();
-#else
receiver.show();
-#endif
return app.exec();
}
statusLabel = new QLabel(tr("Listening for broadcasted messages"));
statusLabel->setWordWrap(true);
-#ifdef Q_OS_SYMBIAN
- quitAction = new QAction(tr("Exit"), this);
- quitAction->setSoftKeyRole(QAction::NegativeSoftKey);
- addAction(quitAction);
-#else
quitButton = new QPushButton(tr("&Quit"));
-#endif
//! [0]
udpSocket = new QUdpSocket(this);
connect(udpSocket, SIGNAL(readyRead()),
this, SLOT(processPendingDatagrams()));
//! [1]
-#ifdef Q_OS_SYMBIAN
- connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(statusLabel);
- setLayout(mainLayout);
-#else
connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
QHBoxLayout *buttonLayout = new QHBoxLayout;
mainLayout->addWidget(statusLabel);
mainLayout->addLayout(buttonLayout);
setLayout(mainLayout);
-#endif
setWindowTitle(tr("Broadcast Receiver"));
}
private:
QLabel *statusLabel;
-#ifdef Q_OS_SYMBIAN
- QAction *quitAction;
-#else
QPushButton *quitButton;
-#endif
QUdpSocket *udpSocket;
};
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS broadcastsender.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/broadcastsender
INSTALLS += target sources
-
-symbian: {
- CONFIG += qt_example
- TARGET.CAPABILITY = NetworkServices
-}
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Sender sender;
-#ifdef Q_OS_SYMBIAN
- sender.showMaximized();
-#else
sender.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/download
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/downloadmanager
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
OTHER_FILES += \
debian/changelog \
debian/copyright \
debian/README \
debian/rules
-symbian: warning(This example might not fully work on Symbian platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fortuneclient.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/fortuneclient
INSTALLS += target sources
-
-symbian {
- CONFIG += qt_example
- TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData"
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
-}
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
Client client;
-#ifdef Q_OS_SYMBIAN
- // Make application better looking and more usable on small screen
- client.showMaximized();
-#else
client.show();
-#endif
return client.exec();
}
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fortuneserver.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/fortuneserver
INSTALLS += target sources
-
-symbian {
- TARGET.UID3 = 0xA000E406
- CONFIG += qt_example
- TARGET.CAPABILITY = "NetworkServices ReadUserData"
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
-}
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
Server server;
-#ifdef Q_OS_SYMBIAN
- server.showMaximized();
-#else
server.show();
-#endif
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
return server.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/googlesuggest
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS http.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/http
INSTALLS += target sources
-
-symbian: {
- CONFIG += qt_example
- TARGET.CAPABILITY = NetworkServices
-}
-maemo5: CONFIG += qt_example
#include "ui_authenticationdialog.h"
HttpWindow::HttpWindow(QWidget *parent)
-#ifdef Q_WS_MAEMO_5
- : QWidget(parent)
-#else
: QDialog(parent)
-#endif
{
#ifndef QT_NO_OPENSSL
urlLineEdit = new QLineEdit("https://qt.nokia.com/");
buttonBox->addButton(downloadButton, QDialogButtonBox::ActionRole);
buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
-#ifndef Q_WS_MAEMO_5
progressDialog = new QProgressDialog(this);
-#endif
connect(urlLineEdit, SIGNAL(textChanged(QString)),
this, SLOT(enableDownloadButton()));
connect(&qnam, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
this, SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
#endif
-#ifndef Q_WS_MAEMO_5
connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload()));
-#endif
connect(downloadButton, SIGNAL(clicked()), this, SLOT(downloadFile()));
connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
return;
}
-#ifndef Q_WS_MAEMO_5
progressDialog->setWindowTitle(tr("HTTP"));
progressDialog->setLabelText(tr("Downloading %1.").arg(fileName));
-#endif
downloadButton->setEnabled(false);
// schedule the request
file = 0;
}
reply->deleteLater();
-#ifndef Q_WS_MAEMO_5
progressDialog->hide();
-#endif
return;
}
-#ifndef Q_WS_MAEMO_5
progressDialog->hide();
-#endif
file->flush();
file->close();
if (httpRequestAborted)
return;
-#ifndef Q_WS_MAEMO_5
progressDialog->setMaximum(totalBytes);
progressDialog->setValue(bytesRead);
-#else
- Q_UNUSED(bytesRead);
- Q_UNUSED(totalBytes);
-#endif
}
void HttpWindow::enableDownloadButton()
#ifndef HTTPWINDOW_H
#define HTTPWINDOW_H
-#ifdef Q_WS_MAEMO_5
-#include <QWidget>
-#else
#include <QDialog>
-#endif
#include <QNetworkAccessManager>
#include <QUrl>
QT_END_NAMESPACE
-#ifdef Q_WS_MAEMO_5
-class HttpWindow : public QWidget
-#else
class HttpWindow : public QDialog
-#endif
{
Q_OBJECT
QLabel *statusLabel;
QLabel *urlLabel;
QLineEdit *urlLineEdit;
-#ifndef Q_WS_MAEMO_5
QProgressDialog *progressDialog;
-#endif
QPushButton *downloadButton;
QPushButton *quitButton;
QDialogButtonBox *buttonBox;
{
QApplication app(argc, argv);
-#if defined(Q_OS_SYMBIAN)
- // Change current directory from default private to c:\data
- // in order that user can access the downloaded content
- QDir::setCurrent("c:\\data");
-#elif defined(Q_WS_MAEMO_5)
- QDir::setCurrent("/home/user");
-#endif
HttpWindow httpWin;
-#if defined(Q_OS_SYMBIAN)
- httpWin.showMaximized();
-#else
httpWin.show();
-#endif
return app.exec();
}
#include "dialog.h"
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
static const int TotalBytes = 50 * 1024 * 1024;
-#else
-static const int TotalBytes = 5 * 1024 * 1024;
-#endif
static const int PayloadSize = 64 * 1024; // 64 KB
Dialog::Dialog(QWidget *parent)
serverProgressBar = new QProgressBar;
serverStatusLabel = new QLabel(tr("Server ready"));
-#ifdef Q_OS_SYMBIAN
- QMenu *menu = new QMenu(this);
-
- QAction *optionsAction = new QAction(tr("Options"), this);
- optionsAction->setSoftKeyRole(QAction::PositiveSoftKey);
- optionsAction->setMenu(menu);
- addAction(optionsAction);
-
- startAction = menu->addAction(tr("Start"), this, SLOT(start()));
-
- quitAction = new QAction(tr("Exit"), this);
- quitAction->setSoftKeyRole(QAction::NegativeSoftKey);
- addAction(quitAction);
-
- connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
-#else
startButton = new QPushButton(tr("&Start"));
quitButton = new QPushButton(tr("&Quit"));
connect(startButton, SIGNAL(clicked()), this, SLOT(start()));
connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
-#endif
connect(&tcpServer, SIGNAL(newConnection()),
this, SLOT(acceptConnection()));
connect(&tcpClient, SIGNAL(connected()), this, SLOT(startTransfer()));
mainLayout->addWidget(serverStatusLabel);
mainLayout->addStretch(1);
mainLayout->addSpacing(10);
-#ifndef Q_OS_SYMBIAN
mainLayout->addWidget(buttonBox);
-#endif
setLayout(mainLayout);
setWindowTitle(tr("Loopback"));
void Dialog::start()
{
-#ifdef Q_OS_SYMBIAN
- startAction->setVisible(false);
-#else
startButton->setEnabled(false);
-#endif
#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(Qt::WaitCursor);
if (bytesReceived == TotalBytes) {
tcpServerConnection->close();
-#ifdef Q_OS_SYMBIAN
- startAction->setVisible(true);
-#else
startButton->setEnabled(true);
-#endif
#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
#endif
serverProgressBar->reset();
clientStatusLabel->setText(tr("Client ready"));
serverStatusLabel->setText(tr("Server ready"));
-#ifdef Q_OS_SYMBIAN
- startAction->setVisible(true);
-#else
startButton->setEnabled(true);
-#endif
#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
#endif
QLabel *clientStatusLabel;
QLabel *serverStatusLabel;
-#ifdef Q_OS_SYMBIAN
- QAction *startAction;
- QAction *quitAction;
-#else
QPushButton *startButton;
QPushButton *quitButton;
QDialogButtonBox *buttonBox;
-#endif
QTcpServer tcpServer;
QTcpSocket tcpClient;
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS loopback.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/loopback
INSTALLS += target sources
-
-symbian: {
- CONFIG += qt_example
- TARGET.CAPABILITY = NetworkServices
-}
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Dialog dialog;
-#ifdef Q_OS_SYMBIAN
- dialog.showMaximized();
-#else
dialog.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/multicastreceiver
INSTALLS += target sources
-symbian: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/multicastsender
INSTALLS += target sources
-symbian: CONFIG += qt_example
}
ChatDialog dialog;
-#ifdef Q_OS_SYMBIAN
- // Make application better looking and more usable on small screen
- dialog.showMaximized();
-#else
dialog.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/network-chat
INSTALLS += target sources
-symbian {
- CONFIG += qt_example
- LIBS += -lcharconv
- TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData"
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
-}
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
}
if (username.isEmpty())
-#ifndef Q_OS_SYMBIAN
username = "unknown";
-#else
- username = "QtS60";
-#endif
updateAddresses();
serverPort = 0;
contains(QT_CONFIG, openssl-linked):SUBDIRS += securesocketclient
}
-symbian: SUBDIRS = qftp
# install
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS network.pro README
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network
INSTALLS += sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
ftpServerLabel->setBuddy(ftpServerLineEdit);
statusLabel = new QLabel(tr("Please enter the name of an FTP server."));
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- // Use word wrapping to fit the text on screen
- statusLabel->setWordWrap( true );
-#endif
fileList = new QTreeWidget;
fileList->setEnabled(false);
QHBoxLayout *topLayout = new QHBoxLayout;
topLayout->addWidget(ftpServerLabel);
topLayout->addWidget(ftpServerLineEdit);
-#ifndef Q_OS_SYMBIAN
topLayout->addWidget(cdToParentButton);
topLayout->addWidget(connectButton);
-#else
- // Make app better lookin on small screen
- QHBoxLayout *topLayout2 = new QHBoxLayout;
- topLayout2->addWidget(cdToParentButton);
- topLayout2->addWidget(connectButton);
-#endif
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addLayout(topLayout);
-#ifdef Q_OS_SYMBIAN
- // Make app better lookin on small screen
- mainLayout->addLayout(topLayout2);
-#endif
mainLayout->addWidget(fileList);
mainLayout->addWidget(statusLabel);
mainLayout->addWidget(buttonBox);
#include <QApplication>
#include "ftpwindow.h"
-#ifdef Q_OS_SYMBIAN
-#include <QDir>
-#include <QDesktopWidget>
-#endif
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(ftp);
-#ifdef Q_OS_SYMBIAN
- // Change current directory from default private to c:\data
- // in order that user can access the downloaded content
- QDir::setCurrent( "c:\\data" );
-#endif
QApplication app(argc, argv);
FtpWindow ftpWin;
-#ifdef Q_OS_SYMBIAN
- // Make application better looking and more usable on small screen
- ftpWin.showMaximized();
-#else
ftpWin.show();
-#endif
return ftpWin.exec();
}
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro images
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/qftp
INSTALLS += target sources
-
-symbian {
- TARGET.UID3 = 0xA000A648
- CONFIG += qt_example
- INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
- TARGET.CAPABILITY="NetworkServices ReadUserData WriteUserData"
-}
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
}
SslClient client;
-#ifdef Q_OS_SYMBIAN
- client.showMaximized();
-#else
client.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/securesocketclient
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000CF67
- CONFIG += qt_example
- TARGET.CAPABILITY = NetworkServices
-}
-maemo5: CONFIG += qt_example
-
ui.sslErrorList->addItem(error.errorString());
executingDialog = true;
-#ifdef Q_OS_SYMBIAN
- errorDialog.showMaximized();
-#endif
if (errorDialog.exec() == QDialog::Accepted)
socket->ignoreSslErrors();
executingDialog = false;
{
CertificateInfo *info = new CertificateInfo(this);
info->setCertificateChain(socket->peerCertificateChain());
-#ifdef Q_OS_SYMBIAN
- info->showMaximized();
-#endif
info->exec();
info->deleteLater();
}
{
statusLabel = new QLabel;
statusLabel->setWordWrap(true);
-#ifdef Q_OS_SYMBIAN
- QAction *quitAction = new QAction(tr("Exit"), this);
- quitAction->setSoftKeyRole(QAction::NegativeSoftKey);
- addAction(quitAction);
-#else
quitButton = new QPushButton(tr("Quit"));
quitButton->setAutoDefault(false);
-#endif
if (!server.listen()) {
QMessageBox::critical(this, tr("Threaded Fortune Server"),
"Run the Fortune Client example now.")
.arg(ipAddress).arg(server.serverPort()));
-#ifdef Q_OS_SYMBIAN
- connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(statusLabel);
- setLayout(mainLayout);
-#else
connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
QHBoxLayout *buttonLayout = new QHBoxLayout;
mainLayout->addWidget(statusLabel);
mainLayout->addLayout(buttonLayout);
setLayout(mainLayout);
-#endif
setWindowTitle(tr("Threaded Fortune Server"));
}
{
QApplication app(argc, argv);
Dialog dialog;
-#ifdef Q_OS_SYMBIAN
- dialog.showMaximized();
-#else
dialog.show();
-#endif
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/threadedfortuneserver
INSTALLS += target sources
-symbian: {
- CONFIG += qt_example
- TARGET.CAPABILITY = NetworkServices
-}
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/torrent
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/2dpainting
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
simulator: warning(This example might not fully work on Simulator platform)
message(OpenGL support is not available.)
}
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/framebufferobject2
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example does not work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/grabber
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example does not work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example does not work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
setAttribute(Qt::WA_NoSystemBackground);
setAutoBufferSwap(false);
m_showBubbles = true;
-#ifndef Q_WS_QWS
setMinimumSize(300, 250);
-#endif
}
GLWidget::~GLWidget()
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es2
INSTALLS += target sources
-symbian: CONFIG += qt_example
maemo5 {
# Debian package name may not contain numbers or special characters
CONFIG += qt_example
}
-symbian: warning(This example might not fully work on Symbian platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
INSTALLS += target \
sources
-symbian:CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example does not work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target \
sources
-symbian:CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example does not work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/pbuffers2
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example does not work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/samplebuffers
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example does not work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/textures
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/affine
INSTALLS += target sources
-symbian {
- CONFIG += qt_example
-}
-
-maemo5: CONFIG += qt_example
-
wince*: {
DEPLOYMENT_PLUGIN += qjpeg
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/basicdrawing
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A649
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-
-simulator: warning(This example might not fully work on Simulator platform)
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
//! [2]
penWidthSpinBox = new QSpinBox;
penWidthSpinBox->setRange(0, 20);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- penWidthSpinBox->setSpecialValueText(tr("0"));
-#else
penWidthSpinBox->setSpecialValueText(tr("0 (cosmetic pen)"));
-#endif
penWidthLabel = new QLabel(tr("Pen &Width:"));
penWidthLabel->setBuddy(penWidthSpinBox);
//! [9]
QGridLayout *mainLayout = new QGridLayout;
//! [9] //! [10]
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- mainLayout->setSizeConstraint(QLayout::SetNoConstraint);
-#endif
mainLayout->setColumnStretch(0, 1);
mainLayout->setColumnStretch(3, 1);
mainLayout->addWidget(renderArea, 0, 0, 1, 4);
{
m_animation_enabled = true;
m_animationTimer = startTimer(animationInterval);
-#ifdef Q_WS_QWS
- m_image = QPixmap(":res/composition/flower.jpg");
- m_image.setAlphaChannel(QPixmap(":res/composition/flower_alpha.jpg"));
-#else
m_image = QImage(":res/composition/flower.jpg");
m_image.setAlphaChannel(QImage(":res/composition/flower_alpha.jpg"));
-#endif
m_circle_alpha = 127;
m_circle_hue = 255;
m_current_object = NoObject;
p.setPen(Qt::NoPen);
p.setRenderHint(QPainter::SmoothPixmapTransform);
-#ifdef Q_WS_QWS
- p.drawPixmap(rect(), m_image);
-#else
p.drawImage(rect(), m_image);
-#endif
}
void CompositionRenderer::drawSource(QPainter &p)
{
// using a QImage
if (m_buffer.size() != size()) {
-#ifdef Q_WS_QWS
- m_base_buffer = QPixmap(size());
- m_base_buffer.fill(Qt::transparent);
-#else
m_buffer = QImage(size(), QImage::Format_ARGB32_Premultiplied);
m_base_buffer = QImage(size(), QImage::Format_ARGB32_Premultiplied);
m_base_buffer.fill(0);
-#endif
QPainter p(&m_base_buffer);
drawBase(p);
}
-#ifdef Q_WS_QWS
- m_buffer = m_base_buffer;
-#else
memcpy(m_buffer.bits(), m_base_buffer.bits(), m_buffer.byteCount());
-#endif
{
QPainter p(&m_buffer);
drawSource(p);
}
-#ifdef Q_WS_QWS
- painter->drawPixmap(0, 0, m_buffer);
-#else
painter->drawImage(0, 0, m_buffer);
-#endif
}
}
QPainter::CompositionMode m_composition_mode;
-#ifdef Q_WS_QWS
- QPixmap m_image;
- QPixmap m_buffer;
- QPixmap m_base_buffer;
-#else
QImage m_image;
QImage m_buffer;
QImage m_base_buffer;
-#endif
int m_circle_alpha;
int m_circle_hue;
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/composition
INSTALLS += target sources
-symbian: CONFIG += qt_example
win32-msvc* {
QMAKE_CXXFLAGS += /Zm500
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/concentriccircles
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A64A
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/deform
INSTALLS += target sources
-
-symbian {
- TARGET.UID3 = 0xA000A63D
- CONFIG += qt_example
-}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/fontsampler
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets printsupport
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
MainWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
{
setupUi(this);
-#if defined(Q_OS_SYMBIAN)
- addDockWidget(Qt::BottomDockWidgetArea, dockWidget);
-#endif
sampleSizes << 32 << 24 << 16 << 14 << 12 << 8 << 4 << 2 << 1;
markedCount = 0;
QString oldText = textEdit->toPlainText().trimmed();
bool modified = textEdit->document()->isModified();
textEdit->clear();
-#if defined(Q_OS_SYMBIAN)
- textEdit->document()->setDefaultFont(QFont(family, 10, weight, italic));
-#else
textEdit->document()->setDefaultFont(QFont(family, 32, weight, italic));
-#endif
QTextCursor cursor = textEdit->textCursor();
QTextBlockFormat blockFormat;
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/gradients
INSTALLS += target sources
-symbian: CONFIG += qt_example
#include "imagecomposer.h"
//! [0]
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
-static const QSize resultSize(50, 50);
-#else
static const QSize resultSize(200, 200);
-#endif
//! [0]
//! [1]
mainLayout->addWidget(destinationButton, 0, 2, 3, 1);
mainLayout->addWidget(equalLabel, 1, 3);
mainLayout->addWidget(resultLabel, 0, 4, 3, 1);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
-#else
mainLayout->setSizeConstraint(QLayout::SetFixedSize);
-#endif
setLayout(mainLayout);
//! [4]
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/imagecomposition
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A64B
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
ImageComposer composer;
-#if defined(Q_OS_SYMBIAN)
- composer.showMaximized();
-#else
composer.show();
-#endif
return app.exec();
}
//! [0]
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
SOURCES = main.cpp \
renderarea.cpp \
window.cpp
-unix:!mac:!symbian:!vxworks:!integrity:LIBS += -lm
+unix:!mac:!vxworks:!integrity:LIBS += -lm
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/painterpaths
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/painterpaths
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A64C
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
//! [9]
//! [10]
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
renderAreas.push_back(new RenderArea(rectPath));
renderAreas.push_back(new RenderArea(roundRectPath));
renderAreas.push_back(new RenderArea(ellipsePath));
renderAreas.push_back(new RenderArea(piePath));
renderAreas.push_back(new RenderArea(polygonPath));
renderAreas.push_back(new RenderArea(groupPath));
-#endif
renderAreas.push_back(new RenderArea(textPath));
renderAreas.push_back(new RenderArea(bezierPath));
renderAreas.push_back(new RenderArea(starPath));
//! [16] //! [17]
QGridLayout *topLayout = new QGridLayout;
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- topLayout->setSizeConstraint(QLayout::SetNoConstraint);
-#endif
int i=0;
for(QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); it++, i++)
topLayout->addWidget(*it, i / 3, i % 3);
QGridLayout *mainLayout = new QGridLayout;
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- mainLayout->setSizeConstraint(QLayout::SetNoConstraint);
-#endif
mainLayout->addLayout(topLayout, 0, 0, 1, 4);
mainLayout->addWidget(fillRuleLabel, 1, 0);
mainLayout->addWidget(fillRuleComboBox, 1, 1, 1, 3);
mainLayout->addWidget(penWidthSpinBox, 3, 1, 1, 3);
mainLayout->addWidget(penColorLabel, 4, 0);
mainLayout->addWidget(penColorComboBox, 4, 1, 1, 3);
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
mainLayout->addWidget(rotationAngleLabel, 5, 0);
mainLayout->addWidget(rotationAngleSpinBox, 5, 1, 1, 3);
-#endif
setLayout(mainLayout);
//! [17]
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
examples_affine.subdir = affine
examples_composition.subdir = composition
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/pathstroke
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A63E
- CONFIG += qt_example
-}
void ArthurFrame::paintEvent(QPaintEvent *e)
{
-#ifdef Q_WS_QWS
- static QPixmap *static_image = 0;
-#else
static QImage *static_image = 0;
-#endif
QPainter painter;
if (preferImage()
#ifdef QT_OPENGL_SUPPORT
) {
if (!static_image || static_image->size() != size()) {
delete static_image;
-#ifdef Q_WS_QWS
- static_image = new QPixmap(size());
-#else
static_image = new QImage(size(), QImage::Format_RGB32);
-#endif
}
painter.begin(static_image);
) {
painter.end();
painter.begin(this);
-#ifdef Q_WS_QWS
- painter.drawPixmap(e->rect(), *static_image, e->rect());
-#else
painter.drawImage(e->rect(), *static_image, e->rect());
-#endif
}
#ifdef QT_OPENGL_SUPPORT
hpux-acc*:LIBS += $$SHARED_FOLDER/libdemo_shared.a
hpuxi-acc*:LIBS += $$SHARED_FOLDER/libdemo_shared.a
-symbian:LIBS += -ldemo_shared.lib
-!hpuxi-acc*:!hpux-acc*:!symbian:LIBS += -ldemo_shared
+!hpuxi-acc*:!hpux-acc*:LIBS += -ldemo_shared
INSTALLS += sources
!cross_compile:INSTALLS += target
-
-symbian {
- TARGET.UID3 = 0xA000A63C
- CONFIG += qt_demo
-}
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/transformations
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A64D
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/imagescaling
INSTALLS += target sources
-symbian: CONFIG += qt_example
wince*: DEPLOYMENT_PLUGIN += qgif qjpeg qtiff
QT += widgets
-maemo5: CONFIG += qt_example
simulator: warning(This example does not work on Simulator platform)
QApplication app(argc,argv);
Images imageView;
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- imageView.showMaximized();
-#else
imageView.show();
-#endif
return app.exec();
}
QLabel *label = new QLabel(text);
label->setWordWrap(true);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- label->showMaximized();
-#else
label->show();
-#endif
qDebug() << text;
app.exec();
QLabel *label = new QLabel(text);
label->setWordWrap(true);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- label->showMaximized();
-#else
label->show();
-#endif
qDebug() << text;
app.exec();
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/map
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
simulator: warning(This example does not work on Simulator platform)
QLabel *label = new QLabel(text);
label->setWordWrap(true);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- label->showMaximized();
-#else
label->show();
-#endif
qDebug() << text;
app.exec();
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/progressdialog
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
simulator: warning(This example does not work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
QLabel *label = new QLabel(text);
label->setWordWrap(true);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- label->showMaximized();
-#else
label->show();
-#endif
qDebug() << text;
app.exec();
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/runfunction
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
simulator: warning(This example does not work on Simulator platform)
{
QApplication app(argc, argv);
qDebug() << "finding files...";
-#ifdef Q_WS_MAEMO_5
- QStringList files = findFiles("/usr/", QStringList() << "*.sh");
-#else
QStringList files = findFiles("../../", QStringList() << "*.cpp" << "*.h");
-#endif
qDebug() << files.count() << "files";
qDebug() << "warmup";
QLabel *label = new QLabel(text);
label->setWordWrap(true);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- label->showMaximized();
-#else
label->show();
-#endif
qDebug() << text;
app.exec();
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/wordcount
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
simulator: warning(This example does not work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtestlib
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtestlib/tutorial1
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C60B
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtestlib/tutorial2
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C60C
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtestlib/tutorial3
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C60D
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtestlib/tutorial4
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C60E
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
};
// Symbian devices typically have limited memory
-#ifdef Q_OS_SYMBIAN
-# define LARGE_MAX_SIZE 2000
-#else
# define LARGE_MAX_SIZE 20000
-#endif
class tst_vector_vs_std : public QObject
{
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtestlib/tutorial5
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C60F
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
dbscreen.cpp
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example does not work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example does not work on Simulator platform)
svgalibplugin.cpp
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example does not work on Simulator platform)
mainwindow.cpp
# App cannot be with name "calendar" in Symbian due to same named system component.
-symbian: TARGET = calendarapp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/calendar
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/calendar
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
MainWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- window.show();
-#else
window.resize(640, 256);
window.show();
-#endif
return app.exec();
}
this, SLOT(setFontSize(int)));
//! [3]
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
- fontSizeSpinBox->setValue(4);
-#else
fontSizeSpinBox->setValue(10);
-#endif
//! [4]
QHBoxLayout *controlsLayout = new QHBoxLayout;
nameEdit = new QLineEdit;
addressEdit = new QTextEdit;
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
- offersCheckBox = new QCheckBox(tr("Send information about\n"
- "products and special offers"));
-#else
offersCheckBox = new QCheckBox(tr("Send information about products and "
"special offers"));
-#endif
setupItemsTable();
//! [0]
//! [1]
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- QWidget *widgetSubscriber = new QWidget;
- QGridLayout *subscriberLayout = new QGridLayout;
- subscriberLayout->addWidget(nameLabel, 0, 0);
- subscriberLayout->addWidget(nameEdit, 0, 1);
- subscriberLayout->addWidget(addressLabel, 1, 0);
- subscriberLayout->addWidget(addressEdit, 1, 1);
- subscriberLayout->addWidget(offersCheckBox, 2, 0, 1, 2);
- widgetSubscriber->setLayout(subscriberLayout);
-
- QWidget *widgetOrder = new QWidget;
- QVBoxLayout *orderLayout = new QVBoxLayout;
- orderLayout->addWidget(itemsTable);
- widgetOrder->setLayout(orderLayout);
-
- QTabWidget *tabWidget = new QTabWidget;
- tabWidget->addTab(widgetSubscriber, "Subscriber");
- tabWidget->addTab(widgetOrder, "Order");
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addWidget(tabWidget);
- mainLayout->addWidget(buttonBox);
- setLayout(mainLayout);
-#else
QGridLayout *mainLayout = new QGridLayout;
mainLayout->addWidget(nameLabel, 0, 0);
mainLayout->addWidget(nameEdit, 0, 1);
mainLayout->addWidget(offersCheckBox, 2, 1, 1, 2);
mainLayout->addWidget(buttonBox, 3, 0, 1, 3);
setLayout(mainLayout);
-#endif
setWindowTitle(title);
}
{
QApplication app(argc, argv);
MainWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- windows.show();
-#else
window.resize(640, 480);
window.show();
-#endif
window.createSample();
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/orderform
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets printsupport
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
MainWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- window.show();
-#else
window.resize(640, 512);
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/syntaxhighlighter
INSTALLS += target sources
-symbian: CONFIG += qt_example
wince*: {
addFiles.files = main.cpp mainwindow.cpp
DEPLOYMENT += addFiles
}
QT += widgets
-maemo5: CONFIG += qt_example
#include <QPrintPreviewDialog>
#include <QMimeData>
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
const QString rsrcPath = ":/images/mac";
#else
const QString rsrcPath = ":/images/win";
INSTALLS += target sources
QT += widgets printsupport
-symbian: CONFIG += qt_example
QApplication a(argc, argv);
bool touch = (a.arguments().contains(QLatin1String("--touch")));
MainWindow mw(touch);
-#ifdef Q_WS_S60
- mw.showMaximized();
-#else
mw.show();
-#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
mw.raise();
#endif
return a.exec();
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/books
INSTALLS += target sources
-symbian: CONFIG += qt_example
wince*: {
CONFIG(debug, debug|release):sqlPlugins.files = $$QT_BUILD_TREE/plugins/sqldrivers/*d4.dll
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/cachedtable
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
return 1;
TableEditor editor("person");
-#if defined(Q_OS_SYMBIAN)
- editor.showMaximized();
-#else
editor.show();
-#endif
return app.exec();
}
//! [0]
sources.files = $$SOURCES *.h $$RESOURCES $$FORMS drilldown.pro *.png *.jpg images
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/drilldown
INSTALLS += target sources
-
-symbian {
- TARGET.UID3 = 0xA000C612
- CONFIG += qt_example
-}
-maemo5: CONFIG += qt_example
-
-simulator: warning(This example might not fully work on Simulator platform)
return 1;
View view("offices", "images");
-#ifndef Q_OS_SYMBIAN
view.show();
-#else
- view.showMaximized();
-#endif
#ifdef QT_KEYPAD_NAVIGATION
QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
#endif
QGraphicsPixmapItem *logo = scene->addPixmap(QPixmap(":/logo.png"));
logo->setPos(30, 515);
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
setMinimumSize(470, 620);
setMaximumSize(470, 620);
-#else
- setDragMode(QGraphicsView::ScrollHandDrag);
-#endif
setWindowTitle(tr("Offices World Wide"));
}
window->raise();
window->activateWindow();
} else if (window && !window->isVisible()) {
-#ifndef Q_OS_SYMBIAN
window->show();
-#else
- window->showMaximized();
-#endif
} else {
InformationWindow *window;
window = new InformationWindow(id, officeTable, this);
connect(window, SIGNAL(imageChanged(int,QString)),
this, SLOT(updateImage(int,QString)));
-#ifndef Q_OS_SYMBIAN
window->move(pos() + QPoint(20, 40));
window->show();
-#else
- window->showMaximized();
-#endif
informationWindows.append(window);
}
}
QFile *albumDetails = new QFile("albumdetails.xml");
MainWindow window("artists", "albums", albumDetails);
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
layout->addWidget(artists, 0, 0);
layout->addWidget(albums, 1, 0);
layout->addWidget(details, 0, 1, 2, 1);
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
layout->setColumnStretch(1, 1);
layout->setColumnMinimumWidth(0, 500);
-#endif
QWidget *widget = new QWidget;
widget->setLayout(layout);
createMenuBar();
showImageLabel();
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
resize(850, 400);
-#endif
setWindowTitle(tr("Music Archive"));
}
sources.files = $$SOURCES *.h $$RESOURCES $$FORMS masterdetail.pro *.xml images
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/masterdetail
INSTALLS += target sources
-
-symbian {
- TARGET.UID3 = 0xA000D7CF
- CONFIG += qt_example
-}
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
{
QTableView *view = new QTableView;
view->setModel(model);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- Q_UNUSED(title);
- view->resizeColumnsToContents();
-#else
static int offset = 0;
view->setWindowTitle(title);
view->move(100 + offset, 100 + offset);
offset += 20;
view->show();
-#endif
return view;
}
initializeModel(&editableModel);
initializeModel(&customModel);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- QTabWidget *tabWidget = new QTabWidget;
- tabWidget->addTab(createView(&plainModel), QObject::tr("Plain"));
- tabWidget->addTab(createView(&editableModel), QObject::tr("Editable"));
- tabWidget->addTab(createView(&customModel), QObject::tr("Custom"));
- tabWidget->showMaximized();
-#else
createView(&plainModel, QObject::tr("Plain Query Model"));
createView(&editableModel, QObject::tr("Editable Query Model"));
createView(&customModel, QObject::tr("Custom Query Model"));
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/querymodel
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
initializeModel(&model);
QTableView *view = createView(QObject::tr("Relational Table Model"), &model);
-#if defined(Q_OS_SYMBIAN)
- view->showMaximized();
-#else
view->show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/relationaltablemodel
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
TEMPLATE = subdirs
SUBDIRS = books \
- drilldown
-!symbian: SUBDIRS += cachedtable \
+ drilldown \
+ cachedtable \
relationaltablemodel \
sqlwidgetmapper
!wince*: SUBDIRS += masterdetail
-!wince*:!symbian: SUBDIRS += \
+!wince*: SUBDIRS += \
querymodel \
tablemodel
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql
INSTALLS += sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/sqlbrowser
INSTALLS += target sources
-symbian: CONFIG += qt_example
wince*: {
DEPLOYMENT_PLUGIN += qsqlite
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
wince*: DEPLOYMENT_PLUGIN += qsqlite
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
{
QTableView *view = new QTableView;
view->setModel(model);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- Q_UNUSED(title)
-#else
view->setWindowTitle(title);
-#endif
return view;
}
initializeModel(&model);
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- QTabWidget *tabWidget = new QTabWidget;
- tabWidget->addTab(createView(&model), "View 1");
- tabWidget->addTab(createView(&model), "View 2");
-
- tabWidget->showMaximized();
-#else
QTableView *view1 = createView(&model, QObject::tr("Table Model (View 1)"));
QTableView *view2 = createView(&model, QObject::tr("Table Model (View 2)"));
view1->show();
view2->move(view1->x() + view1->width() + 20, view1->y());
view2->show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/tablemodel
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
QApplication app(argc, argv);
Window window;
window.resize(300, 300);
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/factorial
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/pingpong
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
QApplication app(argv, args);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
}
}
}
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
- font.setPointSize(5);
-#else
font.setPointSize(12);
-#endif
setFont(font);
//![1]
class QTransition;
QT_END_NAMESPACE
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
-#define WIDTH 43
-#define HEIGHT 14
-#else
#define WIDTH 35
#define HEIGHT 20
-#endif
//![0]
class Window : public QWidget
: QWidget(parent)
{
QVBoxLayout *vbox = new QVBoxLayout(this);
-#ifdef Q_WS_MAEMO_5
- vbox->setContentsMargins(320, 0, 320, 0);
-#endif
m_red = new LightWidget(Qt::red);
vbox->addWidget(m_red);
m_yellow = new LightWidget(Qt::yellow);
QApplication app(argc, argv);
TrafficLight widget;
-#if defined(Q_OS_SYMBIAN)
- widget.showMaximized();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- widget.show();
-#else
widget.resize(110, 300);
widget.show();
-#endif
return app.exec();
}
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
//! [4]
//! [5]
-#if defined(Q_OS_SYMBIAN)
- button.showMaximized();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- button.show();
-#else
button.resize(100, 50);
button.show();
-#endif
return app.exec();
}
//! [5]
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
MandelbrotWidget widget;
-#if defined(Q_WS_S60)
- widget.showMaximized();
-#else
widget.show();
-#endif
return app.exec();
}
//! [0]
mandelbrotwidget.cpp \
renderthread.cpp
-unix:!mac:!symbian:!vxworks:!integrity:LIBS += -lm
+unix:!mac:!vxworks:!integrity:LIBS += -lm
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/mandelbrot
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/mandelbrot
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
#endif
resize(550, 400);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- ZoomButton *zoomIn = new ZoomButton(tr("Zoom In"), ZoomInFactor, this);
- ZoomButton *zoomOut = new ZoomButton(tr("Zoom Out"), ZoomOutFactor, this);
-
- QGridLayout *layout = new QGridLayout(this);
- layout->addWidget(zoomIn, 0, 1);
- layout->addWidget(zoomOut, 1, 1);
- layout->setColumnStretch(0, 10);
- layout->setRowStretch(2, 10);
- setLayout(layout);
-
- connect(zoomIn, SIGNAL(zoom(double)), this, SLOT(zoom(double)));
- connect(zoomOut, SIGNAL(zoom(double)), this, SLOT(zoom(double)));
-#endif
}
//! [1]
}
//! [8] //! [9]
-#if !defined(Q_WS_S60) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
QString text = tr("Use mouse wheel or the '+' and '-' keys to zoom. "
"Press and hold left mouse button to scroll.");
QFontMetrics metrics = painter.fontMetrics();
painter.setPen(Qt::white);
painter.drawText((width() - textWidth) / 2,
metrics.leading() + metrics.ascent(), text);
-#endif
}
//! [9]
#include <QWidget>
#include "renderthread.h"
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
-#include <QPushButton>
-
-class ZoomButton : public QPushButton
-{
- Q_OBJECT
-public:
- ZoomButton(const QString &text, double zoomFactor, QWidget *parent = NULL)
- : QPushButton(text, parent), m_ZoomFactor(zoomFactor)
- {
- connect(this, SIGNAL(clicked()), this, SLOT(handleClick()));
- }
-
-signals:
- void zoom(double zoomFactor);
-
-private slots:
- void handleClick()
- {
- emit zoom(m_ZoomFactor);
- }
-
-private:
- const double m_ZoomFactor;
-};
-#endif
//! [0]
class MandelbrotWidget : public QWidget
qsrand(QTime::currentTime().elapsed());
Window window;
-#if defined(Q_WS_S60)
- window.showMaximized();
-#else
window.show();
-#endif
window.loadImage(createImage(256, 256));
//! [main finish]
sources.path = $$[QT_INSTALL_EXAMPLES]/threads/mandelbrot
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
#include <stdlib.h>
//! [0]
-#ifdef Q_WS_S60
-const int DataSize = 300;
-#else
const int DataSize = 100000;
-#endif
const int BufferSize = 8192;
char buffer[BufferSize];
{
for (int i = 0; i < DataSize; ++i) {
usedBytes.acquire();
- #ifdef Q_WS_S60
- QString text(buffer[i % BufferSize]);
- freeBytes.release();
- emit stringConsumed(text);
- #else
fprintf(stderr, "%c", buffer[i % BufferSize]);
freeBytes.release();
- #endif
}
fprintf(stderr, "\n");
}
int main(int argc, char *argv[])
//! [5] //! [6]
{
-#ifdef Q_WS_S60
- // Self made console for Symbian
- QApplication app(argc, argv);
- QPlainTextEdit console;
- console.setReadOnly(true);
- console.setTextInteractionFlags(Qt::NoTextInteraction);
- console.showMaximized();
-
- Producer producer;
- Consumer consumer;
-
- QObject::connect(&consumer, SIGNAL(stringConsumed(const QString&)), &console, SLOT(insertPlainText(QString)), Qt::BlockingQueuedConnection);
-
- producer.start();
- consumer.start();
-
- app.exec();
-#else
QCoreApplication app(argc, argv);
Producer producer;
Consumer consumer;
producer.wait();
consumer.wait();
return 0;
-#endif
}
//! [6]
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/semaphores
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
#include <stdlib.h>
//! [0]
-#ifdef Q_WS_S60
-const int DataSize = 300;
-#else
const int DataSize = 100000;
-#endif
const int BufferSize = 8192;
char buffer[BufferSize];
bufferNotEmpty.wait(&mutex);
mutex.unlock();
- #ifdef Q_WS_S60
- emit stringConsumed(QString(buffer[i % BufferSize]));
- #else
fprintf(stderr, "%c", buffer[i % BufferSize]);
- #endif
mutex.lock();
--numUsedBytes;
};
//! [4]
-#ifdef Q_WS_S60
-class PlainTextEdit : public QPlainTextEdit
-{
- Q_OBJECT
-public:
- PlainTextEdit(QWidget *parent = NULL) : QPlainTextEdit(parent), producer(NULL), consumer(NULL)
- {
- setTextInteractionFlags(Qt::NoTextInteraction);
-
- producer = new Producer(this);
- consumer = new Consumer(this);
-
- QObject::connect(consumer, SIGNAL(stringConsumed(const QString &)), SLOT(insertPlainText(const QString &)), Qt::BlockingQueuedConnection);
-
- QTimer::singleShot(0, this, SLOT(startThreads()));
- }
-
-protected:
- Producer *producer;
- Consumer *consumer;
-
-protected slots:
- void startThreads()
- {
- producer->start();
- consumer->start();
- }
-};
-#endif
//! [5]
int main(int argc, char *argv[])
//! [5] //! [6]
{
-#ifdef Q_WS_S60
- QApplication app(argc, argv);
-
- PlainTextEdit console;
- console.showMaximized();
-
- return app.exec();
-#else
QCoreApplication app(argc, argv);
Producer producer;
Consumer consumer;
producer.wait();
consumer.wait();
return 0;
-#endif
}
//! [6]
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/waitconditions
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/codecs
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/completer
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/customcompleter
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/echoplugin
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/echoplugin/echowindow
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/echoplugin/plugin
INSTALLS += target sources
-symbian {
- CONFIG += qt_example
- TARGET.EPOCALLOWDLLDATA = 1
-}
-
-symbian:TARGET.EPOCALLOWDLLDATA = 1
QT += widgets
-symbian:TARGET.EPOCALLOWDLLDATA = 1
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/i18n
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/inputpanel
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
mainwindow.cpp \
paintarea.cpp \
plugindialog.cpp
-symbian {
- LIBS = -lpnp_basictools.lib
-} else {
- LIBS = -L$${QT_BUILD_TREE}/examples/tools/plugandpaint/plugins -lpnp_basictools
-}
+
+LIBS = -L$${QT_BUILD_TREE}/examples/tools/plugandpaint/plugins -lpnp_basictools
if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
mac:LIBS = $$member(LIBS, 0) $$member(LIBS, 1)_debug
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/plugandpaint
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/plugandpaintplugins/basictools
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/plugandpaintplugins/extrafilters
INSTALLS += target sources
-symbian: CONFIG += qt_example
-symbian:TARGET.EPOCALLOWDLLDATA = 1
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/plugandpaintplugins
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/regexp
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
aboutQtAct = new QAction(tr("About &Qt"), this);
connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
openPropertyListAct->setEnabled(false);
#endif
-#ifndef Q_WS_WIN
+#ifndef Q_OS_WIN
openRegistryPathAct->setEnabled(false);
#endif
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/settingseditor
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/styleplugin/plugin
INSTALLS += target sources
-symbian: CONFIG += qt_example
-symbian:TARGET.EPOCALLOWDLLDATA = 1
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/styleplugin
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/styleplugin/stylewindow
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/treemodelcompleter
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/undoframework
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets printsupport
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part1
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part2
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part3
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part4
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part5
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part6
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part7
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/1_readonly
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/2_formatting
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/3_changingmodel
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/4_headers
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/5_edit
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/6_treeview
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/7_selections
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/threads/clock
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/threads/helloconcurrent
INSTALLS += target sources
-symbian: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/threads/hellothread
INSTALLS += target sources
-symbian: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/threads/hellothreadpool
INSTALLS += target sources
-symbian: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/threads/movedobject
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/analogclock
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000A64F
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
AnalogClock clock;
-#if defined(Q_OS_SYMBIAN)
- clock.showMaximized();
-#else
clock.show();
-#endif
return app.exec();
}
OTHER_FILES += applicationicon.svg \
applicationicon.png \
applicationicon.desktop
-
-symbian {
- CONFIG += qt_example
- # override icon
- ICON = applicationicon.svg
- TARGET.UID3 = 0xe9f919ee
- TARGET.EPOCSTACKSIZE = 0x14000
- TARGET.EPOCHEAPSIZE = 0x020000 0x800000
-}
-
-maemo5 {
- CONFIG += qt_example
-
- # override icon from maemo5pkgrules.pri
- icon.files = $${TARGET}.png
-}
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
{
QApplication a(argc, argv);
QLabel label(QObject::tr("Hello, world!"));
-#if defined(Q_WS_S60)
- label.showMaximized();
-#else
label.show();
-#endif
return a.exec();
}
//! [5]
QGridLayout *mainLayout = new QGridLayout;
//! [5] //! [6]
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- mainLayout->setSizeConstraint(QLayout::SetNoConstraint);
-#else
mainLayout->setSizeConstraint(QLayout::SetFixedSize);
-#endif
mainLayout->addWidget(display, 0, 0, 1, 6);
mainLayout->addWidget(backspaceButton, 1, 0, 1, 2);
mainLayout->addWidget(clearButton, 1, 2, 1, 2);
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/calculator
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C602
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Calculator calc;
-#if defined(Q_OS_SYMBIAN)
- calc.showMaximized();
-#else
calc.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/calendarwidget
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C603
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/charactermap
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
INSTALLS += target sources
QT += widgets
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
CodeEditor editor;
editor.setWindowTitle(QObject::tr("Code Editor Example"));
-#if defined(Q_OS_SYMBIAN)
- editor.showMaximized();
-#else
editor.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/digitalclock
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
DigitalClock clock;
-#if defined(Q_OS_SYMBIAN)
- clock.showMaximized();
-#else
clock.show();
-#endif
return app.exec();
}
CONFIG += mobility
MOBILITY =
-
-symbian {
- TARGET.UID3 = 0xE2728354 # randomly generated
- TARGET.EPOCSTACKSIZE = 0x14000
- TARGET.EPOCHEAPSIZE = 0x020000 0x800000
- CONFIG += qt_example
-}
-
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
//! [4]
//! [5]
-#ifdef Q_WS_MAEMO_5
- setAttribute(Qt::WA_Maemo5AutoOrientation, true);
-#endif
}
//! [5]
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/groupbox
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/icons
INSTALLS += target sources
-symbian: CONFIG += qt_example
wince*: {
imageFiles.files = images/*
DEPLOYMENT += imageFiles
}
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
MainWindow mainWin;
-#if defined(Q_OS_SYMBIAN)
- mainWin.showMaximized();
-#else
mainWin.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/imageviewer
INSTALLS += target sources
-symbian: CONFIG += qt_example
#Symbian has built-in component named imageviewer so we use different target
-symbian: TARGET = imageviewerexample
wince*: {
DEPLOYMENT_PLUGIN += qjpeg qmng qgif
}
QT += widgets printsupport
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
ImageViewer imageViewer;
-#if defined(Q_OS_SYMBIAN)
- imageViewer.showMaximized();
-#else
imageViewer.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/lineedits
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C604
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
-simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "buttonwidget.h"
-#include <QSignalMapper>
-#include <QGridLayout>
-#include <QPushButton>
-
-//! [0]
-ButtonWidget::ButtonWidget(QStringList texts, QWidget *parent)
- : QWidget(parent)
-{
- signalMapper = new QSignalMapper(this);
-
- QGridLayout *gridLayout = new QGridLayout;
- for (int i = 0; i < texts.size(); ++i) {
- QPushButton *button = new QPushButton(texts[i]);
- connect(button, SIGNAL(clicked()), signalMapper, SLOT(map()));
- signalMapper->setMapping(button, texts[i]);
- gridLayout->addWidget(button, i / 2, i % 2);
- }
-
- connect(signalMapper, SIGNAL(mapped(const QString &)),
- this, SIGNAL(clicked(const QString &)));
-
- setLayout(gridLayout);
-}
-//! [0]
-
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef BUTTONWIDGET_H
-#define BUTTONWIDGET_H
-
-#include <QWidget>
-#include <QSignalMapper>
-
-//! [0]
-class ButtonWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- ButtonWidget(QStringList texts, QWidget *parent = 0);
-
-signals:
- void clicked(const QString &text);
-
-private:
- QSignalMapper *signalMapper;
-};
-//! [0]
-
-#endif // BUTTONWIDGET_H
-
+++ /dev/null
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Name=Maemo Vibration
-Exec=/usr/bin/maemovibration
-Icon=maemovibration
-X-HildonDesk-ShowInToolbar=true
-X-Window-Icon=maemovibration
-X-Window-Icon-Dimmed=maemovibration
-X-Osso-Type=application/x-executable
-X-Osso-Service=com.nokia.maemovibration
+++ /dev/null
-[D-BUS Service]
-Name=com.nokia.maemovibration
-Exec=/usr/bin/maemovibration
+++ /dev/null
-TARGET = maemovibration
-HEADERS += buttonwidget.h mcevibrator.h
-SOURCES += main.cpp buttonwidget.cpp mcevibrator.cpp
-
-# All generated files goes same directory
-OBJECTS_DIR = build
-MOC_DIR = build
-UI_DIR = build
-DESTDIR = build
-
-TEMPLATE = app
-CONFIG += debug
-QT=core gui
-
-maemo5 {
- QT += dbus
- CONFIG += link_pkgconfig
- PKG_CONFIG += mce
- INSTALLS += target
- target.path = /usr/bin/
-
- INSTALLS += desktop
- desktop.path = /usr/share/applications/hildon
- desktop.files = data/maemovibration.desktop
-
- INSTALLS += service
- service.path = /usr/share/dbus-1/services
- service.files = data/maemovibration.service
-
- INSTALLS += icon64
- icon64.path = /usr/share/icons/hicolor/64x64/apps
- icon64.files = data/64x64/maemovibration.png
-
- #
- # Targets for debian source and binary package creation
- #
- debian-src.commands = dpkg-buildpackage -S -r -us -uc -d
- debian-bin.commands = dpkg-buildpackage -b -r -uc -d
- debian-all.depends = debian-src debian-bin
-
- #
- # Clean all but Makefile
- #
- compiler_clean.commands = -$(DEL_FILE) $(TARGET)
-
- QMAKE_EXTRA_TARGETS += debian-all debian-src debian-bin compiler_clean
-}
-
-!maemo5 {
- error(The Maemo Vibration Example only works for the maemo target!)
-}
-
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include "buttonwidget.h"
-#include "mcevibrator.h"
-
-#include <QtDebug>
-#include <QApplication>
-#include <QFile>
-#include <QTextStream>
-#include <QMessageBox>
-#include <QTextStream>
-
-#include <cstdlib>
-
-//! [0]
-int main(int argc, char *argv[])
-{
- QApplication a(argc, argv);
- QString path = MceVibrator::defaultMceFilePath;
-
- QFile file(path);
- QStringList names;
- if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
- QTextStream stream(&file);
- names = MceVibrator::parsePatternNames(stream);
- file.close();
- }
-
- if (names.isEmpty()){
- qDebug() << "Could not read vibration pattern names from " << path;
- a.exit(-1);
- }
-//! [0]
-
-//! [1]
- ButtonWidget buttonWidget(names);
- MceVibrator vibrator;
- QObject::connect(&buttonWidget, SIGNAL(clicked(const QString &)),
- &vibrator, SLOT(vibrate(const QString &)));
- buttonWidget.show();
-
- return a.exec();
-}
-//! [1]
-
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include "mcevibrator.h"
-
-#include <QStringList>
-#include <QDebug>
-#include <QDBusConnection>
-#include <QDBusMessage>
-
-#include <mce/dbus-names.h>
-
-const char MceVibrator::defaultMceFilePath[] = "/etc/mce/mce.ini";
-
-//! [5]
-static void checkError(QDBusMessage &msg)
-{
- if (msg.type() == QDBusMessage::ErrorMessage)
- qDebug() << msg.errorName() << msg.errorMessage();
-}
-//! [5]
-
-//! [0]
-MceVibrator::MceVibrator(QObject *parent) :
- QObject(parent),
- mceInterface(MCE_SERVICE, MCE_REQUEST_PATH, MCE_REQUEST_IF,
- QDBusConnection::systemBus())
-{
- QDBusMessage reply = mceInterface.call(MCE_ENABLE_VIBRATOR);
- checkError(reply);
-}
-//! [0]
-
-//! [3]
-MceVibrator::~MceVibrator()
-{
- deactivate(lastPatternName);
- QDBusMessage reply = mceInterface.call(MCE_DISABLE_VIBRATOR);
- checkError(reply);
-}
-//! [3]
-
-//! [1]
-void MceVibrator::vibrate(const QString &patternName)
-{
- deactivate(lastPatternName);
- lastPatternName = patternName;
- QDBusMessage reply = mceInterface.call(MCE_ACTIVATE_VIBRATOR_PATTERN, patternName);
- checkError(reply);
-}
-//! [1]
-
-//! [2]
-void MceVibrator::deactivate(const QString &patternName)
-{
- if (!patternName.isNull()) {
- QDBusMessage reply = mceInterface.call(MCE_DEACTIVATE_VIBRATOR_PATTERN, patternName);
- checkError(reply);
- }
-}
-//! [2]
-
-//! [4]
-QStringList MceVibrator::parsePatternNames(QTextStream &stream)
-{
- QStringList result;
- QString line;
-
- do {
- line = stream.readLine();
- if (line.startsWith(QLatin1String("VibratorPatterns="))) {
- QString values = line.section('=', 1);
- result = values.split(';');
- break;
- }
- } while (!line.isNull());
-
- return result;
-}
-//! [4]
-
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MCEVIBRATOR_H
-#define MCEVIBRATOR_H
-
-#include <QObject>
-#include <QTextStream>
-#include <QDBusInterface>
-
-//! [0]
-class MceVibrator : public QObject
-{
- Q_OBJECT
-public:
- explicit MceVibrator(QObject *parent = 0);
- ~MceVibrator();
-
- static const char defaultMceFilePath[];
- static QStringList parsePatternNames(QTextStream &stream);
-
-public slots:
- void vibrate(const QString &patternName);
-
-private:
- void deactivate(const QString &patternName);
-
- QDBusInterface mceInterface;
- QString lastPatternName;
-};
-//! [0]
-
-#endif // MCEVIBRATOR_H
-
QApplication app(argc, argv);
MoviePlayer player;
player.show();
-#if defined(Q_OS_SYMBIAN)
- player.showMaximized();
-#else
player.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/movie
INSTALLS += target sources
-symbian: CONFIG += qt_example
wince*: {
addFiles.files += *.mng
}
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
//! [1]
//! [2]
-#ifdef Q_WS_MAEMO_5
- setAttribute(Qt::WA_Maemo5AutoOrientation, true);
-#endif
}
//! [2]
RESOURCES += \
images.qrc
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
MainWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/scribble
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets printsupport
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
ShapedClock clock;
-#if defined(Q_OS_SYMBIAN)
- clock.showMaximized();
-#else
clock.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/shapedclock
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C605
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/sliders
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/softkeys
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000CF6B
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
Window window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/spinboxes
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/styles
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
QApplication app(argc, argv);
MainWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/stylesheet
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtGui/QApplication>
-#include "mainwindow.h"
-
-int main(int argc, char *argv[])
-{
- QApplication a(argc, argv);
- MainWindow w;
-#if defined(Q_WS_S60)
- w.showMaximized();
-#else
- w.show();
-#endif
- return a.exec();
-}
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtGui/QMenuBar>
-#include "mainwindow.h"
-#include "vibrationsurface.h"
-#include "xqvibra.h"
-
-//! [0]
-MainWindow::MainWindow(QWidget *parent)
- : QMainWindow(parent)
-{
- vibra = new XQVibra(this);
- setCentralWidget(new VibrationSurface(vibra, this));
- menuBar()->addAction(tr("Vibrate"), this, SLOT(vibrate()));
-}
-//! [0]
-
-//! [1]
-void MainWindow::vibrate()
-{
- vibra->setIntensity(75);
- vibra->start(2500);
-}
-//! [1]
-
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QtGui/QMainWindow>
-class XQVibra;
-
-//! [0]
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- MainWindow(QWidget *parent = 0);
-
-private slots:
- void vibrate();
-
-private:
- XQVibra *vibra;
-};
-//! [0]
-
-#endif // MAINWINDOW_H
+++ /dev/null
-#-------------------------------------------------
-#
-# Project created by QtCreator 2010-06-14T10:09:27
-#
-#-------------------------------------------------
-
-QT += core gui
-
-TARGET = symbianvibration
-TEMPLATE = app
-
-
-SOURCES += main.cpp\
- mainwindow.cpp \
- vibrationsurface.cpp \
- xqvibra.cpp \
- xqvibra_p.cpp
-
-HEADERS += mainwindow.h \
- vibrationsurface.h \
- xqvibra.h \
- xqvibra_p.h
-
-CONFIG += mobility
-MOBILITY =
-
-symbian {
- TARGET.UID3 = 0xecf47018
- # TARGET.CAPABILITY +=
- TARGET.EPOCSTACKSIZE = 0x14000
- TARGET.EPOCHEAPSIZE = 0x020000 0x800000
- LIBS += -lhwrmvibraclient
- include($$PWD/../../symbianpkgrules.pri)
-}
-
-!symbian {
- error(The Symbian Vibration Example only works for the Symbian target!)
-}
-
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "vibrationsurface.h"
-#include <QtGui/QPainter>
-#include <QtCore/QLine>
-#include <QtGui/QMouseEvent>
-#include <QtGui/QScreen>
-#include <QtCore/QRect>
-#include <QtGui/QColor>
-
-#include "xqvibra.h"
-
-//! [4]
-const int NumberOfLevels = 10;
-const double IntensityFactor = XQVibra::MaxIntensity / NumberOfLevels;
-//! [4]
-
-VibrationSurface::VibrationSurface(XQVibra *vibra, QWidget *parent) :
- QWidget(parent),
- vibra(vibra),
- lastIntensity(0)
-{
-}
-
-//! [0]
-void VibrationSurface::mousePressEvent(QMouseEvent *event)
-{
- applyIntensity(event->x(), event->y());
- vibra->start();
-}
-//! [0]
-
-//! [1]
-void VibrationSurface::mouseMoveEvent(QMouseEvent *event)
-{
- applyIntensity(event->x(), event->y());
-}
-//! [1]
-
-//! [2]
-void VibrationSurface::mouseReleaseEvent(QMouseEvent *)
-{
- vibra->stop();
-}
-//! [2]
-
-//! [5]
-void VibrationSurface::paintEvent(QPaintEvent *)
-{
- QPainter painter(this);
- QRect rect = geometry();
- int dx = 0, dy = 0;
-
- if (height() > width()) {
- dy = height() / NumberOfLevels;
- rect.setHeight(dy);
- } else {
- dx = width() / NumberOfLevels;
- rect.setWidth(dx);
- }
-//! [5]
-//! [6]
- for (int i = 0; i < NumberOfLevels; i++) {
- int x = i * dx;
- int y = i * dy;
- int intensity = getIntensity(x, y);
- QColor color = QColor(40, 80, 10).lighter(100 + intensity);
-
- rect.moveTo(x, y);
- painter.fillRect(rect, color);
- painter.setPen(color.darker());
- painter.drawText(rect, Qt::AlignCenter, QString::number(intensity));
- }
-}
-//! [6]
-
-//! [7]
-int VibrationSurface::getIntensity(int x, int y)
-{
- int level;
- int coord;
-
- if (height() > width()) {
- level = height() / NumberOfLevels;
- coord = y;
- } else {
- level = width() / NumberOfLevels;
- coord = x;
- }
-
- if (level == 0) {
- return 0;
- }
-//! [7]
-//! [8]
- int intensity = (coord / level + 1) * IntensityFactor;
-
- if (intensity < 0) {
- intensity = 0;
- } else if (intensity > XQVibra::MaxIntensity) {
- intensity = XQVibra::MaxIntensity;
- }
-
- return intensity;
-}
-//! [8]
-
-//! [3]
-void VibrationSurface::applyIntensity(int x, int y)
-{
- int intensity = getIntensity(x, y);
-
- if (intensity != lastIntensity) {
- vibra->setIntensity(intensity);
- lastIntensity = intensity;
- }
-}
-//! [3]
-
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef TOUCHAREA_H
-#define TOUCHAREA_H
-
-#include <QWidget>
-
-class XQVibra;
-
-//! [0]
-class VibrationSurface : public QWidget
-{
- Q_OBJECT
-public:
- explicit VibrationSurface(XQVibra *vibra, QWidget *parent = 0);
-
-protected:
- virtual void mousePressEvent(QMouseEvent *);
- virtual void mouseMoveEvent(QMouseEvent *);
- virtual void mouseReleaseEvent(QMouseEvent *);
- virtual void paintEvent(QPaintEvent *);
-
-private:
-
- int getIntensity(int x, int y);
- void applyIntensity(int x, int y);
-
- XQVibra *vibra;
- int lastIntensity;
-};
-//! [0]
-
-#endif // TOUCHAREA_H
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "xqvibra.h"
-#include "xqvibra_p.h"
-
-/*!
- \class XQVibra
-
- \brief The XQVibra class is used to control the device's vibra. The XQVibra
- class provides also information of vibration setting in the user profile.
-
- Example:
- \code
- XQVibra *vibra = new XQVibra(this);
- QPushButton *startButton = new QPushButton(this);
- QPushButton *stopButton = new QPushButton(this);
- connect(startButton, SIGNAL(clicked()), vibra, SLOT(start()));
- connect(stopButton, SIGNAL(clicked()), vibra, SLOT(stop()));
- \endcode
-*/
-
-/*! \var XQVibra::InfiniteDuration
- With this constant vibration can be set to work indefinitely (Note! Depends on the HW)
-*/
-/*! \var XQVibra::MaxIntensity
- Maximum intensity as percentages
-*/
-/*! \var XQVibra::MinIntensity
- Minumum intensity as percentages
-*/
-
-/*!
- Constructs a XQVibra object with the given parent.
- Call error() to get a value of XQVibra::Error that indicates which error occurred during initialisation if any.
- \sa start(), setIntensity(), error()
-*/
-XQVibra::XQVibra(QObject *parent)
- : QObject(parent), d(new XQVibraPrivate(this))
-{
-}
-
-/*!
- Destroys the XQVibra object.
-*/
-XQVibra::~XQVibra()
-{
- delete d;
-}
-
-/*!
- \enum XQVibra::Error
-
- This enum defines the possible errors for a XQVibra object.
-*/
-/*! \var XQVibra::Error XQVibra::NoError
- No error occured.
-*/
-/*! \var XQVibra::Error XQVibra::OutOfMemoryError
- Not enough memory.
-*/
-/*! \var XQVibra::Error XQVibra::ArgumentError
- Duration is invalid.
-*/
-/*! \var XQVibra::Error XQVibra::VibraInUseError
- Vibra is already in used by other client.
-*/
-/*! \var XQVibra::Error XQVibra::HardwareError
- There is a hardware error.
-*/
-/*! \var XQVibra::Error XQVibra::TimeOutError
- Timeout occurred in controlling vibra.
-*/
-/*! \var XQVibra::Error XQVibra::VibraLockedError
- Vibra is locked down because too much continuous use or explicitly blocked by
- for example some vibration sensitive accessory.
-*/
-/*! \var XQVibra::Error XQVibra::AccessDeniedError
- Vibration setting in the user profile is not set.
-*/
-/*! \var XQVibra::Error XQVibra::UnknownError
- Unknown error.
-*/
-
-/*!
- \enum XQVibra::Status
-
- This enum defines the possible statuses of the vibration
-*/
-/*! \var XQVibra::Status XQVibra::StatusNotAllowed
- Vibra is set off in the user profile or status is unknow
-*/
-/*! \var XQVibra::Status XQVibra::StatusOff
- Vibration is non-active
-*/
-/*! \var XQVibra::Status XQVibra::StatusOn
- Vibration is active
-*/
-
-/*!
- Starts vibrating. If duration hasn't been set the vibration continues
- indefinitely unless stopped with stop() function. Calling the start while vibration
- is active the active vibration is interrupted and the new vibration starts immediately.
-
- \param duration Specifies duration how long vibration should last
- \return If false is returned, an error has occurred. Call error() to get a value of
- XQVibra::Error that indicates which error occurred
- \sa stop(), setIntensity(), error()
-*/
-bool XQVibra::start(int duration)
-{
- return d->start(duration);
-}
-
-/*!
- Interrupts the device vibration immediately.
-
- \return If false is returned, an error has occurred. Call error() to get a value of
- XQVibra::Error that indicates which error occurred
- \sa start(), setIntensity(), error()
-*/
-bool XQVibra::stop()
-{
- return d->stop();
-}
-
-/*!
- Sets the intensity of the vibration. Allowed values for the intensity are
- between -100 and 100. 0 means no vibrating. NOTE: The device might have
- hardware-imposed limits on supported vibra intensity values, so actual
- effect might vary between different hardware.
-
- \param intensity Intensity of the vibra in decimals
- \return If false is returned, an error has occurred. Call error() to get a value of
- XQVibra::Error that indicates which error occurred
- \sa error()
-*/
-bool XQVibra::setIntensity(int intensity)
-{
- return d->setIntensity(intensity);
-}
-
-/*!
- Returns the current status of the vibration. This function can be used to check has vibration
- allowed in the user profile.
-
- \return current status
- \sa statusChanged()
-*/
-XQVibra::Status XQVibra::currentStatus() const
-{
- return d->currentStatus();
-}
-
-/*!
- Returns the type of error that occurred if the latest function call failed; otherwise returns NoError
- \return Error code
-*/
-XQVibra::Error XQVibra::error() const
-{
- return d->error();
-}
-
-/*!
- \fn void XQVibra::statusChanged(Status status)
-
- This signal is emitted when the there is a change of the vibration status.
-
- \param status a vibration status
- \sa currentStatus()
-*/
-
-// End of file
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef XQVIBRA_H
-#define XQVIBRA_H
-
-// INCLUDES
-#include <QObject>
-
-// FORWARD DECLARATIONS
-class XQVibraPrivate;
-
-// CLASS DECLARATION
-//! [0]
-class XQVibra : public QObject
-{
- Q_OBJECT
-
-public:
- static const int InfiniteDuration = 0;
- static const int MaxIntensity = 100;
- static const int MinIntensity = -100;
-
- enum Error {
- NoError = 0,
- OutOfMemoryError,
- ArgumentError,
- VibraInUseError,
- HardwareError,
- TimeOutError,
- VibraLockedError,
- AccessDeniedError,
- UnknownError = -1
- };
-
- enum Status {
- StatusNotAllowed = 0,
- StatusOff,
- StatusOn
- };
-
- XQVibra(QObject *parent = 0);
- ~XQVibra();
-
- XQVibra::Status currentStatus() const;
- XQVibra::Error error() const;
-
-Q_SIGNALS:
- void statusChanged(XQVibra::Status status);
-
-public Q_SLOTS:
- bool start(int duration = InfiniteDuration);
- bool stop();
- bool setIntensity(int intensity);
-
-private:
- friend class XQVibraPrivate;
- XQVibraPrivate *d;
-};
-//! [0]
-
-#endif // XQVIBRA_H
-
-// End of file
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "xqvibra_p.h"
-
-const int KDefaultIntensity = 0xFF;
-
-XQVibraPrivate::XQVibraPrivate(XQVibra *vibra)
- : q(vibra), iStatus(XQVibra::StatusOff), iDuration(XQVibra::InfiniteDuration), iIntensity(KDefaultIntensity)
-
-{
- TRAP(iError, iVibra = CHWRMVibra::NewL();)
- QObject::connect(&iTimer, SIGNAL(timeout()), q, SLOT(stop()));
-}
-
-XQVibraPrivate::~XQVibraPrivate()
-{
- delete iVibra;
-}
-
-bool XQVibraPrivate::start(int aDuration)
-{
- iDuration = aDuration;
- TRAP(iError,
- if (iIntensity == KDefaultIntensity) {
- iVibra->StartVibraL(XQVibra::InfiniteDuration);
- } else {
- iVibra->StopVibraL();
- iVibra->StartVibraL(XQVibra::InfiniteDuration, iIntensity);
- }
-
- if (aDuration != XQVibra::InfiniteDuration) {
- iTimer.start(aDuration);
- } else {
- iTimer.stop();
- }
-
- if (iStatus != XQVibra::StatusOn) {
- iStatus = XQVibra::StatusOn;
- emit q->statusChanged(iStatus);
- }
- )
- return (iError == KErrNone);
-}
-
-bool XQVibraPrivate::stop()
-{
- TRAP(iError,
- if (iVibra->VibraStatus() == CHWRMVibra::EVibraStatusOn) {
- iVibra->StopVibraL();
- if (iTimer.isActive()) {
- iTimer.stop();
- }
- }
-
- iStatus = XQVibra::StatusOff;
- emit q->statusChanged(iStatus);
- )
- return (iError == KErrNone);
-}
-
-void XQVibraPrivate::VibraModeChanged(CHWRMVibra::TVibraModeState /*aStatus*/)
-{
- // Implementation isn't needed here because this information isn't used in the public side of the extension
-}
-
-void XQVibraPrivate::VibraStatusChanged(CHWRMVibra::TVibraStatus aStatus)
-{
- if (aStatus == CHWRMVibra::EVibraStatusUnknown ||
- aStatus == CHWRMVibra::EVibraStatusNotAllowed) {
- iStatus = XQVibra::StatusNotAllowed;
- emit q->statusChanged(iStatus);
- }
-
- if (iDuration == XQVibra::InfiniteDuration) {
- if (iStatus != XQVibra::StatusOff) {
- iStatus = XQVibra::StatusOff;
- emit q->statusChanged(iStatus);
- }
- }
-}
-
-bool XQVibraPrivate::setIntensity(int aIntensity)
-{
- TRAP(iError,
- if (aIntensity >= KHWRMVibraMinIntensity && aIntensity <= KHWRMVibraMaxIntensity) {
- iIntensity = aIntensity;
- if (iIntensity == 0 && iStatus == XQVibra::StatusOn) {
- iVibra->StopVibraL();
- } else if (iStatus == XQVibra::StatusOn) {
- iVibra->StopVibraL();
- iVibra->StartVibraL(XQVibra::InfiniteDuration, iIntensity);
- }
- } else {
- User::Leave(KErrArgument);
- }
- )
- return (iError == KErrNone);
-}
-
-XQVibra::Status XQVibraPrivate::currentStatus() const
-{
- if (iVibra->VibraStatus() == CHWRMVibra::EVibraStatusUnknown ||
- iVibra->VibraStatus() == CHWRMVibra::EVibraStatusNotAllowed) {
- return XQVibra::StatusNotAllowed;
- }
- return iStatus;
-}
-
-XQVibra::Error XQVibraPrivate::error() const
-{
- switch (iError) {
- case KErrNone:
- return XQVibra::NoError;
- case KErrNoMemory:
- return XQVibra::OutOfMemoryError;
- case KErrArgument:
- return XQVibra::ArgumentError;
- case KErrInUse:
- return XQVibra::VibraInUseError;
- case KErrGeneral:
- return XQVibra::HardwareError;
- case KErrTimedOut:
- return XQVibra::TimeOutError;
- case KErrLocked:
- return XQVibra::VibraLockedError;
- case KErrAccessDenied:
- return XQVibra::AccessDeniedError;
- default:
- return XQVibra::UnknownError;
- }
-}
-
-// End of file
+++ /dev/null
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef XQVIBRA_P_H
-#define XQVIBRA_P_H
-
-// INCLUDES
-#include "xqvibra.h"
-#include <hwrmvibra.h>
-#include <QTimer>
-
-// CLASS DECLARATION
-class XQVibraPrivate: public CBase, public MHWRMVibraObserver
-{
-
-public:
- XQVibraPrivate(XQVibra *vibra);
- ~XQVibraPrivate();
-
- bool start(int aDuration = XQVibra::InfiniteDuration);
- bool stop();
- bool setIntensity(int aIntensity);
- XQVibra::Status currentStatus() const;
- XQVibra::Error error() const;
-
-private: // From MHWRMVibraObserver
- void VibraModeChanged(CHWRMVibra::TVibraModeState aStatus);
- void VibraStatusChanged(CHWRMVibra::TVibraStatus aStatus);
-
-private:
- XQVibra *q;
- XQVibra::Status iStatus;
- CHWRMVibra *iVibra;
- QTimer iTimer;
- int iDuration;
- int iIntensity;
- int iError;
-};
-
-#endif /*XQVIBRA_P_H*/
-
-// End of file
app.setCanvas(canvas);
MainWindow mainWindow(canvas);
-#if defined(Q_OS_SYMBIAN)
- mainWindow.showMaximized();
-#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- mainWindow.show();
-#else
mainWindow.resize(500, 500);
mainWindow.show();
-#endif
return app.exec();
}
//! [0]
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/tablet
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
{
QApplication app(argc, argv);
TetrixWindow window;
-#if defined(Q_OS_SYMBIAN)
- window.showMaximized();
-#else
window.show();
-#endif
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/tetrix
INSTALLS += target sources
-symbian {
- TARGET.UID3 = 0xA000C606
- CONFIG += qt_example
-}
QT += widgets
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
SortingBox sortingBox;
-#if defined(Q_OS_SYMBIAN)
- sortingBox.showMaximized();
-#else
sortingBox.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/tooltips
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
ValidatorWidget w;
-#if defined(Q_OS_SYMBIAN)
- w.showMaximized();
-#else
w.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/validators
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
tooltips \
validators \
wiggly \
- windowflags \
-
-symbian: SUBDIRS = \
- analogclock \
- calculator \
- calendarwidget \
- lineedits \
- shapedclock \
- symbianvibration \
- tetrix \
- wiggly \
- softkeys
-
-MAEMO5: SUBDIRS += maemovibration
+ windowflags
contains(styles, motif): SUBDIRS += styles
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
QApplication app(argc, argv);
bool smallScreen = QApplication::arguments().contains("-small-screen");
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_HILDON) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
- smallScreen = true;
-#endif
Dialog dialog(0, smallScreen);
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS wiggly.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/wiggly
INSTALLS += target sources
-
-symbian {
- TARGET.UID3 = 0xA000C607
- CONFIG += qt_example
-}
-maemo5: CONFIG += qt_example
-
{
QApplication app(argc, argv);
ControllerWindow controller;
-#if defined(Q_OS_SYMBIAN)
- controller.showMaximized();
-#else
controller.show();
-#endif
return app.exec();
}
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/windowflags
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
-symbian: warning(This example might not fully work on Symbian platform)
-maemo5: warning(This example might not fully work on Maemo platform)
simulator: warning(This example might not fully work on Simulator platform)
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml/dombookmarks
INSTALLS += target sources
-symbian: CONFIG += qt_example
-
-symbian: {
- CONFIG += qt_example
- addFiles.sources = frank.xbel jennifer.xbel
- addFiles.path = files
- DEPLOYMENT += addFiles
-}
-
wince*: {
addFiles.files = frank.xbel jennifer.xbel
addFiles.path = "\\My Documents"
DEPLOYMENT += addFiles
}
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
MainWindow mainWin;
-#if defined(Q_OS_SYMBIAN)
- mainWin.showMaximized();
-#else
mainWin.show();
-#endif
mainWin.open();
return app.exec();
void MainWindow::open()
{
-#if defined(Q_OS_SYMBIAN)
- // Look for bookmarks on the same drive where the application is installed to,
- // if drive is not read only. QDesktopServices::DataLocation does this check,
- // and returns writable drive.
- QString bookmarksFolder =
- QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
- bookmarksFolder.append(":/Data/qt/saxbookmarks");
- QDir::setCurrent(bookmarksFolder);
-#endif
QString fileName =
QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),
QDir::currentPath(),
void MainWindow::saveAs()
{
-#if defined(Q_OS_SYMBIAN)
- // Look for bookmarks on the same drive where the application is installed to,
- // if drive is not read only. QDesktopServices::DataLocation does this check,
- // and returns writable drive.
- QString bookmarksFolder =
- QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
- bookmarksFolder.append(":/Data/qt/saxbookmarks");
- QDir::setCurrent(bookmarksFolder);
-#endif
QString fileName =
QFileDialog::getSaveFileName(this, tr("Save Bookmark File"),
QDir::currentPath(),
win32: CONFIG += console
-wince*|symbian:{
+wince*:{
htmlfiles.files = *.html
htmlfiles.path = .
DEPLOYMENT += htmlfiles
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.html htmlinfo.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml/htmlinfo
INSTALLS += target sources
-
-symbian {
- TARGET.UID3 = 0xA000C609
- CONFIG += qt_example
-}
-maemo5: CONFIG += qt_example
-
-symbian: warning(This example does not work on Symbian platform)
{
QApplication app(argc, argv);
RSSListing *rsslisting = new RSSListing;
-#if defined(Q_OS_SYMBIAN)
- rsslisting->showMaximized();
-#else
rsslisting->show();
-#endif
return app.exec();
}
RSSListing::RSSListing(QWidget *parent)
: QWidget(parent), currentReply(0)
{
-#ifdef Q_OS_SYMBIAN
- // Set Internet Access Point
- QNetworkConfigurationManager manager;
- const bool canStartIAP = manager.capabilities() & QNetworkConfigurationManager::CanStartAndStopInterfaces;
-
- // Is there default access point, use it
- QNetworkConfiguration cfg = manager.defaultConfiguration();
- if (!cfg.isValid() || !canStartIAP) {
- // Available Access Points not found
- QMessageBox::warning(this, "Error", "No access point");
- return;
- }
-
- m_session = new QNetworkSession(cfg);
- m_session->open();
- m_session->waitForOpened();
-#endif
lineEdit = new QLineEdit(this);
lineEdit->setText("http://labs.qt.nokia.com/blogs/feed");
layout->addWidget(treeWidget);
setWindowTitle(tr("RSS listing example"));
-#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
resize(640,480);
-#endif
}
/*
#include <QXmlStreamReader>
#include <QUrl>
-#ifdef Q_OS_SYMBIAN
-// Bearer
-#include <QNetworkConfigurationManager>
-#include <QNetworkSession>
-#include <QPointer>
-
-// QtMobility namespace
-QTM_USE_NAMESPACE
-#endif
QT_BEGIN_NAMESPACE
class QLineEdit;
QTreeWidget *treeWidget;
QPushButton *fetchButton;
-#ifdef Q_OS_SYMBIAN
- // for bearer management
- QPointer<QNetworkSession> m_session;
-#endif
};
#endif
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS rsslisting.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml/rsslisting
INSTALLS += target sources
-
-symbian {
- CONFIG += qt_example
-
- # For QtMobility
- CONFIG += mobility
- MOBILITY = bearer
-
- # For QtMobility
- TARGET.CAPABILITY = NetworkServices
-}
-
-maemo5: CONFIG += qt_example
{
QApplication app(argc, argv);
MainWindow mainWin;
-#if defined(Q_OS_SYMBIAN)
- mainWin.showFullScreen();
-#else
mainWin.show();
-#endif
mainWin.open();
return app.exec();
}
void MainWindow::open()
{
-#if defined(Q_OS_SYMBIAN)
- // Look for bookmarks on the same drive where the application is installed to,
- // if drive is not read only. QDesktopServices::DataLocation does this check,
- // and returns writable drive.
- QString bookmarksFolder =
- QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
- bookmarksFolder.append(":/Data/qt/saxbookmarks");
- QDir::setCurrent(bookmarksFolder);
-#endif
QString fileName =
QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),
QDir::currentPath(),
addFiles.path = "\\My Documents"
DEPLOYMENT += addFiles
}
-
-symbian: {
- TARGET.UID3 = 0xA000C60A
- CONFIG += qt_example
- addFiles.files = frank.xbel jennifer.xbel
- addFiles.path = /data/qt/saxbookmarks
- DEPLOYMENT += addFiles
-}
-maemo5: CONFIG += qt_example
-
{
QApplication app(argc, argv);
MainWindow mainWin;
-#ifdef Q_OS_SYMBIAN
- mainWin.showFullScreen();
-#endif
mainWin.show();
mainWin.open();
return app.exec();
//! [1]
void MainWindow::open()
{
-#if defined(Q_OS_SYMBIAN)
- // Look for bookmarks on the same drive where the application is installed to,
- // if drive is not read only. QDesktopServices::DataLocation does this check,
- // and returns writable drive.
- QString bookmarksFolder =
- QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
- bookmarksFolder.append(":/Data/qt/saxbookmarks");
- QDir::setCurrent(bookmarksFolder);
-#endif
QString fileName =
QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),
QDir::currentPath(),
//! [2]
void MainWindow::saveAs()
{
-#if defined(Q_OS_SYMBIAN)
- // Look for bookmarks on the same drive where the application is installed to,
- // if drive is not read only. QDesktopServices::DataLocation does this check,
- // and returns writable drive.
- QString bookmarksFolder =
- QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
- bookmarksFolder.append(":/Data/qt/saxbookmarks");
- QDir::setCurrent(bookmarksFolder);
-#endif
QString fileName =
QFileDialog::getSaveFileName(this, tr("Save Bookmark File"),
QDir::currentPath(),
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS streambookmarks.pro *.xbel
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml/streambookmarks
INSTALLS += target sources
-
-symbian: {
- CONFIG += qt_example
- addFiles.sources = frank.xbel jennifer.xbel
- addFiles.path = /data/qt/streambookmarks
- DEPLOYMENT += addFiles
-}
-maemo5: CONFIG += qt_example
streambookmarks
}
-symbian: SUBDIRS = htmlinfo saxbookmarks
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml
INSTALLS += target sources
-symbian: CONFIG += qt_example
QT += widgets
-maemo5: CONFIG += qt_example
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml/xmlstreamlint
INSTALLS += target sources
-symbian: CONFIG += qt_example
-maemo5: CONFIG += qt_example
-symbian: warning(This example does not work on Symbian platform)
simulator: warning(This example does not work on Simulator platform)