Changeset 844 for branches/vendor/nokia/qt/current/demos/qtdemo
- Timestamp:
- May 3, 2011, 4:49:08 PM (15 years ago)
- Location:
- branches/vendor/nokia/qt/current/demos/qtdemo
- Files:
-
- 1 added
- 45 edited
-
colors.cpp (modified) (1 diff)
-
colors.h (modified) (1 diff)
-
demoitem.cpp (modified) (1 diff)
-
demoitem.h (modified) (1 diff)
-
demoitemanimation.cpp (modified) (1 diff)
-
demoitemanimation.h (modified) (1 diff)
-
demoscene.cpp (modified) (1 diff)
-
demoscene.h (modified) (1 diff)
-
demotextitem.cpp (modified) (1 diff)
-
demotextitem.h (modified) (1 diff)
-
dockitem.cpp (modified) (1 diff)
-
dockitem.h (modified) (1 diff)
-
examplecontent.cpp (modified) (3 diffs)
-
examplecontent.h (modified) (1 diff)
-
guide.cpp (modified) (1 diff)
-
guide.h (modified) (1 diff)
-
guidecircle.cpp (modified) (1 diff)
-
guidecircle.h (modified) (1 diff)
-
guideline.cpp (modified) (1 diff)
-
guideline.h (modified) (1 diff)
-
headingitem.cpp (modified) (1 diff)
-
headingitem.h (modified) (1 diff)
-
imageitem.cpp (modified) (1 diff)
-
imageitem.h (modified) (1 diff)
-
itemcircleanimation.cpp (modified) (1 diff)
-
itemcircleanimation.h (modified) (2 diffs)
-
letteritem.cpp (modified) (1 diff)
-
letteritem.h (modified) (1 diff)
-
main.cpp (modified) (1 diff)
-
mainwindow.cpp (modified) (5 diffs)
-
mainwindow.h (modified) (3 diffs)
-
menucontent.cpp (modified) (1 diff)
-
menucontent.h (modified) (1 diff)
-
menumanager.cpp (modified) (23 diffs)
-
menumanager.h (modified) (6 diffs)
-
qmlShell.qml (added)
-
qtdemo.pro (modified) (3 diffs)
-
qtdemo.qrc (modified) (1 diff)
-
qtdemo.rc (modified) (1 diff)
-
scanitem.cpp (modified) (1 diff)
-
scanitem.h (modified) (1 diff)
-
score.cpp (modified) (1 diff)
-
score.h (modified) (1 diff)
-
textbutton.cpp (modified) (1 diff)
-
textbutton.h (modified) (2 diffs)
-
xml/examples.xml (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/vendor/nokia/qt/current/demos/qtdemo/colors.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/colors.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/demoitem.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/demoitem.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/demoitemanimation.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/demoitemanimation.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/demoscene.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/demoscene.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/demotextitem.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/demotextitem.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/dockitem.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/dockitem.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/examplecontent.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 80 80 { 81 81 QByteArray ba = MenuManager::instance()->getHtml(this->name); 82 83 82 84 83 85 QDomDocument exampleDoc; 84 exampleDoc.setContent(ba, false); 86 if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) { 87 qDebug() << errorMsg << errorLine << errorColumn; 88 } 85 89 86 90 QDomNodeList paragraphs = exampleDoc.elementsByTagName("p"); 87 91 if (paragraphs.length() < 1 && Colors::verbose) 88 qDebug() << "- ExampleContent::loadDescription(): Could not load description:" << MenuManager::instance()->info[this->name]["docfile"]; 89 QString description = Colors::contentColor + QLatin1String("Could not load description. Ensure that the documentation for Qt is built."); 92 qDebug() << "- ExampleContent::loadDescription(): Could not load description:" 93 << MenuManager::instance()->info[this->name]["docfile"]; 94 QString description = Colors::contentColor + QLatin1String(""); 95 //QLatin1String("Could not load description. Ensure that the documentation for Qt is built."); // QTBUG-12522: If there is no description why show an error to the user when qDebug above communications the issue (if it is indeed an issue at all) when demos are built? 90 96 for (int p = 0; p < int(paragraphs.length()); ++p) { 91 97 description = this->extractTextFromParagraph(paragraphs.item(p)); … … 100 106 { 101 107 return (!text.contains("[") && 102 text.indexOf(QRegExp(QString("(In )?((The|This) )?(%1 )?.*(tutorial|example|demo|application)").arg(this->name), Qt::CaseInsensitive)) != -1); 108 text.indexOf(QRegExp(QString("(In )?((The|This) )?(%1 )?.*(tutorial|example|demo|application)").arg(this->name), 109 Qt::CaseInsensitive)) != -1); 103 110 } 104 111 -
branches/vendor/nokia/qt/current/demos/qtdemo/examplecontent.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/guide.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/guide.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/guidecircle.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/guidecircle.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/guideline.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/guideline.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/headingitem.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/headingitem.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/imageitem.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/imageitem.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/itemcircleanimation.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/itemcircleanimation.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 62 62 virtual ~ItemCircleAnimation(); 63 63 64 // over idden methods:64 // overidden methods: 65 65 QRectF boundingRect() const; 66 66 void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0); -
branches/vendor/nokia/qt/current/demos/qtdemo/letteritem.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/letteritem.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/main.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/mainwindow.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 267 267 if (Colors::showFps){ 268 268 this->fpsLabel = new DemoTextItem(QString("FPS: --"), Colors::buttonFont(), Qt::white, -1, this->scene, 0, DemoTextItem::DYNAMIC_TEXT); 269 this->fpsLabel->setZValue(100 );269 this->fpsLabel->setZValue(100); 270 270 this->fpsLabel->setPos(Colors::stageStartX, 600 - QFontMetricsF(Colors::buttonFont()).height() - 5); 271 271 } 272 272 273 this->companyLogo = new ImageItem(QImage(":/images/trolltech-logo.png"), 1000, 1000, this->scene, 0, true, 0.5f); 274 this->qtLogo = new ImageItem(QImage(":/images/qtlogo_small.png"), 1000, 1000, this->scene, 0, true, 0.5f); 273 this->mainSceneRoot = new QGraphicsWidget(); 274 this->scene->addItem(mainSceneRoot); 275 this->companyLogo = new ImageItem(QImage(":/images/trolltech-logo.png"), 1000, 1000, this->scene, mainSceneRoot, true, 0.5f); 276 this->qtLogo = new ImageItem(QImage(":/images/qtlogo_small.png"), 1000, 1000, this->scene, mainSceneRoot, true, 0.5f); 275 277 this->companyLogo->setZValue(100); 276 278 this->qtLogo->setZValue(100); … … 377 379 QApplication::quit(); 378 380 } 379 else if (event->key() == Qt::Key_ 1){381 else if (event->key() == Qt::Key_1){ 380 382 QString s(""); 381 383 s += "Rendering system: "; … … 387 389 s += "\nAdapt: "; 388 390 s += Colors::noAdapt ? "off" : "on"; 389 s += "\nAdaption occur ed: ";391 s += "\nAdaption occured: "; 390 392 s += Colors::adapted ? "yes" : "no"; 391 393 s += "\nOpenGL version: "; … … 416 418 QMessageBox::information(0, QString("Current configuration"), s); 417 419 } 420 418 421 } 419 422 -
branches/vendor/nokia/qt/current/demos/qtdemo/mainwindow.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 63 63 64 64 QGraphicsScene *scene; 65 66 65 67 bool loop; 66 68 … … 73 75 74 76 protected: 75 // Over idden methods:77 // Overidden methods: 76 78 void showEvent(QShowEvent *event); 77 79 void keyPressEvent(QKeyEvent *event); -
branches/vendor/nokia/qt/current/demos/qtdemo/menucontent.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/menucontent.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/menumanager.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 153 153 this->launchExample(this->currentInfo); 154 154 break; 155 156 157 155 158 case DOCUMENTATION: 156 159 this->showDocInAssistant(this->currentInfo); … … 170 173 this->score->queueMovie(this->currentInfo + " -buttons -out", Score::NEW_ANIMATION_ONLY); 171 174 this->score->queueMovie("back -out", Score::ONLY_IF_VISIBLE); 175 176 172 177 // book-keeping: 173 178 this->currentMenuCode = ROOT; … … 192 197 this->score->queueMovie(this->currentMenuButtons + " -out", Score::FROM_START, Score::LOCK_ITEMS); 193 198 this->score->queueMovie(this->currentInfo + " -out"); 199 200 194 201 // book-keeping: 195 202 this->currentMenuCode = MENU1; … … 209 216 this->score->queueMovie(this->currentInfo + " -out", Score::NEW_ANIMATION_ONLY); 210 217 this->score->queueMovie(this->currentInfo + " -buttons -out", Score::NEW_ANIMATION_ONLY); 218 219 211 220 // book-keeping: 212 221 this->currentMenuCode = MENU2; … … 243 252 this->score->queueMovie(this->currentInfo + " -out", Score::NEW_ANIMATION_ONLY); 244 253 this->score->queueMovie(this->currentInfo + " -buttons -out", Score::NEW_ANIMATION_ONLY); 254 255 245 256 // book-keeping: 246 257 this->currentMenuCode = MENU1; … … 303 314 // was started to activate assistant and bring it to front: 304 315 QTextStream str(&this->assistantProcess); 305 str << "SetSource " << url << QLatin1Char('\ 0') << endl;316 str << "SetSource " << url << QLatin1Char('\') << endl; 306 317 } 307 318 … … 344 355 } 345 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 346 397 void MenuManager::exampleFinished() 347 398 { … … 386 437 level2MenuNode = level2MenuNode.nextSibling(); 387 438 } 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 388 472 } 389 473 … … 393 477 if (this->info.contains(name)) 394 478 qWarning() << "__WARNING: MenuManager::readInfoAboutExample: Demo/example with name" 395 << name << "appears twi ze in the xml-file!__";479 << name << "appears twie in the xml-file!__"; 396 480 397 481 this->info[name]["filename"] = example.attribute("filename"); … … 400 484 this->info[name]["changedirectory"] = example.attribute("changedirectory"); 401 485 this->info[name]["image"] = example.attribute("image"); 486 402 487 } 403 488 … … 434 519 dir.cd(fileName); 435 520 521 436 522 QFile unixFile(dir.path() + "/" + fileName); 437 523 if (unixFile.exists()) return unixFile.fileName(); … … 455 541 456 542 if (category == "demos") 457 return this->helpRootUrl + "demos-" + fileName + ".html";543 return this->helpRootUrl + "demos-" + fileName + ".html"; 458 544 else 459 545 return this->helpRootUrl + dirName.replace("/", "-") + "-" + fileName + ".html"; … … 475 561 QString category = this->info[name]["category"]; 476 562 QString fileName = this->info[name]["filename"]; 563 564 565 477 566 478 567 if (imageName.isEmpty()){ … … 494 583 QString name = el.attribute("name"); 495 584 createMenu(el, MENU1); 496 createInfo(new MenuContentItem(el, this->window->scene, 0), name + " -info");585 createInfo(new MenuContentItem(el, this->window->scene, ), name + " -info"); 497 586 498 587 Movie *menuButtonsIn = this->score->insertMovie(name + " -buttons"); … … 506 595 QString name = el.attribute("name"); 507 596 createMenu(el, MENU2); 508 createInfo(new MenuContentItem(el, this->window->scene, 0), name + " -info");597 createInfo(new MenuContentItem(el, this->window->scene, ), name + " -info"); 509 598 } 510 599 … … 512 601 { 513 602 QString name = el.attribute("name"); 514 createInfo(new ExampleContent(name, this->window->scene, 0), name);603 createInfo(new ExampleContent(name, this->window->scene, ), name); 515 604 516 605 Movie *infoButtonsIn = this->score->insertMovie(name + " -buttons"); … … 519 608 if (el.attribute("executable") != "false") 520 609 createLowRightLeafButton("Launch", 405, LAUNCH, infoButtonsIn, infoButtonsOut, 0); 610 611 521 612 } 522 613 … … 547 638 // create normal menu button 548 639 QString label = currentNode.toElement().attribute("name"); 549 item = new TextButton(label, TextButton::LEFT, type, this->window->scene, 0);640 item = new TextButton(label, TextButton::LEFT, type, this->window->scene, ); 550 641 currentNode = currentNode.nextSibling(); 551 642 … … 647 738 Movie *movieIn, Movie *movieOut, Movie *movieShake, const QString &menuString) 648 739 { 649 TextButton *button = new TextButton(label, TextButton::RIGHT, type, this->window->scene, 0, TextButton::PANEL);740 TextButton *button = new TextButton(label, TextButton::RIGHT, type, this->window->scene, , TextButton::PANEL); 650 741 if (!menuString.isNull()) 651 742 button->setMenuString(menuString); … … 689 780 void MenuManager::createLowRightButton(const QString &label, BUTTON_TYPE type, Movie *movieIn, Movie *movieOut, Movie * /*movieShake*/) 690 781 { 691 TextButton *item = new TextButton(label, TextButton::RIGHT, type, this->window->scene, 0, TextButton::PANEL);782 TextButton *item = new TextButton(label, TextButton::RIGHT, type, this->window->scene, , TextButton::PANEL); 692 783 item->setRecursiveVisible(false); 693 784 item->setZValue(10); … … 716 807 void MenuManager::createLowRightLeafButton(const QString &label, int xOffset, BUTTON_TYPE type, Movie *movieIn, Movie *movieOut, Movie * /*movieShake*/) 717 808 { 718 TextButton *item = new TextButton(label, TextButton::RIGHT, type, this->window->scene, 0, TextButton::PANEL);809 TextButton *item = new TextButton(label, TextButton::RIGHT, type, this->window->scene, , TextButton::PANEL); 719 810 item->setRecursiveVisible(false); 720 811 item->setZValue(10); … … 832 923 float yOffset = 450.0f; 833 924 834 this->upButton = new TextButton("", TextButton::LEFT, MenuManager::UP, this->window->scene, 0, TextButton::UP);925 this->upButton = new TextButton("", TextButton::LEFT, MenuManager::UP, this->window->scene, , TextButton::UP); 835 926 this->upButton->prepare(); 836 927 this->upButton->setPos(xOffset, yOffset); 837 928 this->upButton->setState(TextButton::DISABLED); 838 929 839 this->downButton = new TextButton("", TextButton::LEFT, MenuManager::DOWN, this->window->scene, 0, TextButton::DOWN);930 this->downButton = new TextButton("", TextButton::LEFT, MenuManager::DOWN, this->window->scene, , TextButton::DOWN); 840 931 this->downButton->prepare(); 841 932 this->downButton->setPos(xOffset + 10 + this->downButton->sceneBoundingRect().width(), yOffset); -
branches/vendor/nokia/qt/current/demos/qtdemo/menumanager.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 46 46 #include <QtXml> 47 47 #include <QtHelp/QHelpEngineCore> 48 49 50 48 51 49 52 #include "score.h" … … 62 65 63 66 public: 64 enum BUTTON_TYPE {ROOT, MENU1, MENU2, LAUNCH, DOCUMENTATION, QUIT, FULLSCREEN, UP, DOWN, BACK };67 enum BUTTON_TYPE {ROOT, MENU1, MENU2, LAUNCH, DOCUMENTATION, QUIT, FULLSCREEN, UP, DOWN, BACK}; 65 68 66 69 // singleton pattern: … … 84 87 int currentMenuCode; 85 88 89 90 91 92 93 86 94 private slots: 87 95 void exampleFinished(); 88 96 void exampleError(QProcess::ProcessError error); 97 98 89 99 90 100 private: … … 101 111 void showDocInAssistant(const QString &docFile); 102 112 void launchExample(const QString &uniqueName); 113 103 114 104 115 void createMenu(const QDomElement &category, BUTTON_TYPE type); … … 129 140 TextButton *upButton; 130 141 TextButton *downButton; 142 131 143 }; 132 144 -
branches/vendor/nokia/qt/current/demos/qtdemo/qtdemo.pro
r556 r844 1 CONFIG += assistanthelp x11inc1 CONFIG += help x11inc 2 2 TARGET = qtdemo 3 3 DEMO_DESTDIR = $$QT_BUILD_TREE 4 4 isEmpty(DEMO_DESTDIR):DEMO_DESTDIR=../.. 5 5 DESTDIR = $$DEMO_DESTDIR/bin 6 OBJECTS_DIR = .obj7 MOC_DIR = .moc8 6 INSTALLS += target sources 9 7 … … 14 12 DEFINES += QT_OPENGL_SUPPORT 15 13 QT += opengl 14 15 16 17 16 18 } 17 19 … … 77 79 sources.path = $$[QT_INSTALL_DEMOS]/qtdemo 78 80 81 82 -
branches/vendor/nokia/qt/current/demos/qtdemo/qtdemo.qrc
r2 r844 1 <!DOCTYPE RCC><RCC version="1.0"> 2 <qresource prefix="/"> 3 <file>xml/examples.xml</file> 4 <file>images/qtlogo_small.png</file> 5 <file>images/trolltech-logo.png</file> 6 <file>images/demobg.png</file> 7 </qresource> 1 <RCC> 2 <qresource prefix="/"> 3 <file>xml/examples.xml</file> 4 <file>images/qtlogo_small.png</file> 5 <file>images/trolltech-logo.png</file> 6 <file>images/demobg.png</file> 7 </qresource> 8 <qresource prefix="/qml" lang="qml"> 9 <file>qmlShell.qml</file> 10 </qresource> 8 11 </RCC> -
branches/vendor/nokia/qt/current/demos/qtdemo/qtdemo.rc
r649 r844 19 19 VALUE "FileDescription", "Qt Examples and Demos" 20 20 VALUE "FileVersion", "1.0.0.0" 21 VALUE "LegalCopyright", "Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies)."21 VALUE "LegalCopyright", "Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies)." 22 22 VALUE "InternalName", "qtdemo" 23 23 VALUE "OriginalFilename", "qtdemo.exe" -
branches/vendor/nokia/qt/current/demos/qtdemo/scanitem.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/scanitem.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/score.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/score.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/textbutton.cpp
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) -
branches/vendor/nokia/qt/current/demos/qtdemo/textbutton.h
r649 r844 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 62 62 virtual ~TextButton(); 63 63 64 // over idden methods:64 // overidden methods: 65 65 virtual QRectF boundingRect() const; 66 66 virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0){}; -
branches/vendor/nokia/qt/current/demos/qtdemo/xml/examples.xml
r767 r844 2 2 <categories name="Qt Examples and Demos"> 3 3 <demos dirname="." docname="demos" name="Demonstrations"> 4 5 4 6 <example filename="affine" name="Affine Transformations" /> 5 <example filename="arthurplugin" name="Arthur Plugin" executable="false" />6 7 <example filename="composition" name="Composition Modes" /> 7 8 <example filename="gradients" name="Gradients" /> 8 9 <example filename="pathstroke" name="Path Stroking" /> 10 11 12 13 14 15 16 17 18 19 20 21 9 22 <example filename="deform" name="Vector Deformation" /> 10 23 <example filename="books" name="Books" /> … … 12 25 <example filename="spreadsheet" name="Spreadsheet" /> 13 26 <example filename="sqlbrowser" name="SQL Browser" /> 14 <example filename="textedit" name="Text Edit" /> 15 <example filename="chip" name="40000 Chips" /> 16 <example filename="embeddeddialogs" name="Embedded Dialogs" /> 17 <example filename="interview" name="Interview" /> 18 <example filename="browser" name="Browser" /> 19 <example filename="qmediaplayer" name="Media Player" /> 20 <example filename="boxes" name="Boxes" /> 21 <example filename="sub-attaq" name="Sub-attaq" /> 22 <example filename="spectrum" name="Spectrum Analyzer" /> 27 <example filename="arthurplugin" name="Arthur Plugin" executable="false" /> 28 23 29 </demos> 24 30 <category dirname="animation" name="Animation Framework"> … … 35 41 <example filename="runfunction" name="Run Function" executable="false"/> 36 42 <example filename="wordcount" name="Word Count" executable="false" /> 43 44 45 46 47 48 49 37 50 </category> 38 51 <category dirname="designer" name="Qt Designer"> … … 116 129 <example filename="menus" name="Menus" /> 117 130 <example filename="recentfiles" name="Recent Files" /> 131 132 133 134 135 136 137 138 139 140 118 141 </category> 119 142 <category dirname="network" name="Networking">
Note:
See TracChangeset
for help on using the changeset viewer.
