diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-19 18:00:17 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-19 18:00:17 (GMT) |
commit | e7989aeb09f7c597edf3498183bd97bd0122382b (patch) | |
tree | f57f87ba41e19f60e15cb7be8169d1d6148617e1 /tools | |
parent | aa9211937ff38c0fffa55bc879130b33f03865ff (diff) | |
parent | 20befffe67104368f527bab871fec17c33d58977 (diff) | |
download | Qt-e7989aeb09f7c597edf3498183bd97bd0122382b.zip Qt-e7989aeb09f7c597edf3498183bd97bd0122382b.tar.gz Qt-e7989aeb09f7c597edf3498183bd97bd0122382b.tar.bz2 |
Merge branch 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (568 commits)
Fixed tst_compilerwarnings test failure due to icecc node failures.
QNAM HTTP: Remove dead code
qmake/MinGw: Link statically.
Updated WebKit to cacbdf18fc917122834042d77a9164a490aafde4
Doc: fix typo
QCompleter: fix misuse of QMap that can lead to crashes
Compile with Gcc 4.1
Fix a small typo in assistant manual: hompage -> homepage
qmake: added possibility to specify the type of an install target
Print icon in doc pages has no effect.
Assistant has unnecessary repaints when expand/collapse selected node.
Compile fixes.
re-add overriding of tool paths to configure
Optimized pixmapcache key generation for icons and styles
Changelog: Added Designer/uic3 changes for 4.7.0.
Move xmldata example into rssnews demo.
Move Q_ENUMS to start of class declaration
Restructure QDeclarativeAbstractBinding destructor
Don't call pure virtual method in ~QDeclarativeAbstractBinding()
Fix examples autotest when compiled without webkit or xmlpatterns
...
Diffstat (limited to 'tools')
38 files changed, 1221 insertions, 1198 deletions
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp index edf7a50..b6fa159 100644 --- a/tools/assistant/tools/assistant/centralwidget.cpp +++ b/tools/assistant/tools/assistant/centralwidget.cpp @@ -466,6 +466,7 @@ void CentralWidget::connectSignals(HelpViewer *page) SLOT(handleSourceChanged(QUrl))); connect(page, SIGNAL(highlighted(QString)), this, SIGNAL(highlighted(QString))); + connect(page, SIGNAL(printRequested()), this, SLOT(print())); } bool CentralWidget::eventFilter(QObject *object, QEvent *e) diff --git a/tools/assistant/tools/assistant/contentwindow.cpp b/tools/assistant/tools/assistant/contentwindow.cpp index 3234980..d966cf0 100644 --- a/tools/assistant/tools/assistant/contentwindow.cpp +++ b/tools/assistant/tools/assistant/contentwindow.cpp @@ -135,11 +135,13 @@ bool ContentWindow::eventFilter(QObject *o, QEvent *e) if (m_contentWidget && o == m_contentWidget->viewport() && e->type() == QEvent::MouseButtonRelease) { QMouseEvent *me = static_cast<QMouseEvent*>(e); - QModelIndex index = m_contentWidget->indexAt(me->pos()); - QItemSelectionModel *sm = m_contentWidget->selectionModel(); + const QModelIndex &index = m_contentWidget->indexAt(me->pos()); + if (!index.isValid()) + return QWidget::eventFilter(o, e); - Qt::MouseButtons button = me->button(); - if (index.isValid() && (sm && sm->isSelected(index))) { + const Qt::MouseButtons button = me->button(); + QItemSelectionModel *sm = m_contentWidget->selectionModel(); + if (sm->isSelected(index)) { if ((button == Qt::LeftButton && (me->modifiers() & Qt::ControlModifier)) || (button == Qt::MidButton)) { QHelpContentModel *contentModel = @@ -191,9 +193,11 @@ void ContentWindow::itemClicked(const QModelIndex &index) qobject_cast<QHelpContentModel*>(m_contentWidget->model()); if (contentModel) { - QHelpContentItem *itm = contentModel->contentItemAt(index); - if (itm) - emit linkActivated(itm->url()); + if (QHelpContentItem *itm = contentModel->contentItemAt(index)) { + const QUrl &url = itm->url(); + if (url != CentralWidget::instance()->currentSource()) + emit linkActivated(url); + } } } diff --git a/tools/assistant/tools/assistant/helpviewer.h b/tools/assistant/tools/assistant/helpviewer.h index d881545..1f897d9 100644 --- a/tools/assistant/tools/assistant/helpviewer.h +++ b/tools/assistant/tools/assistant/helpviewer.h @@ -125,6 +125,7 @@ signals: void forwardAvailable(bool enabled); void backwardAvailable(bool enabled); void highlighted(const QString &link); + void printRequested(); #else void loadFinished(bool finished); #endif diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp index f9c8161..869789b 100644 --- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp +++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp @@ -271,6 +271,7 @@ HelpViewer::HelpViewer(qreal zoom, QWidget *parent) connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl))); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool))); connect(this, SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged())); + connect(page(), SIGNAL(printRequested(QWebFrame*)), this, SIGNAL(printRequested())); setFont(viewerFont()); setTextSizeMultiplier(zoom == 0.0 ? 1.0 : zoom); diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index c0cb034..8ce2cce 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2393,7 +2393,7 @@ void Configure::generateBuildKey() + buildSymbianKey + "\"\n" "#else\n" // Debug builds - "# if (defined(_DEBUG) || defined(DEBUG))\n" + "# if (!QT_NO_DEBUG)\n" "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n" + build64Key.arg("debug") + "\"\n" "# else\n" @@ -3477,7 +3477,7 @@ void Configure::displayConfig() cout << "NOTE: When linking against OpenSSL, you can override the default" << endl; cout << "library names through OPENSSL_LIBS." << endl; cout << "For example:" << endl; - cout << " configure -openssl-linked OPENSSL_LIBS='-lssleay32 -llibeay32'" << endl; + cout << " configure -openssl-linked OPENSSL_LIBS=\"-lssleay32 -llibeay32\"" << endl; } if( dictionary[ "ZLIB_FORCED" ] == "yes" ) { QString which_zlib = "supplied"; diff --git a/tools/designer/src/designer/qdesigner_actions.cpp b/tools/designer/src/designer/qdesigner_actions.cpp index a593a76..86b6214 100644 --- a/tools/designer/src/designer/qdesigner_actions.cpp +++ b/tools/designer/src/designer/qdesigner_actions.cpp @@ -347,6 +347,7 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench) connect(m_editWidgetsAction, SIGNAL(triggered()), this, SLOT(editWidgetsSlot())); m_editWidgetsAction->setChecked(true); m_editWidgetsAction->setEnabled(false); + m_editWidgetsAction->setProperty(QDesignerActions::defaultToolbarPropertyName, true); m_toolActions->addAction(m_editWidgetsAction); connect(formWindowManager, SIGNAL(activeFormWindowChanged(QDesignerFormWindowInterface*)), diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index a0cd560..5495e34 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -599,7 +599,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, generateAnnotatedList(relative, marker, nonCompatClasses); } else if (atom->string() == "classes") { - generateCompactList(relative, marker, nonCompatClasses); + generateCompactList(relative, marker, nonCompatClasses, true); } else if (atom->string().contains("classesbymodule")) { QString arg = atom->string().trimmed(); @@ -647,10 +647,10 @@ int HtmlGenerator::generateAtom(const Atom *atom, generateClassHierarchy(relative, marker, nonCompatClasses); } else if (atom->string() == "compatclasses") { - generateCompactList(relative, marker, compatClasses); + generateCompactList(relative, marker, compatClasses, false); } else if (atom->string() == "obsoleteclasses") { - generateCompactList(relative, marker, obsoleteClasses); + generateCompactList(relative, marker, obsoleteClasses, false); } else if (atom->string() == "functionindex") { generateFunctionIndex(relative, marker); @@ -659,10 +659,10 @@ int HtmlGenerator::generateAtom(const Atom *atom, generateLegaleseList(relative, marker); } else if (atom->string() == "mainclasses") { - generateCompactList(relative, marker, mainClasses); + generateCompactList(relative, marker, mainClasses, true); } else if (atom->string() == "services") { - generateCompactList(relative, marker, serviceClasses); + generateCompactList(relative, marker, serviceClasses, false); } else if (atom->string() == "overviews") { generateOverviewList(relative, marker); @@ -802,9 +802,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, << "\"></a>\n"; out() << "<h3>" << protectEnc((*s).name) << "</h3>\n"; if (idx == Class) - generateCompactList(0, marker, ncmap.value(), QString("Q")); + generateCompactList(0, marker, ncmap.value(), false, QString("Q")); else if (idx == QmlClass) - generateCompactList(0, marker, nqcmap.value(), QString("Q")); + generateCompactList(0, marker, nqcmap.value(), false, QString("Q")); else if (idx == MemberFunction) { ParentMaps parentmaps; ParentMaps::iterator pmap; @@ -830,7 +830,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "</a>" << ":</p>\n"; generateSection(nlist, 0, marker, CodeMarker::Summary); - out() << "<br />"; + out() << "<br/>"; ++pmap; } } @@ -876,7 +876,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "</div>"; break; case Atom::LineBreak: - out() << "<br />"; + out() << "<br/>"; break; case Atom::Link: { @@ -912,8 +912,14 @@ int HtmlGenerator::generateAtom(const Atom *atom, else if (atom->string() == ATOM_LIST_VALUE) { threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom); if (threeColumnEnumValueTable) { - out() << "<table class=\"valuelist\">" - << "<tr><th>Constant</th>" + out() << "<table class=\"valuelist\">"; + // << "<tr>" + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd\">"; + else + out() << "<tr class=\"even\">"; + + out() << "<tr><th>Constant</th>" << "<th>Value</th>" << "<th>Description</th></tr>\n"; } @@ -926,7 +932,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "<ol type="; if (atom->string() == ATOM_LIST_UPPERALPHA) { out() << "\"A\""; - } + } /* why type? */ else if (atom->string() == ATOM_LIST_LOWERALPHA) { out() << "\"a\""; } @@ -956,7 +962,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "<tr><td class=\"topAlign\"><tt>" << protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(), relative))) - << "</tt></td><td class=\"centerAlign topAlign\">"; + << "</tt></td><td class=\" topAlign\">"; QString itemValue; if (relative->type() == Node::Enum) { @@ -1093,13 +1099,13 @@ int HtmlGenerator::generateAtom(const Atom *atom, } if (!atom->string().isEmpty()) { if (atom->string().contains("%")) - out() << "<table class=\"generic centerAlign\" width=\"" << atom->string() << "\">\n "; + out() << "<table class=\"generic\">\n "; // width=\"" << atom->string() << "\">\n "; else { - out() << "<table class=\"generic centerAlign\">\n"; + out() << "<table class=\"generic\">\n"; } } else { - out() << "<table class=\"generic centerAlign\">\n"; + out() << "<table class=\"generic\">\n"; } numTableRows = 0; break; @@ -1143,7 +1149,10 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << " colspan=\"" << spans.at(0) << "\""; if (spans.at(1) != "1") out() << " rowspan=\"" << spans.at(1) << "\""; + if (inTableHeader) out() << ">"; + else + out() << "><p>"; } if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; @@ -1153,7 +1162,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, if (inTableHeader) out() << "</th>"; else - out() << "</td>"; + out() << "</p></td>"; if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; break; @@ -1243,6 +1252,8 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" << Atom(Atom::LineBreak); +#if 0 + // No longer used because the modeule name is a breadcrumb. QString fixedModule = inner->moduleName(); if (fixedModule == "Qt3SupportLight") fixedModule = "Qt3Support"; @@ -1263,6 +1274,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, subtitleText << "]"; } } +#endif generateHeader(title, inner, marker); sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); @@ -1585,7 +1597,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) NodeList::ConstIterator m = (*s).members.begin(); while (m != (*s).members.end()) { generateDetailedQmlMember(*m, fake, marker); - out() << "<br />\n"; + out() << "<br/>\n"; fakeSection.keywords += qMakePair((*m)->name(), linkForNode(*m,0)); ++m; @@ -1739,6 +1751,9 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title, } } else if (node->subType() == Node::QmlClass) { + out() << " <li><a href=\"qdeclarativeelements.html\">QML Elements</a></li>"; + out() << " <li><a href=\"" << fn->name() << "\">" << title + << "</a></li>"; } else if (node->subType() == Node::Example) { out() << " <li><a href=\"examples.html\">All Examples</a></li>"; @@ -1788,27 +1803,14 @@ void HtmlGenerator::generateHeader(const QString& title, //out() << " <title>Qt Reference Documentation</title>"; out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n"; - out() << " <!--[if IE]>\n"; - out() << " <meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n"; - out() << " <meta http-equiv=\"imagetoolbar\" content=\"no\">\n"; - out() << " <![endif]-->\n"; - out() << " <!--[if lt IE 7]>\n"; - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">\n"; - out() << " <![endif]-->\n"; - out() << " <!--[if IE 7]>\n"; - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">\n"; - out() << " <![endif]-->\n"; - out() << " <!--[if IE 8]>\n"; - out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n"; - out() << " <![endif]-->\n"; out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n"; out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; out() << "</head>\n"; if (offlineDocs) - out() << "<body class=\"offline\">\n"; + out() << "<body class=\"offline\" onload=\"CheckEmptyAndLoadList();\">\n"; else - out() << "<body class=\"\">\n"; + out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n"; #ifdef GENERATE_MAC_REFS if (mainPage) @@ -1831,18 +1833,16 @@ void HtmlGenerator::generateTitle(const QString& title, CodeMarker *marker) { if (!title.isEmpty()) - out() << "<h1 class=\"title\">" << protectEnc(title); + out() << "<h1 class=\"title\">" << protectEnc(title) << "</h1>\n"; if (!subTitle.isEmpty()) { - out() << "<br />"; - if (subTitleSize == SmallSubTitle) - out() << "<span class=\"small-subtitle\">"; + out() << "<span"; + if (subTitleSize == SmallSubTitle) + out() << " class=\"small-subtitle\">"; else - out() << "<span class=\"subtitle\">"; + out() << " class=\"subtitle\">"; generateText(subTitle, relative, marker); out() << "</span>\n"; } - if (!title.isEmpty()) - out() << "</h1>\n"; } void HtmlGenerator::generateFooter(const Node *node) @@ -1851,9 +1851,10 @@ void HtmlGenerator::generateFooter(const Node *node) out() << "<p>\n" << navigationLinks << "</p>\n"; out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version()) - << QString(address).replace("\\" + COMMAND_VERSION, myTree->version()) - << "</body>\n" - "</html>\n"; + << QString(address).replace("\\" + COMMAND_VERSION, myTree->version()); + out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"; + out() << "</body>\n"; + out() << "</html>\n"; } void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker, @@ -1874,7 +1875,7 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker, void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) { if (!inner->includes().isEmpty()) { - out() << "<pre clas=\"highlightedCode\">" + out() << "<pre class=\"highlightedCode\">" << trimmedTrailing(highlightedCode(indent(codeIndent, marker->markedUpIncludes(inner->includes())), marker,inner)) @@ -2278,22 +2279,22 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative, out() << "<tr class=\"odd topAlign\">"; else out() << "<tr class=\"even topAlign\">"; - out() << "<th>"; + out() << "<td><p>"; generateFullName(node, relative, marker); - out() << "</th>"; + out() << "</p></td>"; if (!(node->type() == Node::Fake)) { Text brief = node->doc().trimmedBriefText(name); if (!brief.isEmpty()) { - out() << "<td>"; + out() << "<td><p>"; generateText(brief, node, marker); - out() << "</td>"; + out() << "</p></td>"; } } else { - out() << "<td>"; + out() << "<td><p>"; out() << protectEnc(node->doc().briefText().toString()); - out() << "</td>"; + out() << "</p></td>"; } out() << "</tr>\n"; } @@ -2312,10 +2313,11 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative, void HtmlGenerator::generateCompactList(const Node *relative, CodeMarker *marker, const NodeMap &classMap, + bool includeAlphabet, QString commonPrefix) { const int NumParagraphs = 37; // '0' to '9', 'A' to 'Z', '_' - const int NumColumns = 3; // number of columns in the result + const int NumColumns = 2; // number of columns in the result if (classMap.isEmpty()) return; @@ -2384,6 +2386,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, */ NodeMap paragraph[NumParagraphs+1]; QString paragraphName[NumParagraphs+1]; + QSet<char> usedParagraphNames; NodeMap::ConstIterator c = classMap.begin(); while (c != classMap.end()) { @@ -2407,6 +2410,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, } paragraphName[paragraphNo] = key[0].toUpper(); + usedParagraphNames.insert(key[0].toLower().cell()); paragraph[paragraphNo].insert(key, c.value()); ++c; } @@ -2426,15 +2430,15 @@ void HtmlGenerator::generateCompactList(const Node *relative, for (j = 0; j < NumParagraphs; j++) // j = 0..36 paragraphOffset[j + 1] = paragraphOffset[j] + paragraph[j].count(); - int firstOffset[NumColumns + 1]; // 4 + 1 - int currentOffset[NumColumns]; // 4 - int currentParagraphNo[NumColumns]; // 4 - int currentOffsetInParagraph[NumColumns]; // 4 + int firstOffset[NumColumns + 1]; + int currentOffset[NumColumns]; + int currentParagraphNo[NumColumns]; + int currentOffsetInParagraph[NumColumns]; int numRows = (classMap.count() + NumColumns - 1) / NumColumns; int curParagNo = 0; - for (i = 0; i < NumColumns; i++) { // i = 0..3 + for (i = 0; i < NumColumns; i++) { firstOffset[i] = qMin(i * numRows, classMap.size()); currentOffset[i] = firstOffset[i]; @@ -2450,13 +2454,29 @@ void HtmlGenerator::generateCompactList(const Node *relative, } firstOffset[NumColumns] = classMap.count(); + if (includeAlphabet) { + out() << "<p class=\"centerAlign functionIndex\"><b>"; + for (int i = 0; i < 26; i++) { + QChar ch('a' + i); + if (usedParagraphNames.contains(char('a' + i))) + out() << QString("<a href=\"#%1\">%2</a> ").arg(ch).arg(ch.toUpper()); + } + out() << "</b></p>\n"; + } + out() << "<table class=\"generic\">\n"; for (k = 0; k < numRows; k++) { - out() << "<tr>\n"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd topAlign\">"; + else + out() << "<tr class=\"even topAlign\">"; + //break; + +// out() << "<tr>\n"; for (i = 0; i < NumColumns; i++) { if (currentOffset[i] >= firstOffset[i + 1]) { // this column is finished - out() << "<td>\n</td>\n"; + out() << "<td>\n</td>\n"; // check why? } else { while ((currentParagraphNo[i] < NumParagraphs) && @@ -2471,16 +2491,20 @@ void HtmlGenerator::generateCompactList(const Node *relative, currentParagraphNo[i] = NumParagraphs - 1; } #endif - out() << "<td class=\"rightAlign\">"; + out() << "<th class=\"rightAlign alphaChar\"><p>"; if (currentOffsetInParagraph[i] == 0) { // start a new paragraph + if (includeAlphabet) { + QChar c = paragraphName[currentParagraphNo[i]][0].toLower(); + out() << QString("<a name=\"%1\"></a>").arg(c); + } out() << "<b>" << paragraphName[currentParagraphNo[i]] - << " </b>"; + << "</b>"; } - out() << "</td>\n"; + out() << "</p></th>\n"; - out() << "<td>"; + out() << "<td><p>"; if ((currentParagraphNo[i] < NumParagraphs) && !paragraphName[currentParagraphNo[i]].isEmpty()) { NodeMap::Iterator it; @@ -2506,7 +2530,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, out() << ")"; } } - out() << "</td>\n"; + out() << "</p></td>\n"; currentOffset[i]++; currentOffsetInParagraph[i]++; @@ -2646,7 +2670,7 @@ void HtmlGenerator::generateQmlItem(const Node *node, if (summary) marked.replace("@name>", "b>"); - marked.replace("<@extra>", " <tt>"); + marked.replace("<@extra>", "<tt>"); marked.replace("</@extra>", "</tt>"); if (summary) { @@ -2812,14 +2836,14 @@ void HtmlGenerator::generateSection(const NodeList& nl, else { if (twoColumn && i == (int) (nl.count() + 1) / 2) out() << "</ul></td><td class=\"topAlign\"><ul>\n"; - out() << "<li><div class=\"fn\">"; + out() << "<li class=\"fn\">"; } generateSynopsis(*m, relative, marker, style, name_alignment); if (name_alignment) out() << "</td></tr>\n"; else - out() << "</div></li>\n"; + out() << "</li>\n"; i++; ++m; } @@ -2873,14 +2897,14 @@ void HtmlGenerator::generateSectionList(const Section& section, else { if (twoColumn && i == (int) (section.members.count() + 1) / 2) out() << "</ul></td><td class=\"topAlign\"><ul>\n"; - out() << "<li><div class=\"fn\">"; + out() << "<li class=\"fn\">"; } generateSynopsis(*m, relative, marker, style, name_alignment); if (name_alignment) out() << "</td></tr>\n"; else - out() << "</div></li>\n"; + out() << "</li>\n"; i++; ++m; } @@ -2908,9 +2932,9 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section, QList<QPair<ClassNode *, int> >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { if (nameAlignment) - out() << "<li><div bar=\"2\" class=\"fn\"></div>"; + out() << "<li class=\"fn\">"; else - out() << "<li><div class=\"fn\"></div>"; + out() << "<li class=\"fn\">"; out() << (*p).second << " "; if ((*p).second == 1) { out() << section.singularMember; @@ -2955,7 +2979,7 @@ void HtmlGenerator::generateSynopsis(const Node *node, extraRegExp.setMinimal(true); marked.replace(extraRegExp, ""); } else { - marked.replace("<@extra>", " <tt>"); + marked.replace("<@extra>", "<tt>"); marked.replace("</@extra>", "</tt>"); } @@ -3151,8 +3175,13 @@ void HtmlGenerator::generateSectionList(const Section& section, twoColumn = (section.members.count() >= 5); } if (twoColumn) - out() << "<table class=\"generic\">\n" - << "<tr><td class=\"topAlign\">"; + out() << "<table class=\"generic\">\n"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd topAlign\">"; + else + out() << "<tr class=\"even topAlign\">"; + +// << "<tr><td class=\"topAlign\">"; out() << "<ul>\n"; int i = 0; @@ -3166,7 +3195,7 @@ void HtmlGenerator::generateSectionList(const Section& section, if (twoColumn && i == (int) (section.members.count() + 1) / 2) out() << "</ul></td><td class=\"topAlign\"><ul>\n"; - out() << "<li><div class=\"fn\"></div>"; + out() << "<li class=\"fn\">"; if (style == CodeMarker::Accessors) out() << "<b>"; generateSynopsis(*m, relative, marker, style); @@ -3194,7 +3223,7 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section, { QList<QPair<ClassNode *, int> >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { - out() << "<li><div bar=\"2\" class=\"fn\"></div>"; + out() << "<li class=\"fn\">"; out() << (*p).second << " "; if ((*p).second == 1) { out() << section.singularMember; @@ -3234,7 +3263,7 @@ void HtmlGenerator::generateSynopsis(const Node *node, extraRegExp.setMinimal(true); marked.replace(extraRegExp, ""); } else { - marked.replace("<@extra>", " <tt>"); + marked.replace("<@extra>", "<tt>"); marked.replace("</@extra>", "</tt>"); } @@ -3764,7 +3793,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node, out() << "<h3 class=\"flags\">"; out() << "<a name=\"" + refForNode(node) + "\"></a>"; generateSynopsis(enume, relative, marker, CodeMarker::Detailed); - out() << "<br />"; + out() << "<br/>"; generateSynopsis(enume->flagsType(), relative, marker, @@ -4359,8 +4388,12 @@ void HtmlGenerator::generateQmlSummary(const Section& section, twoColumn = (count >= 5); } if (twoColumn) - out() << "<table class=\"qmlsummary\">\n" - << "<tr><td class=\"topAlign\">"; + out() << "<table class=\"qmlsummary\">\n"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd topAlign\">"; + else + out() << "<tr class=\"even topAlign\">"; + // << "<tr><td class=\"topAlign\">"; out() << "<ul>\n"; int row = 0; @@ -4368,7 +4401,7 @@ void HtmlGenerator::generateQmlSummary(const Section& section, while (m != section.members.end()) { if (twoColumn && row == (int) (count + 1) / 2) out() << "</ul></td><td class=\"topAlign\"><ul>\n"; - out() << "<li><div class=\"fn\"></div>"; + out() << "<li class=\"fn\">"; generateQmlItem(*m,relative,marker,true); out() << "</li>\n"; row++; @@ -4402,22 +4435,21 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, while (p != qpgn->childNodes().end()) { if ((*p)->type() == Node::QmlProperty) { qpn = static_cast<const QmlPropertyNode*>(*p); - out() << "<tr><td>"; + + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd\">"; + else + out() << "<tr class=\"even\">"; + + out() << "<td><p>"; + //out() << "<tr><td>"; // old out() << "<a name=\"" + refForNode(qpn) + "\"></a>"; if (!qpn->isWritable()) - out() << "<span class=\"qmlreadonly\">read-only </span>"; + out() << "<span class=\"qmlreadonly\">read-only</span>"; if (qpgn->isDefault()) - out() << "<span class=\"qmldefault\">default </span>"; + out() << "<span class=\"qmldefault\">default</span>"; generateQmlItem(qpn, relative, marker, false); out() << "</td></tr>"; - if (qpgn->isDefault()) { - out() << "</table>" - << "</div></div>" - << "<div class=\"qmlitem\">" - << "<div class=\"qmlproto\">" - << "<table class=\"qmlname\">" - << "<tr><td>default</td></tr>"; - } } ++p; } @@ -4428,11 +4460,16 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, const FunctionNode* qsn = static_cast<const FunctionNode*>(node); out() << "<div class=\"qmlproto\">"; out() << "<table class=\"qmlname\">"; - out() << "<tr><td>"; + //out() << "<tr>"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd\">"; + else + out() << "<tr class=\"even\">"; + out() << "<td><p>"; out() << "<a name=\"" + refForNode(qsn) + "\"></a>"; generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false); //generateQmlItem(qsn,relative,marker,false); - out() << "</td></tr>"; + out() << "</p></td></tr>"; out() << "</table>"; out() << "</div>"; } @@ -4440,10 +4477,15 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, const FunctionNode* qmn = static_cast<const FunctionNode*>(node); out() << "<div class=\"qmlproto\">"; out() << "<table class=\"qmlname\">"; - out() << "<tr><td>"; + //out() << "<tr>"; + if (++numTableRows % 2 == 1) + out() << "<tr class=\"odd\">"; + else + out() << "<tr class=\"even\">"; + out() << "<td><p>"; out() << "<a name=\"" + refForNode(qmn) + "\"></a>"; generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false); - out() << "</td></tr>"; + out() << "</p></td></tr>"; out() << "</table>"; out() << "</div>"; } diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index d80cbdb..e060257 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -173,6 +173,7 @@ class HtmlGenerator : public PageGenerator void generateCompactList(const Node *relative, CodeMarker *marker, const NodeMap &classMap, + bool includeAlphabet, QString commonPrefix = QString()); void generateFunctionIndex(const Node *relative, CodeMarker *marker); void generateLegaleseList(const Node *relative, CodeMarker *marker); diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index a2bd948..4ba3a32 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1289,7 +1289,7 @@ QmlClassNode::QmlClassNode(InnerNode *parent, const ClassNode* cn) : FakeNode(parent, name, QmlClass), cnode(cn) { - setTitle((qmlOnly ? "" : "QML ") + name + " Element Reference"); + setTitle((qmlOnly ? "" : "QML ") + name + " Element"); } /*! diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf index 51afb69..15e6d70 100644 --- a/tools/qdoc3/test/assistant.qdocconf +++ b/tools/qdoc3/test/assistant.qdocconf @@ -16,44 +16,26 @@ qhp.Assistant.file = assistant.qhp qhp.Assistant.namespace = com.trolltech.assistant.480 qhp.Assistant.virtualFolder = qdoc qhp.Assistant.indexTitle = Qt Assistant Manual -qhp.Assistant.extraFiles = images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ +qhp.Assistant.extraFiles = images/bg_l.png \ images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ + images/bullet_sq.png \ images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ images/feedbackground.png \ - images/form_bg.png \ images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ style/style.css qhp.Assistant.filterAttributes = qt 4.8.0 tools assistant diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf index 23b6c78..026ae47 100644 --- a/tools/qdoc3/test/designer.qdocconf +++ b/tools/qdoc3/test/designer.qdocconf @@ -16,45 +16,28 @@ qhp.Designer.file = designer.qhp qhp.Designer.namespace = com.trolltech.designer.470 qhp.Designer.virtualFolder = qdoc qhp.Designer.indexTitle = Qt Designer Manual -qhp.Designer.extraFiles = images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ +qhp.Designer.extraFiles = images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ - images/content_bg.png \ images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + scripts/functions.js \ + scripts/jquery.js \ + style/style.css + qhp.Designer.filterAttributes = qt 4.8.0 tools designer qhp.Designer.customFilters.Designer.name = Qt Designer Manual qhp.Designer.customFilters.Designer.filterAttributes = qt tools designer diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf index 4936bc9..aab06e2 100644 --- a/tools/qdoc3/test/linguist.qdocconf +++ b/tools/qdoc3/test/linguist.qdocconf @@ -16,45 +16,28 @@ qhp.Linguist.file = linguist.qhp qhp.Linguist.namespace = com.trolltech.linguist.480 qhp.Linguist.virtualFolder = qdoc qhp.Linguist.indexTitle = Qt Linguist Manual -qhp.Linguist.extraFiles = images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ +qhp.Linguist.extraFiles = images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ - images/content_bg.png \ images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + scripts/functions.js \ + scripts/jquery.js \ + style/style.css + qhp.Linguist.filterAttributes = qt 4.8.0 tools linguist qhp.Linguist.customFilters.Linguist.name = Qt Linguist Manual qhp.Linguist.customFilters.Linguist.filterAttributes = qt tools linguist diff --git a/tools/qdoc3/test/macros.qdocconf b/tools/qdoc3/test/macros.qdocconf index 22db23e..e7a1dbc 100644 --- a/tools/qdoc3/test/macros.qdocconf +++ b/tools/qdoc3/test/macros.qdocconf @@ -18,6 +18,7 @@ macro.ouml.HTML = "ö" macro.QA = "\\e{Qt Assistant}" macro.QD = "\\e{Qt Designer}" macro.QL = "\\e{Qt Linguist}" +macro.QQL = "\\e{Qt QML Launcher}" macro.param = "\\e" macro.raisedaster.HTML = "<sup>*</sup>" macro.rarrow.HTML = "→" diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf index 80050e3..8015f57 100644 --- a/tools/qdoc3/test/qdeclarative.qdocconf +++ b/tools/qdoc3/test/qdeclarative.qdocconf @@ -27,45 +27,27 @@ qhp.Qml.indexTitle = Qml Reference # Files not referenced in any qdoc file # See also extraimages.HTML -qhp.Qml.extraFiles = images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css +qhp.Qml.extraFiles = images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css qhp.Qml.filterAttributes = qt 4.6.0 qtrefdoc qhp.Qml.customFilters.Qt.name = Qt 4.6.0 diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf index 5c7cc29..14d5d19 100644 --- a/tools/qdoc3/test/qmake.qdocconf +++ b/tools/qdoc3/test/qmake.qdocconf @@ -16,45 +16,27 @@ qhp.qmake.file = qmake.qhp qhp.qmake.namespace = com.trolltech.qmake.480 qhp.qmake.virtualFolder = qdoc qhp.qmake.indexTitle = QMake Manual -qhp.qmake.extraFiles = images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css +qhp.qmake.extraFiles = images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css qhp.qmake.filterAttributes = qt 4.8.0 tools qmake qhp.qmake.customFilters.qmake.name = qmake Manual diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index 7165c24..c8331f2 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -22,45 +22,27 @@ qhp.Qt.indexTitle = Qt Reference Documentation # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index 5cbb146..88aeab1 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -30,45 +30,27 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.8.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css language = Cpp diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf index 0426f4d..f3291df 100644 --- a/tools/qdoc3/test/qt-defines.qdocconf +++ b/tools/qdoc3/test/qt-defines.qdocconf @@ -20,37 +20,20 @@ codeindent = 1 # See also qhp.Qt.extraFiles extraimages.HTML = qt-logo \ trolltech-logo \ - api_examples.png \ - bg_ll.png \ - bg_ul_blank.png \ + bg_l.png \ + bg_l_blank.png \ + bg_r.png \ + box_bg.png \ + breadcrumb.png \ bullet_gt.png \ - horBar.png \ - qt_ref_doc.png \ - api_lookup.png \ - bg_ll_blank.png \ - bg_ur.png \ + bullet_dn.png \ bullet_sq.png \ - bullet_dn.png \ - bullet_up.png \ + bullet_up.png \ + feedbackground.png \ + horBar.png \ + page.png \ page_bg.png \ - qt_tools.png \ - api_topics.png \ - bg_lr.png \ - bg_ur_blank.png \ - content_bg.png \ - print.png \ - sep.png \ - bg_l.png \ - bg_r.png \ - box_bg.png \ - feedbackground.png \ - qt_guide.png \ sprites-combined.png \ - bg_l_blank.png \ - bg_ul.png \ - breadcrumb.png \ - form_bg.png \ - qt_icon.png \ taskmenuextension-example.png \ coloreditorfactoryimage.png \ dynamiclayouts-example.png \ diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 447467c..34ddf18 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -31,55 +31,55 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \ " <div class=\"searchlabel\">\n" \ " Search index:</div>\n" \ " <div class=\"search\">\n" \ - " <form id=\"qtdocsearch\" action=\"#\">\n" \ + " <form id=\"qtdocsearch\" action=\"\">\n" \ " <fieldset>\n" \ - " <input type=\"text\" name=\"searchstring\" id=\"searchstring\" value=\"\" onkeyup=\"doSearch(this.value);\" />\n" \ + " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \ " </fieldset>\n" \ " </form>\n" \ " </div>\n" \ " <div class=\"box first bottombar\" id=\"lookup\">\n" \ - " <h2>\n" \ + " <h2><span></span>\n" \ " API Lookup</h2>\n" \ - " <div class=\"list\">\n" \ - " <ul>\n" \ - " <li><a href=\"modules.html\">All modules</a></li>\n" \ - " <li><a href=\"classes.html\">All classes</a></li>\n" \ - " <li><a href=\"functions.html\">All functions</a></li>\n" \ - " <li><a href=\"namespaces.html\">All namespaces</a></li>\n" \ - " <li><a href=\"platform-specific.html\">Platform specifics</a></li>\n" \ - " </ul>\n" \ + " <div id=\"list001\" class=\"list\">\n" \ + " <ul id=\"ul001\" >\n" \ + " <li class=\"defaultLink\"><a href=\"classes.html\">Class index</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"functions.html\">Function index</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global stuff</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \ + " </ul> \n" \ " </div>\n" \ - " <div class=\"live\">\n" \ + " <div id=\"live001\" class=\"live\">\n" \ " </div>\n" \ " </div>\n" \ " <div class=\"box bottombar\" id=\"topics\">\n" \ - " <h2>\n" \ - " API Topics</h2>\n" \ - " <div class=\"list\">\n" \ - " <ul>\n" \ - " <li><a href=\"object.html\">QObject model</a></li>\n" \ - " <li><a href=\"eventsandfilters.html\">Events, signals & slots</a></li>\n" \ - " <li><a href=\"paintsystem.html\">Graphics & Paint system</a></li>\n" \ - " <li><a href=\"declarativeui.html\">Qt Quick</a></li>\n" \ - " <li><a href=\"widgets-and-layouts.html\">Widget style & layout</a></li>\n" \ - " </ul>\n" \ + " <h2><span></span>\n" \ + " Qt Topics</h2>\n" \ + " <div id=\"list002\" class=\"list\">\n" \ + " <ul id=\"ul002\" >\n" \ + " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"declarativeui.html\">Device UI's & Qt Quick</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li>\n" \ + " </ul> \n" \ " </div>\n" \ - " <div class=\"live\">\n" \ + " <div id=\"live002\" class=\"live\">\n" \ " </div>\n" \ " </div>\n" \ " <div class=\"box\" id=\"examples\">\n" \ - " <h2>\n" \ - " API Examples</h2>\n" \ - " <div class=\"list\">\n" \ - " <ul>\n" \ - " <li><a href=\"examples.html\">All examples</a></li>\n" \ - " <li><a href=\"tutorials.html\">All tutorials</a></li>\n" \ - " <li><a href=\"examples.html\">Qt Quick examples</a></li>\n" \ - " <li><a href=\"examples.html\">Desktop examples</a></li>\n" \ - " <li><a href=\"examples.html\">Device examples</a></li>\n" \ - " </ul>\n" \ + " <h2><span></span>\n" \ + " Examples</h2>\n" \ + " <div id=\"list003\" class=\"list\">\n" \ + " <ul id=\"ul003\">\n" \ + " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \ + " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li>\n" \ + " </ul> \n" \ " </div>\n" \ - " <div class=\"live\">\n" \ + " <div id=\"live003\" class=\"live\">\n" \ " </div>\n" \ " </div>\n" \ " </div>\n" \ @@ -98,20 +98,21 @@ HTML.postpostheader = " </ul>\n" \ " <li id=\"medA\" class=\"t_button active\">A</li>\n" \ " <li id=\"bigA\" class=\"t_button\">A</li>\n" \ " <li id=\"print\" class=\"t_button\"><a href=\"javascript:this.print();\">\n" \ - " <img src=\"images/sep.png\" alt=\"\" /><img id=\"printIcon\" src=\"images/print.png\" alt=\"Print this page\" /></a></li>\n" \ + " <span>Print</span></a></li>\n" \ " </ul>\n" \ " </div>\n" \ " </div>\n" \ " <div class=\"content\">\n" -HTML.footer = " </div>\n" \ - " <div class=\"feedback t_button\" onclick=\"\$(\'#feedbackBox\').show();\$(\'#blurpage\').show()\">\n" \ +HTML.footer = " <!-- /div -->\n" \ + " <div class=\"feedback t_button\" onclick=\"\$(\'.bd\').hide();\$(\'.hd\').hide();\$(\'.footer\').hide();\$(\'#feedbackBox\').show();\$(\'#blurpage\').show()\">\n" \ " [+] Documentation Feedback</div>\n" \ " </div>\n" \ " </div>\n" \ " <div class=\"ft\">\n" \ " <span></span>\n" \ " </div>\n" \ + " </div> \n" \ " <div class=\"footer\">\n" \ " <p>\n" \ " <acronym title=\"Copyright\">©</acronym> 2008-2010 Nokia Corporation and/or its\n" \ @@ -123,17 +124,18 @@ HTML.footer = " </div>\n" \ " </div>\n" \ " <div id=\"feedbackBox\">\n" \ " <div id=\"feedcloseX\">\n" \ - " <a href=\"#\" onclick=\"\$(\'#feedbackBox\').hide();\$(\'#blurpage\').hide()\">X</a>\n" \ + " <a href=\"#\" onclick=\"\$(\'.bd\').show();\$(\'.hd\').show();\$(\'.footer\').show();\$(\'#feedbackBox\').hide();\$(\'#blurpage\').hide()\">X</a>\n" \ " </div>\n" \ - " <form action=\"#\">\n" \ - " <textarea id=\"feedbox\" rows=\"5\" cols=\"40\">Please submit you feedback...</textarea>\n" \ - " <input id=\"feedsubmit\" type=\"submit\" onclick=\"\$(\'#feedbackBox\').hide();\$(\'#blurpage\').hide()\"\n" \ - " name=\"feedback\" />\n" \ + " <form id=\"feedform\" action=\"feedback.php\" method=\"get\">\n" \ + " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\">Please submit you feedback...</textarea></p>\n" \ + " <input id=\"page\" name=\"pageVal\" value=\"\$(\'title\').html();\" style=\"display:none;\">\n" \ + " <p><input id=\"feedsubmit\" type=\"submit\" onclick=\"\$(\'.bd\').show();\$(\'.hd\').show();\$(\'.footer\').show();\$(\'#feedbackBox\').hide();\$(\'#blurpage\').hide()\"\n" \ + " name=\"feedback\" /></p>\n" \ " </form>\n" \ " </div>\n" \ " <div id=\"blurpage\">\n" \ " </div>\n" \ - "<script type=\"text/javascript\">\n" \ + "<!-- <script type=\"text/javascript\">\n" \ " var _gaq = _gaq || [];\n" \ " _gaq.push([\'_setAccount\', \'UA-4457116-5\']);\n" \ " _gaq.push([\'_trackPageview\']);\n" \ @@ -142,4 +144,4 @@ HTML.footer = " </div>\n" \ " ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';\n" \ " var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);\n" \ " })();\n" \ - "</script>\n" + "</script> -->\n" diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index 7c0ed86..c5cc401 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -26,45 +26,27 @@ qhp.Qt.indexRoot = # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ + images/bg_l.png \ + images/bg_l_blank.png \ images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ - style/style.css + style/style.css qhp.Qt.filterAttributes = qt 4.8.0 qtrefdoc qhp.Qt.customFilters.Qt.name = Qt 4.8.0 diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf index f6d6fad..0a8d936 100644 --- a/tools/qdoc3/test/qt_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt_zh_CN.qdocconf @@ -32,45 +32,27 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.8.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css language = Cpp diff --git a/tools/qdoc3/test/style/style.css b/tools/qdoc3/test/style/style.css index 1ed49fa..9c290f5 100644 --- a/tools/qdoc3/test/style/style.css +++ b/tools/qdoc3/test/style/style.css @@ -58,6 +58,19 @@ { vertical-align: baseline; } + .heading + { + font: normal 600 16px/1.0 Arial; + padding-bottom: 15px; + } + .subtitle + { + font-size: 13px; + } + .small-subtitle + { + font-size: 13px; + } legend { color: #000000; @@ -73,7 +86,6 @@ { font-size: 100%; } - /* Page style */ html { background-color: #e5e5e5; @@ -92,6 +104,11 @@ { font-style: italic; } + a + { + color: #00732f; + text-decoration: none; + } .header, .footer, .wrapper { min-width: 600px; @@ -106,23 +123,19 @@ { padding-left: 216px; height: 15px; - background: url(../images/bg_ul.png) no-repeat 0 0; + background: url(../images/page.png) no-repeat 0 0; overflow: hidden; } .offline .wrapper .hd { - background: url(../images/bg_ul_blank.png) no-repeat 0 0; + background: url(../images/page.png) no-repeat 0 -15px; } .wrapper .hd span { height: 15px; display: block; - background: url(../images/bg_ur.png) no-repeat 100% 0; overflow: hidden; - } - .offline .wrapper .hd span - { - /* background: url(../images/bg_ur_blank.png) no-repeat 100% 0; */ + background: url(../images/page.png) no-repeat 100% -30px; } .wrapper .bd { @@ -137,18 +150,18 @@ { padding-left: 216px; height: 15px; - background: url(../images/bg_ll.png) no-repeat 0 0; + background: url(../images/page.png) no-repeat 0 -75px; overflow: hidden; } .offline .wrapper .ft { - background: url(../images/bg_ll_blank.png) no-repeat 0 0; + background: url(../images/page.png) no-repeat 0 -90px; } .wrapper .ft span { height: 15px; display: block; - background: url(../images/bg_lr.png) no-repeat 100% 0; + background: url(../images/page.png) no-repeat 100% -60px; overflow: hidden; } .header, .footer @@ -182,186 +195,9 @@ width: 302px; height: 22px; text-indent: -999em; - background: url(../images/header.png) no-repeat 0 0; - } - /* header elements */ - #nav-topright - { - height: 70px; - } - - #nav-topright ul - { - list-style-type: none; - float: right; - width: 370px; - margin-top: 11px; - } - - #nav-topright li - { - display: inline-block; - margin-right: 20px; - float: left; - } - - #nav-topright li.nav-topright-last - { - margin-right: 0; - } - - #nav-topright li a - { - background: transparent url(../images/sprites-combined.png) no-repeat; - height: 18px; - display: block; - overflow: hidden; - text-indent: -9999px; - } - - #nav-topright li.nav-topright-home a - { - width: 65px; - background-position: -2px -91px; - } - - #nav-topright li.nav-topright-home a:hover - { - background-position: -2px -117px; - } - - - #nav-topright li.nav-topright-dev a - { - width: 30px; - background-position: -76px -91px; - } - - #nav-topright li.nav-topright-dev a:hover - { - background-position: -76px -117px; - } - - - #nav-topright li.nav-topright-labs a - { - width: 40px; - background-position: -114px -91px; - } - - #nav-topright li.nav-topright-labs a:hover - { - background-position: -114px -117px; - } - - #nav-topright li.nav-topright-doc a - { - width: 32px; - background-position: -162px -91px; - } - - #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a - { - background-position: -162px -117px; - } - - #nav-topright li.nav-topright-blog a - { - width: 40px; - background-position: -203px -91px; - } - - #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a - { - background-position: -203px -117px; - } - - #nav-topright li.nav-topright-shop a - { - width: 40px; - background-position: -252px -91px; - } - - #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a - { - background-position: -252px -117px; - } - - #nav-logo - { - background: transparent url( "../images/sprites-combined.png" ) no-repeat 0 -225px; - left: -3px; - position: absolute; - width: 75px; - height: 75px; - top: 13px; - } - #nav-logo a - { - width: 75px; - height: 75px; - display: block; - text-indent: -9999px; - overflow: hidden; - } - /* Clearing */ - .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after - { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - /* ^ Clearing */ - - - - .shortCut-topleft-inactive - { - padding-left: 3px; - background: transparent url( "../images/sprites-combined.png" ) no-repeat 0px -58px; - height: 20px; - width: 93px; - } - .shortCut-topleft-inactive span - { - font-variant: normal; - } - #shortCut - { - padding-top: 10px; - font-weight: bolder; - color: #b0adab; - } - #shortCut ul - { - list-style-type: none; - float: left; - width: 347px; - margin-left: 100px; - } - #shortCut li - { - display: inline-block; - margin-right: 25px; - float: left; - white-space: nowrap; - } - #shortCut li a - { - color: #b0adab; - text-decoration: none; - } - #shortCut li a:hover - { - color: #44a51c; - text-decoration: none; + background: url(../images/sprites-combined.png) no-repeat -78px -235px; } - /* end of header elements */ - - /* menu element */ .sidebar { float: left; @@ -369,32 +205,32 @@ width: 200px; font-size: 11px; } - .sidebar a - { - color: #00732f; - text-decoration: none; - } - .offline .sidebar, .offline .feedback + + .offline .sidebar, .offline .feedback, .offline .t_button { display: none; } + .sidebar .searchlabel { padding: 0 0 2px 17px; font: normal bold 11px/1.2 Verdana; } + .sidebar .search { padding: 0 15px 0 16px; } + .sidebar .search form { - width: 167px; - height: 21px; - padding: 2px 0 0 5px; - background: url(../images/form_bg.png) no-repeat 0 0; + background: url(../images/sprites-combined.png) no-repeat -6px -348px; + height:21px; + padding:2px 0 0 5px; + width:167px; } - .sidebar .search form fieldset input#searchstring + + .sidebar .search form input#pageType { width: 158px; height: 19px; @@ -403,32 +239,62 @@ outline: none; font: 13px/1.2 Verdana; } + .sidebar .box { padding: 17px 15px 5px 16px; } + .sidebar .box .first { background-image: none; } + .sidebar .box h2 { font: normal 18px/1.2 Arial; - padding: 15px 0 0 40px; + padding: 0; min-height: 32px; } + .sidebar .box h2 span + { + overflow: hidden; + display: inline-block; + } .sidebar .box#lookup h2 { - background: url(../images/api_lookup.png) no-repeat 0 0; + background-image: none; + } + .sidebar #lookup.box h2 span + { + background: url(../images/sprites-combined.png) no-repeat -6px -311px; + width: 27px; + height: 35px; + margin-right: 13px; } .sidebar .box#topics h2 { - background: url(../images/api_topics.png) no-repeat 0 0; + background-image: none; + } + .sidebar #topics.box h2 span + { + background: url(../images/sprites-combined.png) no-repeat -94px -311px; + width: 27px; + height: 32px; + margin-right: 13px; } .sidebar .box#examples h2 { - background: url(../images/api_examples.png) no-repeat 0 0; + background-image: none; + } + .sidebar #examples.box h2 span + { + background: url(../images/sprites-combined.png) no-repeat -48px -311px; + width: 30px; + height: 31px; + margin-right: 9px; } + .sidebar .box .list { display: block; @@ -443,6 +309,9 @@ { text-decoration: underline; } + .sidebar .box ul + { + } .sidebar .box ul li { padding-left: 12px; @@ -453,23 +322,20 @@ { background: url(../images/box_bg.png) repeat-x 0 bottom; } - /* content elements */ .wrap { - overflow: hidden; + margin: 0 5px 0 208px; + overflow: visible; } .offline .wrap { margin: 0 5px 0 5px; } - /* tool bar */ .wrap .toolbar { background-color: #fafafa; border-bottom: 1px solid #d1d1d1; - height: 20px; - margin-left: 3px; - margin-right: 5px; + height: 20px; position: relative; } .wrap .toolbar .toolblock @@ -487,7 +353,7 @@ { padding: 0 0 10px 21px; right: 5px; - vertical-align: top; + vertical-align: middle; overflow: hidden; } .wrap .toolbar .toolbuttons .active @@ -507,32 +373,56 @@ font-weight: bold; color: #B0ADAB; } - #smallA + + .toolbuttons #print + { + border-left: 1px solid #c5c4c4; + margin-top: 0; + padding-left: 7px; + text-indent: 0; + } + .toolbuttons #print a + { + width: 16px; + height: 16px; + } + + .toolbuttons #print a span + { + width: 16px; + height: 16px; + text-indent: -999em; + display: block; + overflow: hidden; + background: url(../images/sprites-combined.png) no-repeat -137px -311px; + } + + .toolbuttons #smallA { font-size: 10pt; } - #medA + .toolbuttons #medA { font-size: 12pt; } - #bigA + .toolbuttons #bigA { font-size: 14pt; + margin-right: 7px; } + #smallA:hover, #medA:hover, #bigA:hover { color: #00732F; } - #print + + .offline .wrap .breadcrumb { - font-size: 14pt; - line-height: 20pt; } - #printIcon + + .wrap .breadcrumb ul { - margin-left: 5px; } - /* bread crumbs */ .wrap .breadcrumb ul li { float: left; @@ -545,6 +435,10 @@ { font-weight: normal; } + .wrap .breadcrumb ul li a + { + color: #363534; + } .wrap .breadcrumb ul li.first { background-image: none; @@ -554,29 +448,29 @@ .wrap .content { padding: 30px; - position: relative; } - /* text elements */ - .heading + + .wrap .content li { - font: normal 600 16px/1.0 Arial; - padding-bottom: 15px; + padding-left: 12px; + background: url(../images/bullet_sq.png) no-repeat 0 5px; + font: normal 400 10pt/1 Verdana; + color: #44a51c; + margin-bottom: 10px; } - - .subtitle + .content li:hover { - font-size: 13px; + text-decoration: underline; } - .small-subtitle + .offline .wrap .content { - font-size: 13px; + padding-top: 15px; } - + .wrap .content h1 { font: 600 18px/1.2 Arial; - padding-bottom: 15px; } .wrap .content h2 { @@ -588,26 +482,13 @@ } .wrap .content p { - line-height:20px; - padding:10px 5px 10px 5px; + line-height: 20px; + padding: 10px 5px 10px 5px; } .wrap .content ul { padding-left: 25px; } - .wrap .content li - { - padding-left: 12px; - background: url(../images/bullet_sq.png) no-repeat 0 5px; - font: normal 400 10pt/1 Verdana; - margin-bottom: 10px; - line-height: 14px; - } - a - { - color: #00732F; - text-decoration: none; - } a:hover { color: #4c0033; @@ -618,10 +499,6 @@ color: #4c0033; text-decoration: none; } - .offline .wrap .content - { - padding-top: 15px; - } .footer { min-height: 100px; @@ -629,11 +506,15 @@ font: normal 9px/1 Verdana; text-align: center; padding-top: 40px; + background-color: #E6E7E8; + margin: 0; } .feedback { - float: right; - padding-right: 10px; + float: none; + position: absolute; + right: 15px; + bottom: 10px; font: normal 8px/1 Verdana; color: #B0ADAB; } @@ -644,37 +525,223 @@ color: #00732F; text-decoration: underline; } + .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after + { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + #nav-topright + { + height: 70px; + } + + #nav-topright ul + { + list-style-type: none; + float: right; + width: 370px; + margin-top: 11px; + } + + #nav-topright li + { + display: inline-block; + margin-right: 20px; + float: left; + } + + #nav-topright li.nav-topright-last + { + margin-right: 0; + } + + #nav-topright li a + { + background: transparent url(../images/sprites-combined.png) no-repeat; + height: 18px; + display: block; + overflow: hidden; + text-indent: -9999px; + } + + #nav-topright li.nav-topright-home a + { + width: 65px; + background-position: -2px -91px; + } + + #nav-topright li.nav-topright-home a:hover + { + background-position: -2px -117px; + } + + + #nav-topright li.nav-topright-dev a + { + width: 30px; + background-position: -76px -91px; + } + + #nav-topright li.nav-topright-dev a:hover + { + background-position: -76px -117px; + } + + + #nav-topright li.nav-topright-labs a + { + width: 40px; + background-position: -114px -91px; + } + + #nav-topright li.nav-topright-labs a:hover + { + background-position: -114px -117px; + } + + #nav-topright li.nav-topright-doc a + { + width: 32px; + background-position: -162px -91px; + } + + #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a + { + background-position: -162px -117px; + } + + #nav-topright li.nav-topright-blog a + { + width: 40px; + background-position: -203px -91px; + } + + #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a + { + background-position: -203px -117px; + } + + #nav-topright li.nav-topright-shop a + { + width: 40px; + background-position: -252px -91px; + } + + #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a + { + background-position: -252px -117px; + } + + #nav-logo + { + background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px; + left: -3px; + position: absolute; + width: 75px; + height: 75px; + top: 13px; + } + #nav-logo a + { + width: 75px; + height: 75px; + display: block; + text-indent: -9999px; + overflow: hidden; + } + + + .shortCut-topleft-inactive + { + padding-left: 3px; + background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px; + height: 20px; + width: 47px; + } + .shortCut-topleft-inactive span + { + font-variant: normal; + } + #shortCut + { + padding-top: 10px; + font-weight: bolder; + color: #b0adab; + } + #shortCut ul + { + list-style-type: none; + float: left; + width: 347px; + margin-left: 100px; + } + #shortCut li + { + display: inline-block; + margin-right: 25px; + float: left; + white-space: nowrap; + } + #shortCut li a + { + color: #b0adab; + } + #shortCut li a:hover + { + color: #44a51c; + } + hr { - background-color: #e0e0e0; + background-color: #E6E6E6; + border: 1px solid #E6E6E6; height: 1px; width: 100%; text-align: left; margin: 15px 0px 15px 0px; } - + .content .alignedsummary { margin: 15px; } - /* tables */ + pre + { + border: 1px solid #DDDDDD; + margin: 0 20px 10px 10px; + padding: 20px 15px 20px 20px; + overflow-x: auto; + } table, pre { -moz-border-radius: 7px 7px 7px 7px; background-color: #F6F6F6; border: 1px solid #E6E6E6; border-collapse: separate; - font-size: 11px; - min-width: 395px; + font-size: 11px; + /*min-width: 395px;*/ margin-bottom: 25px; + display: inline-block; + } + thead + { + margin-top: 5px; + } + th + { + padding: 3px 15px 3px 15px; + } + td + { + padding: 3px 15px 3px 20px; } - thead{margin-top: 5px;} - th{ padding: 3px 15px 3px 15px;} - td{padding: 3px 15px 3px 20px;} table tr.odd { border-left: 1px solid #E6E6E6; - background-color: #F6F6F6; + background-color: #F6F6F6; color: #66666E; } table tr.even @@ -685,12 +752,13 @@ } table tr.odd:hover { - background-color: #E6E6E6; + background-color: #E6E6E6; } table tr.even:hover { background-color: #E6E6E6; } + span.comment { color: #8B0000; @@ -700,15 +768,7 @@ { color: #254117; } - pre - { - -moz-border-radius:7px 7px 7px 7px; - background-color:#F6F6F6; - border:1px solid #DDDDDD; - margin:0 20px 10px 10px; - padding:20px 15px 20px 20px; - overflow-x:auto; - } + .qmltype { text-align: center; @@ -719,13 +779,28 @@ float: right; color: #254117; } + + .qmldefault + { + float: right; + color: red; + } + + .qmldoc + { + } + + *.qmlitem p + { + } + #feedbackBox { - display:none; - -moz-border-radius:7px 7px 7px 7px; - border:1px solid #DDDDDD; - position:fixed; - top:100px; + display: none; + -moz-border-radius: 7px 7px 7px 7px; + border: 1px solid #DDDDDD; + position: fixed; + top: 100px; left: 33%; height: 190px; width: 400px; @@ -735,27 +810,27 @@ } #feedcloseX a { - display:inline; + display: inline; padding: 5px 5px 0 0; - margin-bottom:3px; + margin-bottom: 3px; color: #363534; - font-weight:600; + font-weight: 600; float: right; text-decoration: none; } + #feedbox - /* here */ { - display:inline; + display: inline; width: 370px; height: 120px; - margin:0px 25px 10px 15px; + margin: 0px 25px 10px 15px; } #feedsubmit { - display:inline; - float:right; - margin:4px 32px 0 0; + display: inline; + float: right; + margin: 4px 32px 0 0; } #blurpage { @@ -771,141 +846,172 @@ } .toc { - float: right; - -moz-border-radius:7px 7px 7px 7px; - background-color:#F6F6F6; - border:1px solid #DDDDDD; - margin:0 20px 10px 10px; - padding:20px 15px 20px 20px; + float: right; + -moz-border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + border: 1px solid #DDDDDD; + margin: 0 20px 10px 10px; + padding: 20px 15px 20px 20px; height: auto; width: 200px; } - .toc ul + .toc h3 { - float: left; - padding: 15px; - + font: 600 12px/1.2 Arial; + } + + .wrap .content .toc ul + { + padding-left: 0px; + } + + + .wrap .content .toc .level2 + { + margin-left: 15px; } - .content .toc li { - font: normal 12px/1.2 Verdana; + font: normal 10px/1.2 Verdana; background: url(../images/bullet_dn.png) no-repeat 0 5px; } - .relpage + .relpage { -moz-border-radius: 7px 7px 7px 7px; border: 1px solid #DDDDDD; padding: 25px 25px; - clear:both; + clear: both; } .relpage ul { float: none; padding: 15px; } - .content .relpage li + .content .relpage li { font: normal 11px/1.2 Verdana; } - /* edit */ h3.fn, span.fn { background-color: #F6F6F6; border-width: 1px; border-style: solid; border-color: #E6E6E6; - font-weight: bold; - /* padding: 6px 0px 6px 10px;*/ - /* margin: 42px 0px 0px 0px;*/ + font-weight: bold; } - /* edit */ - .indexbox - { - width: 100%; - } - .content .indexboxcont li - { - font: normal 600 13px/1 Verdana; - } - /* .indexbox a - { - color: #00732f; - text-decoration: none; - }*/ - .indexbox a:hover, .indexbox a:visited:hover - { - color: #4c0033; - text-decoration: underline; - } - .indexbox a:visited + /* start index box */ + .indexbox { - color: #00732f; - text-decoration: none; + width: 100%; + display:inline-block; } .indexboxcont { display: block; + /* overflow: hidden;*/ } .indexboxbar { - background: transparent url( "../images/horBar.png" ) repeat-x left bottom; + background: transparent url(../images/horBar.png ) repeat-x left bottom; margin-bottom: 25px; + /* background-image: none; + border-bottom: 1px solid #e2e2e2;*/ } .indexboxcont .section { - display: inline-block; + display: inline-block; width: 49%; *width:42%; _width:42%; padding:0 2% 0 1%; vertical-align:top; + } .indexboxcont .indexIcon - { + { width: 11%; *width:18%; _width:18%; overflow:hidden; + } .indexboxcont .section p - { + { padding-top: 20px; padding-bottom: 20px; } - .indexboxcont .sectionlist { display: inline-block; width: 33%; - margin-right: -2px; - vertical-align: top; padding: 0; } - .tricol - { - - } .indexboxcont .sectionlist ul { - padding-left: 15px; margin-bottom: 20px; } -/* + .indexboxcont .sectionlist ul li { line-height: 12px; } -*/ + + .content .indexboxcont li + { + font: normal 600 13px/1 Verdana; + } + + .indexbox a:hover, .indexbox a:visited:hover + { + color: #4c0033; + text-decoration: underline; + } + + .indexbox a:visited + { + color: #00732f; + text-decoration: none; + } + + .indexboxcont:after + { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + + .indexbox .indexIcon span + { + display: block; + } + + .indexbox.guide .indexIcon span + { + width: 96px; + height: 137px; + background: url(../images/sprites-combined.png) no-repeat -5px -376px; + padding: 0; + } + + .indexbox.tools .indexIcon span + { + width: 115px; + height: 137px; + background: url(../images/sprites-combined.png) no-repeat -111px -376px; + padding: 0; + } + .lastcol { display: inline-block; @@ -916,12 +1022,9 @@ .tricol .lastcol { - margin-left:-6px; + margin-left: -6px; } - - /*.toc ul*/ - - /* end page elements */ + /* end indexbox */ } /* end of screen media */ @@ -929,7 +1032,7 @@ @media print { - .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft + input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft { display: none; background: none; diff --git a/tools/qml/Info_mac.plist b/tools/qml/Info_mac.plist index ce4ebe3..80ca6a3 100644 --- a/tools/qml/Info_mac.plist +++ b/tools/qml/Info_mac.plist @@ -2,6 +2,8 @@ <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> <plist version="0.1"> <dict> + <key>CFBundleIconFile</key> + <string>@ICON@</string> <key>CFBundleIdentifier</key> <string>com.nokia.qt.qml</string> <key>CFBundlePackageType</key> diff --git a/tools/qml/content/Browser.qml b/tools/qml/content/Browser.qml index 0912f58..c3a2cc0 100644 --- a/tools/qml/content/Browser.qml +++ b/tools/qml/content/Browser.qml @@ -12,12 +12,12 @@ Rectangle { FolderListModel { id: folders1 nameFilters: [ "*.qml" ] - folder: qmlViewerFolder + folder: qmlLauncherFolder } FolderListModel { id: folders2 nameFilters: [ "*.qml" ] - folder: qmlViewerFolder + folder: qmlLauncherFolder } SystemPalette { id: palette } @@ -62,7 +62,7 @@ Rectangle { if (folders.isFolder(index)) { down(filePath); } else { - qmlViewer.launch(filePath); + qmlLauncher.launch(filePath); } } width: root.width diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp index 9eca4a6..3ae2b5e 100644 --- a/tools/qml/loggerwidget.cpp +++ b/tools/qml/loggerwidget.cpp @@ -42,29 +42,141 @@ #include "loggerwidget.h" #include <qglobal.h> #include <QDebug> +#include <QSettings> +#include <QActionGroup> +#include <QMenu> QT_BEGIN_NAMESPACE LoggerWidget::LoggerWidget(QWidget *parent) : QPlainTextEdit(parent), - m_keepClosed(false) + m_visibilityOrigin(SettingsOrigin) { setAttribute(Qt::WA_QuitOnClose, false); - setWindowTitle(tr("Logger")); + setWindowTitle(tr("Warnings")); + + readSettings(); + setupPreferencesMenu(); } void LoggerWidget::append(const QString &msg) { appendPlainText(msg); - if (!m_keepClosed && !isVisible()) + if (!isVisible() && (defaultVisibility() == AutoShowWarnings)) setVisible(true); } +LoggerWidget::Visibility LoggerWidget::defaultVisibility() const +{ + return m_visibility; +} + +void LoggerWidget::setDefaultVisibility(LoggerWidget::Visibility visibility) +{ + if (m_visibility == visibility) + return; + + m_visibility = visibility; + m_visibilityOrigin = CommandLineOrigin; + + m_preferencesMenu->setEnabled(m_visibilityOrigin == SettingsOrigin); +} + +QMenu *LoggerWidget::preferencesMenu() +{ + return m_preferencesMenu; +} + +QAction *LoggerWidget::showAction() +{ + return m_showWidgetAction; +} + +void LoggerWidget::readSettings() +{ + QSettings settings; + QString warningsPreferences = settings.value("warnings", "hide").toString(); + if (warningsPreferences == "show") { + m_visibility = ShowWarnings; + } else if (warningsPreferences == "hide") { + m_visibility = HideWarnings; + } else { + m_visibility = AutoShowWarnings; + } +} + +void LoggerWidget::saveSettings() +{ + if (m_visibilityOrigin != SettingsOrigin) + return; + + QString value = "autoShow"; + if (defaultVisibility() == ShowWarnings) { + value = "show"; + } else if (defaultVisibility() == HideWarnings) { + value = "hide"; + } + + QSettings settings; + settings.setValue("warnings", value); +} + +void LoggerWidget::warningsPreferenceChanged(QAction *action) +{ + Visibility newSetting = static_cast<Visibility>(action->data().toInt()); + m_visibility = newSetting; + saveSettings(); +} + +void LoggerWidget::showEvent(QShowEvent *event) +{ + QWidget::showEvent(event); + emit opened(); +} + void LoggerWidget::closeEvent(QCloseEvent *event) { - m_keepClosed = true; QWidget::closeEvent(event); + emit closed(); +} + +void LoggerWidget::setupPreferencesMenu() +{ + m_preferencesMenu = new QMenu(tr("Warnings")); + QActionGroup *warnings = new QActionGroup(m_preferencesMenu); + warnings->setExclusive(true); + + connect(warnings, SIGNAL(triggered(QAction*)), this, SLOT(warningsPreferenceChanged(QAction*))); + + QAction *showWarningsPreference = new QAction(tr("Show by default"), m_preferencesMenu); + showWarningsPreference->setCheckable(true); + showWarningsPreference->setData(LoggerWidget::ShowWarnings); + warnings->addAction(showWarningsPreference); + m_preferencesMenu->addAction(showWarningsPreference); + + QAction *hideWarningsPreference = new QAction(tr("Hide by default"), m_preferencesMenu); + hideWarningsPreference->setCheckable(true); + hideWarningsPreference->setData(LoggerWidget::HideWarnings); + warnings->addAction(hideWarningsPreference); + m_preferencesMenu->addAction(hideWarningsPreference); + + QAction *autoWarningsPreference = new QAction(tr("Show for first warning"), m_preferencesMenu); + autoWarningsPreference->setCheckable(true); + autoWarningsPreference->setData(LoggerWidget::AutoShowWarnings); + warnings->addAction(autoWarningsPreference); + m_preferencesMenu->addAction(autoWarningsPreference); + + switch (defaultVisibility()) { + case LoggerWidget::ShowWarnings: + showWarningsPreference->setChecked(true); + break; + case LoggerWidget::HideWarnings: + hideWarningsPreference->setChecked(true); + break; + default: + autoWarningsPreference->setChecked(true); + } } QT_END_NAMESPACE diff --git a/tools/qml/loggerwidget.h b/tools/qml/loggerwidget.h index 5c4a701..fd20c41 100644 --- a/tools/qml/loggerwidget.h +++ b/tools/qml/loggerwidget.h @@ -50,14 +50,44 @@ class LoggerWidget : public QPlainTextEdit { Q_OBJECT public: LoggerWidget(QWidget *parent=0); + + enum Visibility { ShowWarnings, HideWarnings, AutoShowWarnings }; + + Visibility defaultVisibility() const; + void setDefaultVisibility(Visibility visibility); + + QMenu *preferencesMenu(); + QAction *showAction(); + public slots: void append(const QString &msg); + +private slots: + void warningsPreferenceChanged(QAction *action); + void readSettings(); + void saveSettings(); + protected: + void showEvent(QShowEvent *event); void closeEvent(QCloseEvent *event); + +signals: + void opened(); + void closed(); + private: - bool m_keepClosed; + void setupPreferencesMenu(); + + QMenu *m_preferencesMenu; + QAction *m_showWidgetAction; + + enum ConfigOrigin { CommandLineOrigin, SettingsOrigin }; + ConfigOrigin m_visibilityOrigin; + Visibility m_visibility; }; QT_END_NAMESPACE +Q_DECLARE_METATYPE(LoggerWidget::Visibility) + #endif // LOGGERWIDGET_H diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 9ccc3d2..380f5cc 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -54,7 +54,7 @@ QT_USE_NAMESPACE -QtMsgHandler systemMsgOutput; +QtMsgHandler systemMsgOutput = 0; #if defined (Q_OS_SYMBIAN) #include <unistd.h> @@ -86,7 +86,7 @@ QString warnings; void showWarnings() { if (!warnings.isEmpty()) { - QMessageBox::warning(0, QApplication::tr("Qt Declarative UI Runtime"), warnings); + QMessageBox::warning(0, QApplication::tr("Qt QML Launcher"), warnings); } } @@ -118,14 +118,11 @@ void usage() qWarning(" -frameless ............................... run with no window frame"); qWarning(" -maximized................................ run maximized"); qWarning(" -fullscreen............................... run fullscreen"); - qWarning(" -stayontop................................ keep viewer window on top"); - qWarning(" -skin <qvfbskindir> ...................... run with a skin window frame"); - qWarning(" \"list\" for a list of built-ins"); - qWarning(" -resizeview .............................. resize the view, not the skin"); + qWarning(" -stayontop................................ keep launcher window on top"); qWarning(" -sizeviewtorootobject .................... the view resizes to the changes in the content"); qWarning(" -sizerootobjecttoview .................... the content resizes to the changes in the view"); qWarning(" -qmlbrowser .............................. use a QML-based file browser"); - qWarning(" -nolog ................................... do not show log window"); + qWarning(" -warnings [show|hide]..................... show warnings in a separate log window"); qWarning(" -recordfile <output> ..................... set video recording file"); qWarning(" - ImageMagick 'convert' for GIF)"); qWarning(" - png file for raw frames"); @@ -160,14 +157,16 @@ void scriptOptsUsage() qWarning(" testerror ................................ test 'error' property of root item on playback"); qWarning(" snapshot ................................. file being recorded is static,"); qWarning(" only one frame will be recorded or tested"); - qWarning(" exitoncomplete ........................... cleanly exit the viewer on script completion"); - qWarning(" exitonfailure ............................ immediately exit the viewer on script failure"); - qWarning(" saveonexit ............................... save recording on viewer exit"); + qWarning(" exitoncomplete ........................... cleanly exit the launcher on script completion"); + qWarning(" exitonfailure ............................ immediately exit the launcher on script failure"); + qWarning(" saveonexit ............................... save recording on launcher exit"); qWarning(" "); qWarning(" One of record, play or both must be specified."); exit(1); } +enum WarningsConfig { ShowWarnings, HideWarnings, DefaultWarnings }; + int main(int argc, char ** argv) { #if defined (Q_OS_SYMBIAN) @@ -198,7 +197,7 @@ int main(int argc, char ** argv) #endif QApplication app(argc, argv); - app.setApplicationName("QtQmlRuntime"); + app.setApplicationName("QtQmlLauncher"); app.setOrganizationName("Nokia"); app.setOrganizationDomain("nokia.com"); @@ -207,7 +206,6 @@ int main(int argc, char ** argv) QDeclarativeFolderListModel::registerTypes(); bool frameless = false; - bool resizeview = false; QString fileName; double fps = 0; int autorecord_from = 0; @@ -217,7 +215,6 @@ int main(int argc, char ** argv) QStringList recordargs; QStringList imports; QStringList plugins; - QString skin; QString script; QString scriptopts; bool runScript = false; @@ -229,7 +226,9 @@ int main(int argc, char ** argv) bool stayOnTop = false; bool maximized = false; bool useNativeFileBrowser = true; - bool showLogWidget = true; + bool experimentalGestures = false; + + WarningsConfig warningsConfig = DefaultWarnings; bool sizeToView = true; #if defined(Q_OS_SYMBIAN) @@ -248,11 +247,6 @@ int main(int argc, char ** argv) fullScreen = true; } else if (arg == "-stayontop") { stayOnTop = true; - } else if (arg == "-skin") { - if (lastArg) usage(); - skin = QString(argv[++i]); - } else if (arg == "-resizeview") { - resizeview = true; } else if (arg == "-netcache") { if (lastArg) usage(); cache = QString(argv[++i]).toInt(); @@ -281,7 +275,7 @@ int main(int argc, char ** argv) if (lastArg) usage(); app.setStartDragDistance(QString(argv[++i]).toInt()); } else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) { - qWarning("Qt Qml Runtime version %s", QT_VERSION_STR); + qWarning("Qt QML Launcher version %s", QT_VERSION_STR); exit(0); } else if (arg == "-translation") { if (lastArg) usage(); @@ -290,8 +284,16 @@ int main(int argc, char ** argv) useGL = true; } else if (arg == "-qmlbrowser") { useNativeFileBrowser = false; - } else if (arg == "-nolog") { - showLogWidget = false; + } else if (arg == "-warnings") { + if (lastArg) usage(); + QString warningsStr = QString(argv[++i]); + if (warningsStr == QLatin1String("show")) { + warningsConfig = ShowWarnings; + } else if (warningsStr == QLatin1String("hide")) { + warningsConfig = HideWarnings; + } else { + usage(); + } } else if (arg == "-I" || arg == "-L") { if (arg == "-L") qWarning("-L option provided for compatibility only, use -I instead"); @@ -323,6 +325,8 @@ int main(int argc, char ** argv) sizeToView = false; } else if (arg == "-sizerootobjecttoview") { sizeToView = true; + } else if (arg == "-experimentalgestures") { + experimentalGestures = true; } else if (arg[0] != '-') { fileName = arg; } else if (1 || arg == "-help") { @@ -340,13 +344,6 @@ int main(int argc, char ** argv) if (stayOnTop) wflags |= Qt::WindowStaysOnTopHint; -#if !defined(Q_OS_SYMBIAN) - LoggerWidget loggerWidget(0); - if (showLogWidget) { - logger = &loggerWidget; - } -#endif - QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags); if (!scriptopts.isEmpty()) { QStringList options = @@ -389,6 +386,19 @@ int main(int argc, char ** argv) usage(); } +#if !defined(Q_OS_SYMBIAN) + logger = viewer->warningsWidget(); + if (warningsConfig == ShowWarnings) { + logger.data()->setDefaultVisibility(LoggerWidget::ShowWarnings); + logger.data()->show(); + } else if (warningsConfig == HideWarnings){ + logger.data()->setDefaultVisibility(LoggerWidget::HideWarnings); + } +#endif + + if (experimentalGestures) + viewer->enableExperimentalGestures(); + foreach (QString lib, imports) viewer->addLibraryPath(lib); @@ -398,21 +408,10 @@ int main(int argc, char ** argv) viewer->setNetworkCacheSize(cache); viewer->setRecordFile(recordfile); viewer->setSizeToView(sizeToView); - if (resizeview) - viewer->setScaleView(); if (fps>0) viewer->setRecordRate(fps); if (autorecord_to) viewer->setAutoRecord(autorecord_from,autorecord_to); - if (!skin.isEmpty()) { - if (skin == "list") { - foreach (QString s, viewer->builtinSkins()) - qWarning() << qPrintable(s); - exit(0); - } else { - viewer->setSkin(skin); - } - } if (devkeys) viewer->setDeviceKeys(true); viewer->setRecordDither(dither); diff --git a/tools/qml/qdeclarativefolderlistmodel.cpp b/tools/qml/qdeclarativefolderlistmodel.cpp index 5a9d88b..7ac25d6 100644 --- a/tools/qml/qdeclarativefolderlistmodel.cpp +++ b/tools/qml/qdeclarativefolderlistmodel.cpp @@ -256,6 +256,10 @@ void QDeclarativeFolderListModel::setNameFilters(const QStringList &filters) d->model.setNameFilters(d->nameFilters); } +void QDeclarativeFolderListModel::classBegin() +{ +} + void QDeclarativeFolderListModel::componentComplete() { if (!d->folder.isValid() || !QDir().exists(d->folder.toLocalFile())) @@ -340,7 +344,6 @@ void QDeclarativeFolderListModel::removed(const QModelIndex &index, int start, i void QDeclarativeFolderListModel::dataChanged(const QModelIndex &start, const QModelIndex &end) { - qDebug() << "data changed"; if (start.parent() == d->folderIndex) emit itemsChanged(start.row(), end.row() - start.row() + 1, roles()); } diff --git a/tools/qml/qdeclarativefolderlistmodel.h b/tools/qml/qdeclarativefolderlistmodel.h index 57b7fe5..1ecc784 100644 --- a/tools/qml/qdeclarativefolderlistmodel.h +++ b/tools/qml/qdeclarativefolderlistmodel.h @@ -87,6 +87,7 @@ public: QStringList nameFilters() const; void setNameFilters(const QStringList &filters); + virtual void classBegin(); virtual void componentComplete(); Q_INVOKABLE bool isFolder(int index) const; diff --git a/tools/qml/qml.icns b/tools/qml/qml.icns Binary files differnew file mode 100644 index 0000000..c760516 --- /dev/null +++ b/tools/qml/qml.icns diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri index d343c76..a2058c7 100644 --- a/tools/qml/qml.pri +++ b/tools/qml/qml.pri @@ -24,7 +24,11 @@ maemo5 { } else { SOURCES += $$PWD/deviceorientation.cpp } + +symbian { + INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ + LIBS += -lesock -lcommdb -lconnmon -linsock +} + FORMS = $$PWD/recopts.ui \ $$PWD/proxysettings.ui - -include(../shared/deviceskin/deviceskin.pri) diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index b33d48b..6129639 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -32,12 +32,11 @@ wince* { symbian { TARGET.UID3 = 0x20021317 include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) - INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - LIBS += -lesock -lcommdb -lconnmon -linsock TARGET.CAPABILITY = NetworkServices ReadUserData } mac { QMAKE_INFO_PLIST=Info_mac.plist - TARGET=Qml + TARGET="QML Launcher" + ICON=qml.icns } diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 008f163..9700090 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -53,7 +53,6 @@ #include "qdeclarative.h" #include <private/qabstractanimation_p.h> #include <QAbstractAnimation> -#include "deviceskin.h" #include <QSettings> #include <QXmlStreamReader> @@ -66,6 +65,7 @@ #include <QDeclarativeComponent> #include <QWidget> #include <QApplication> +#include <QTranslator> #include <QDir> #include <QTextBrowser> #include <QFile> @@ -167,89 +167,6 @@ private: QWidget *refWidget; }; - -class PreviewDeviceSkin : public DeviceSkin -{ - Q_OBJECT -public: - explicit PreviewDeviceSkin(const DeviceSkinParameters ¶meters, QWidget *parent); - - void setPreview(QWidget *formWidget); - void setPreviewAndScale(QWidget *formWidget); - - void setScreenSize(const QSize& size) - { - QMatrix fit; - fit = fit.scale(qreal(size.width())/m_screenSize.width(), - qreal(size.height())/m_screenSize.height()); - setTransform(fit); - QApplication::syncX(); - } - - QSize standardScreenSize() const { return m_screenSize; } - - QMenu* menu; - -private slots: - void slotSkinKeyPressEvent(int code, const QString& text, bool autorep); - void slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep); - void slotPopupMenu(); - -private: - const QSize m_screenSize; -}; - - -PreviewDeviceSkin::PreviewDeviceSkin(const DeviceSkinParameters ¶meters, QWidget *parent) : - DeviceSkin(parameters, parent), - m_screenSize(parameters.screenSize()) -{ - menu = new QMenu(this); - connect(this, SIGNAL(skinKeyPressEvent(int,QString,bool)), - this, SLOT(slotSkinKeyPressEvent(int,QString,bool))); - connect(this, SIGNAL(skinKeyReleaseEvent(int,QString,bool)), - this, SLOT(slotSkinKeyReleaseEvent(int,QString,bool))); - connect(this, SIGNAL(popupMenu()), this, SLOT(slotPopupMenu())); -} - -void PreviewDeviceSkin::setPreview(QWidget *formWidget) -{ - formWidget->setFixedSize(m_screenSize); - formWidget->setParent(this, Qt::SubWindow); - formWidget->setAutoFillBackground(true); - setView(formWidget); -} - -void PreviewDeviceSkin::setPreviewAndScale(QWidget *formWidget) -{ - setScreenSize(formWidget->sizeHint()); - formWidget->setParent(this, Qt::SubWindow); - formWidget->setAutoFillBackground(true); - setView(formWidget); -} - -void PreviewDeviceSkin::slotSkinKeyPressEvent(int code, const QString& text, bool autorep) -{ - if (QWidget *focusWidget = QApplication::focusWidget()) { - QKeyEvent e(QEvent::KeyPress,code,0,text,autorep); - QApplication::sendEvent(focusWidget, &e); - } - -} - -void PreviewDeviceSkin::slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep) -{ - if (QWidget *focusWidget = QApplication::focusWidget()) { - QKeyEvent e(QEvent::KeyRelease,code,0,text,autorep); - QApplication::sendEvent(focusWidget, &e); - } -} - -void PreviewDeviceSkin::slotPopupMenu() -{ - menu->exec(QCursor::pos()); -} - static struct { const char *name, *args; } ffmpegprofiles[] = { {"Maximum Quality", "-sameq"}, {"High Quality", "-qmax 2"}, @@ -433,7 +350,7 @@ QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent) setupProxy(manager); if (cacheSize > 0) { QNetworkDiskCache *cache = new QNetworkDiskCache; - cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-duiviewer-network-cache")); + cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-launcher-network-cache")); cache->setMaximumCacheSize(cacheSize); manager->setCache(cache); } else { @@ -461,15 +378,19 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags) #else : QWidget(parent, flags) #endif - , frame_stream(0), scaleSkin(true), mb(0) + , loggerWindow(new LoggerWidget()) + , frame_stream(0), mb(0) , portraitOrientation(0), landscapeOrientation(0) - , m_scriptOptions(0), tester(0), useQmlFileBrowser(true) + , showWarningsWindow(0) + , m_scriptOptions(0) + , tester(0) + , useQmlFileBrowser(true) + , translator(0) { QDeclarativeViewer::registerTypes(); - setWindowTitle(tr("Qt Qml Runtime")); + setWindowTitle(tr("Qt QML Launcher")); devicemode = false; - skin = 0; canvas = 0; record_autotime = 0; record_rate = 50; @@ -495,6 +416,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags) } canvas = new QDeclarativeView(this); + canvas->setAttribute(Qt::WA_OpaquePaintEvent); canvas->setAttribute(Qt::WA_NoSystemBackground); @@ -504,6 +426,9 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags) QObject::connect(canvas, SIGNAL(statusChanged(QDeclarativeView::Status)), this, SLOT(statusChanged())); QObject::connect(canvas->engine(), SIGNAL(quit()), QCoreApplication::instance (), SLOT(quit())); + QObject::connect(warningsWidget(), SIGNAL(opened()), this, SLOT(warningsWidgetOpened())); + QObject::connect(warningsWidget(), SIGNAL(closed()), this, SLOT(warningsWidgetClosed())); + if (!(flags & Qt::FramelessWindowHint)) { createMenu(menuBar(),0); setPortrait(); @@ -526,6 +451,8 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags) connect(&autoStartTimer, SIGNAL(triggered()), this, SLOT(autoStartRecording())); connect(&autoStopTimer, SIGNAL(triggered()), this, SLOT(autoStopRecording())); connect(&recordTimer, SIGNAL(triggered()), this, SLOT(recordFrame())); + connect(DeviceOrientation::instance(), SIGNAL(orientationChanged()), + this, SLOT(orientationChanged()), Qt::QueuedConnection); autoStartTimer.setRunning(false); autoStopTimer.setRunning(false); recordTimer.setRunning(false); @@ -534,10 +461,21 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags) QDeclarativeViewer::~QDeclarativeViewer() { + delete loggerWindow; canvas->engine()->setNetworkAccessManagerFactory(0); delete namFactory; } +void QDeclarativeViewer::enableExperimentalGestures() +{ + canvas->viewport()->grabGesture(Qt::TapGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent); + canvas->viewport()->grabGesture(Qt::TapAndHoldGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent); + canvas->viewport()->grabGesture(Qt::PanGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent); + canvas->viewport()->grabGesture(Qt::PinchGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent); + canvas->viewport()->grabGesture(Qt::SwipeGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent); + canvas->viewport()->setAttribute(Qt::WA_AcceptTouchEvents); +} + int QDeclarativeViewer::menuBarHeight() const { if (!(windowFlags() & Qt::FramelessWindowHint)) @@ -563,6 +501,11 @@ QDeclarativeView *QDeclarativeViewer::view() const return canvas; } +LoggerWidget *QDeclarativeViewer::warningsWidget() const +{ + return loggerWindow; +} + void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) { QObject *parent = flatmenu ? (QObject*)flatmenu : (QObject*)menu; @@ -614,53 +557,17 @@ void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) connect(slowAction, SIGNAL(triggered(bool)), this, SLOT(setSlowMode(bool))); debugMenu->addAction(slowAction); - if (flatmenu) flatmenu->addSeparator(); + showWarningsWindow = new QAction(tr("Show Warnings"), parent); + showWarningsWindow->setCheckable((true)); + showWarningsWindow->setChecked(loggerWindow->isVisible()); + connect(showWarningsWindow, SIGNAL(triggered(bool)), this, SLOT(showWarnings(bool))); - QMenu *skinMenu = flatmenu ? flatmenu->addMenu(tr("&Skin")) : menu->addMenu(tr("&Skin")); - - QActionGroup *skinActions; - QAction *skinAction; - - skinActions = new QActionGroup(parent); - skinAction = new QAction(tr("Scale skin"), parent); - skinAction->setCheckable(true); - skinAction->setChecked(scaleSkin); - skinActions->addAction(skinAction); - skinMenu->addAction(skinAction); - connect(skinAction, SIGNAL(triggered()), this, SLOT(setScaleSkin())); - skinAction = new QAction(tr("Resize view"), parent); - skinAction->setCheckable(true); - skinAction->setChecked(!scaleSkin); - skinActions->addAction(skinAction); - skinMenu->addAction(skinAction); - connect(skinAction, SIGNAL(triggered()), this, SLOT(setScaleView())); - skinMenu->addSeparator(); - - skinActions = new QActionGroup(parent); - QSignalMapper *mapper = new QSignalMapper(parent); - skinAction = new QAction(tr("None"), parent); - skinAction->setCheckable(true); - if (currentSkin.isEmpty()) - skinAction->setChecked(true); - skinActions->addAction(skinAction); - skinMenu->addAction(skinAction); - mapper->setMapping(skinAction, ""); - connect(skinAction, SIGNAL(triggered()), mapper, SLOT(map())); - skinMenu->addSeparator(); - - foreach (QString name, builtinSkins()) { - skinAction = new QAction(name, parent); - skinActions->addAction(skinAction); - skinMenu->addAction(skinAction); - skinAction->setCheckable(true); - if (":skin/"+name+".skin" == currentSkin) - skinAction->setChecked(true); - mapper->setMapping(skinAction, name); - connect(skinAction, SIGNAL(triggered()), mapper, SLOT(map())); - } - connect(mapper, SIGNAL(mapped(QString)), this, SLOT(setSkin(QString))); +#if !defined(Q_OS_SYMBIAN) + debugMenu->addAction(showWarningsWindow); +#endif if (flatmenu) flatmenu->addSeparator(); + #endif // Q_OS_SYMBIAN QMenu *settingsMenu = flatmenu ? flatmenu : menu->addMenu(tr("S&ettings")); @@ -670,6 +577,8 @@ void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) #if !defined(Q_OS_SYMBIAN) if (!flatmenu) settingsMenu->addAction(recordOptions); + + settingsMenu->addMenu(loggerWindow->preferencesMenu()); #else QAction *fullscreenAction = new QAction(tr("Full Screen"), parent); fullscreenAction->setCheckable(true); @@ -677,7 +586,10 @@ void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) settingsMenu->addAction(fullscreenAction); #endif + if (flatmenu) flatmenu->addSeparator(); + QMenu *propertiesMenu = settingsMenu->addMenu(tr("Properties")); + QActionGroup *orientation = new QActionGroup(parent); QAction *toggleOrientation = new QAction(tr("&Toggle Orientation"), parent); @@ -756,30 +668,20 @@ void QDeclarativeViewer::toggleFullScreen() showFullScreen(); } -void QDeclarativeViewer::setScaleSkin() +void QDeclarativeViewer::showWarnings(bool show) { - if (scaleSkin) - return; - scaleSkin = true; - if (skin) { - canvas->resize(initialSize); - canvas->setFixedSize(initialSize); - canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject); - updateSizeHints(); - } + loggerWindow->setVisible(show); } -void QDeclarativeViewer::setScaleView() +void QDeclarativeViewer::warningsWidgetOpened() { - if (!scaleSkin) - return; - scaleSkin = false; - if (skin) { - canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView); - updateSizeHints(); - } + showWarningsWindow->setChecked(true); } +void QDeclarativeViewer::warningsWidgetClosed() +{ + showWarningsWindow->setChecked(false); +} void QDeclarativeViewer::takeSnapShot() { @@ -924,10 +826,8 @@ void QDeclarativeViewer::statusChanged() if (canvas->status() == QDeclarativeView::Ready) { initialSize = canvas->sizeHint(); if (canvas->resizeMode() == QDeclarativeView::SizeRootObjectToView) { - QSize newWindowSize = initialSize; - newWindowSize.setHeight(newWindowSize.height()+menuBarHeight()); updateSizeHints(); - resize(newWindowSize); + resize(QSize(initialSize.width(), initialSize.height()+menuBarHeight())); } } } @@ -937,6 +837,46 @@ void QDeclarativeViewer::launch(const QString& file_or_url) QMetaObject::invokeMethod(this, "open", Qt::QueuedConnection, Q_ARG(QString, file_or_url)); } +void QDeclarativeViewer::loadTranslationFile(const QString& directory) +{ + if (!translator) { + translator = new QTranslator(this); + QApplication::installTranslator(translator); + } + + translator->load(QLatin1String("qml_" )+QLocale::system().name(), directory + QLatin1String("/i18n")); +} + +void QDeclarativeViewer::loadDummyDataFiles(const QString& directory) +{ + QDir dir(directory+"/dummydata", "*.qml"); + QStringList list = dir.entryList(); + for (int i = 0; i < list.size(); ++i) { + QString qml = list.at(i); + QFile f(dir.filePath(qml)); + f.open(QIODevice::ReadOnly); + QByteArray data = f.readAll(); + QDeclarativeComponent comp(canvas->engine()); + comp.setData(data, QUrl()); + QObject *dummyData = comp.create(); + + if(comp.isError()) { + QList<QDeclarativeError> errors = comp.errors(); + foreach (const QDeclarativeError &error, errors) { + qWarning() << error; + } + if (tester) tester->executefailure(); + } + + if (dummyData) { + qWarning() << "Loaded dummy data:" << dir.filePath(qml); + qml.truncate(qml.length()-4); + canvas->rootContext()->setContextProperty(qml, dummyData); + dummyData->setParent(this); + } + } +} + bool QDeclarativeViewer::open(const QString& file_or_url) { currentFileOrUrl = file_or_url; @@ -947,7 +887,7 @@ bool QDeclarativeViewer::open(const QString& file_or_url) url = QUrl::fromLocalFile(fi.absoluteFilePath()); else url = QUrl(file_or_url); - setWindowTitle(tr("%1 - Qt Qml Runtime").arg(file_or_url)); + setWindowTitle(tr("%1 - Qt QML Launcher").arg(file_or_url)); if (!m_script.isEmpty()) tester = new QDeclarativeTester(m_script, m_scriptOptions, canvas); @@ -955,50 +895,26 @@ bool QDeclarativeViewer::open(const QString& file_or_url) delete canvas->rootObject(); canvas->engine()->clearComponentCache(); QDeclarativeContext *ctxt = canvas->rootContext(); - ctxt->setContextProperty("qmlViewer", this); + ctxt->setContextProperty("qmlLauncher", this); #ifdef Q_OS_SYMBIAN - ctxt->setContextProperty("qmlViewerFolder", "E:\\"); // Documents on your S60 phone + ctxt->setContextProperty("qmlLauncherFolder", "E:\\"); // Documents on your S60 phone #else - ctxt->setContextProperty("qmlViewerFolder", QDir::currentPath()); + ctxt->setContextProperty("qmlLauncherFolder", QDir::currentPath()); #endif ctxt->setContextProperty("runtime", Runtime::instance()); QString fileName = url.toLocalFile(); if (!fileName.isEmpty()) { - QFileInfo fi(fileName); if (fi.exists()) { if (fi.suffix().toLower() != QLatin1String("qml")) { qWarning() << "qml cannot open non-QML file" << fileName; return false; } - QDir dir(fi.path()+"/dummydata", "*.qml"); - QStringList list = dir.entryList(); - for (int i = 0; i < list.size(); ++i) { - QString qml = list.at(i); - QFile f(dir.filePath(qml)); - f.open(QIODevice::ReadOnly); - QByteArray data = f.readAll(); - QDeclarativeComponent comp(canvas->engine()); - comp.setData(data, QUrl()); - QObject *dummyData = comp.create(); - - if(comp.isError()) { - QList<QDeclarativeError> errors = comp.errors(); - foreach (const QDeclarativeError &error, errors) { - qWarning() << error; - } - if (tester) tester->executefailure(); - } - - if (dummyData) { - qWarning() << "Loaded dummy data:" << dir.filePath(qml); - qml.truncate(qml.length()-4); - ctxt->setContextProperty(qml, dummyData); - dummyData->setParent(this); - } - } + QFileInfo fi(fileName); + loadTranslationFile(fi.path()); + loadDummyDataFiles(fi.path()); } else { qWarning() << "qml cannot find file:" << fileName; return false; @@ -1020,83 +936,6 @@ void QDeclarativeViewer::startNetwork() #endif } -QStringList QDeclarativeViewer::builtinSkins() const -{ - QDir dir(":/skins/","*.skin"); - const QFileInfoList l = dir.entryInfoList(); - QStringList r; - for (QFileInfoList::const_iterator it = l.begin(); it != l.end(); ++it) { - r += (*it).baseName(); - } - return r; -} - -void QDeclarativeViewer::setSkin(const QString& skinDirOrName) -{ - QString skinDirectory = skinDirOrName; - - if (!QDir(skinDirOrName).exists() && QDir(":/skins/"+skinDirOrName+".skin").exists()) - skinDirectory = ":/skins/"+skinDirOrName+".skin"; - - if (currentSkin == skinDirectory) - return; - - currentSkin = skinDirectory; - - // XXX QWidget::setMask does not handle changes well, and we may - // XXX have been signalled from an item in a menu we're replacing, - // XXX hence some rather convoluted resetting here... - - QString err; - if (skin) { - skin->hide(); - skin->deleteLater(); - } - - DeviceSkinParameters parameters; - if (!skinDirectory.isEmpty() && parameters.read(skinDirectory,DeviceSkinParameters::ReadAll,&err)) { - layout()->setEnabled(false); - if (mb) - mb->hide(); - if (!err.isEmpty()) - qWarning() << err; - skin = new PreviewDeviceSkin(parameters,this); - if (scaleSkin) - skin->setPreviewAndScale(canvas); - else - skin->setPreview(canvas); - createMenu(0,skin->menu); - if (scaleSkin) { - canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject); - } - updateSizeHints(); - skin->show(); - } else if (skin) { - skin = 0; - clearMask(); - if ((windowFlags() & Qt::FramelessWindowHint)) { - menuBar()->clear(); - createMenu(menuBar(),0); - } - canvas->setParent(this, Qt::SubWindow); - setParent(0,windowFlags()); // recreate - mb->show(); - canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView); - updateSizeHints(); - - layout()->setEnabled(true); - if (!scaleSkin) { - canvas->resize(initialSize); - canvas->setFixedSize(initialSize); - } - QSize newWindowSize = canvas->size(); - newWindowSize.setHeight(newWindowSize.height()+menuBarHeight()); - resize(newWindowSize); - show(); - } - canvas->show(); -} - void QDeclarativeViewer::setAutoRecord(int from, int to) { if (from==0) from=1; // ensure resized @@ -1365,6 +1204,19 @@ void QDeclarativeViewer::recordFrame() } } +void QDeclarativeViewer::orientationChanged() +{ + if (canvas->resizeMode() == QDeclarativeView::SizeRootObjectToView) { + if (canvas->rootObject()) { + QSizeF rootObjectSize = canvas->rootObject()->boundingRect().size(); + QSize newSize(rootObjectSize.width(), rootObjectSize.height()+menuBarHeight()); + if (size() != newSize) { + resize(newSize); + } + } + } +} + void QDeclarativeViewer::setDeviceKeys(bool on) { devicemode = on; @@ -1412,24 +1264,16 @@ void QDeclarativeViewer::updateSizeHints() { if (canvas->resizeMode() == QDeclarativeView::SizeViewToRootObject) { QSize newWindowSize = canvas->sizeHint(); - if (!skin) - newWindowSize.setHeight(newWindowSize.height()+menuBarHeight()); + newWindowSize.setHeight(newWindowSize.height()+menuBarHeight()); if (!isFullScreen() && !isMaximized()) { resize(newWindowSize); setFixedSize(newWindowSize); - if (skin && scaleSkin) { - skin->setScreenSize(newWindowSize); - } } } else { // QDeclarativeView::SizeRootObjectToView canvas->setMinimumSize(QSize(0,0)); canvas->setMaximumSize(QSize(16777215,16777215)); setMinimumSize(QSize(0,0)); setMaximumSize(QSize(16777215,16777215)); - if (skin && !scaleSkin) { - canvas->setFixedSize(skin->standardScreenSize()); - skin->setScreenSize(skin->standardScreenSize()); - } } updateGeometry(); } diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h index 2a0a07d..0416b32 100644 --- a/tools/qml/qmlruntime.h +++ b/tools/qml/qmlruntime.h @@ -48,6 +48,8 @@ #include <QTime> #include <QList> +#include "loggerwidget.h" + QT_BEGIN_NAMESPACE class QDeclarativeView; @@ -59,6 +61,7 @@ class QDeclarativeTester; class QNetworkReply; class QNetworkCookieJar; class NetworkAccessManagerFactory; +class QTranslator; class QDeclarativeViewer #if defined(Q_OS_SYMBIAN) @@ -102,11 +105,13 @@ public: void setUseNativeFileBrowser(bool); void updateSizeHints(); void setSizeToView(bool sizeToView); - QStringList builtinSkins() const; QMenuBar *menuBar() const; QDeclarativeView *view() const; + LoggerWidget *warningsWidget() const; + + void enableExperimentalGestures(); public slots: void sceneResized(QSize size); @@ -117,10 +122,9 @@ public slots: void toggleRecording(); void toggleRecordingWithSelection(); void ffmpegFinished(int code); - void setSkin(const QString& skinDirectory); void showProxySettings (); void proxySettingsChanged (); - void setScaleView(); + void toggleOrientation(); void statusChanged(); void setSlowMode(bool); void launch(const QString &); @@ -128,7 +132,6 @@ public slots: protected: virtual void keyPressEvent(QKeyEvent *); virtual bool event(QEvent *); - void createMenu(QMenuBar *menu, QMenu *flatmenu); private slots: @@ -137,19 +140,21 @@ private slots: void recordFrame(); void chooseRecordingOptions(); void pickRecordingFile(); - void setScaleSkin(); void setPortrait(); void setLandscape(); - void toggleOrientation(); void startNetwork(); void toggleFullScreen(); + void orientationChanged(); + + void showWarnings(bool show); + void warningsWidgetOpened(); + void warningsWidgetClosed(); private: QString getVideoFileName(); int menuBarHeight() const; - PreviewDeviceSkin *skin; - QSize skinscreensize; + LoggerWidget *loggerWindow; QDeclarativeView *canvas; QSize initialSize; QString currentFileOrUrl; @@ -182,16 +187,22 @@ private: QAction *portraitOrientation; QAction *landscapeOrientation; + QAction *showWarningsWindow; + QString m_script; ScriptOptions m_scriptOptions; QDeclarativeTester *tester; QNetworkReply *wgtreply; QString wgtdir; - NetworkAccessManagerFactory *namFactory; bool useQmlFileBrowser; + + QTranslator *translator; + void loadTranslationFile(const QString& directory); + + void loadDummyDataFiles(const QString& directory); }; Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeViewer::ScriptOptions) diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp index 37e4548..885d029 100644 --- a/tools/runonphone/main.cpp +++ b/tools/runonphone/main.cpp @@ -102,6 +102,10 @@ int main(int argc, char *argv[]) else if (arg == "--sis" || arg == "-s") { CHECK_PARAMETER_EXISTS sisFile = it.next(); + if (!QFileInfo(sisFile).exists()) { + errstream << "Sis file (" << sisFile << ") doesn't exist" << endl; + return 1; + } } else if (arg == "--download" || arg == "-d") { CHECK_PARAMETER_EXISTS diff --git a/tools/runonphone/symbianutils/launcher.cpp b/tools/runonphone/symbianutils/launcher.cpp index fa509e7..ecb067e 100644 --- a/tools/runonphone/symbianutils/launcher.cpp +++ b/tools/runonphone/symbianutils/launcher.cpp @@ -365,8 +365,22 @@ void Launcher::handleResult(const TrkResult &result) QByteArray prefix = "READ BUF: "; QByteArray str = result.toString().toUtf8(); if (result.isDebugOutput) { // handle application output - logMessage("APPLICATION OUTPUT: " + result.data); - emit applicationOutputReceived(result.data); + QString msg; + if (result.multiplex == MuxTextTrace) { + if (result.data.length() > 8) { + quint64 timestamp = extractInt64(result.data) & 0x0FFFFFFFFFFFFFFFULL; + quint64 secs = timestamp / 1000000000; + quint64 ns = timestamp % 1000000000; + msg = QString("[%1.%2] %3").arg(secs).arg(ns).arg(QString(result.data.mid(8))); + logMessage("TEXT TRACE: " + msg); + } + } else { + logMessage("APPLICATION OUTPUT: " + result.data); + msg = result.data; + } + msg.replace("\r\n", "\n"); + if(!msg.endsWith('\n')) msg.append('\n'); + emit applicationOutputReceived(msg); return; } switch (result.code) { diff --git a/tools/runonphone/symbianutils/trkutils.cpp b/tools/runonphone/symbianutils/trkutils.cpp index 9b43c96..60e391e 100644 --- a/tools/runonphone/symbianutils/trkutils.cpp +++ b/tools/runonphone/symbianutils/trkutils.cpp @@ -276,14 +276,13 @@ QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool s /* returns 0 if array doesn't represent a result, otherwise returns the length of the result data */ -ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame) +ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame, ushort& mux) { if (serialFrame) { // Serial protocol with length info if (buffer.length() < 4) return 0; - if (buffer.at(0) != 0x01 || byte(buffer.at(1)) != 0x90) - return 0; + mux = extractShort(buffer.data()); const ushort len = extractShort(buffer.data() + 2); return (buffer.size() >= len + 4) ? len : ushort(0); } @@ -292,6 +291,7 @@ ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame) const int firstDelimiterPos = buffer.indexOf(delimiter); // Regular message delimited by 0x7e..0x7e if (firstDelimiterPos == 0) { + mux = MuxTrk; const int endPos = buffer.indexOf(delimiter, firstDelimiterPos + 1); return endPos != -1 ? endPos + 1 - firstDelimiterPos : 0; } @@ -304,7 +304,7 @@ bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *result, QByt result->clear(); if(rawData) rawData->clear(); - const ushort len = isValidTrkResult(*buffer, serialFrame); + const ushort len = isValidTrkResult(*buffer, serialFrame, result->multiplex); if (!len) return false; // handle receiving application output, which is not a regular command @@ -312,7 +312,6 @@ bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *result, QByt if (buffer->at(delimiterPos) != 0x7e) { result->isDebugOutput = true; result->data = buffer->mid(delimiterPos, len); - result->data.replace("\r\n", "\n"); *buffer->remove(0, delimiterPos + len); return true; } @@ -353,6 +352,19 @@ SYMBIANUTILS_EXPORT uint extractInt(const char *data) return res; } +SYMBIANUTILS_EXPORT quint64 extractInt64(const char *data) +{ + quint64 res = byte(data[0]); + res <<= 8; res += byte(data[1]); + res <<= 8; res += byte(data[2]); + res <<= 8; res += byte(data[3]); + res <<= 8; res += byte(data[4]); + res <<= 8; res += byte(data[5]); + res <<= 8; res += byte(data[6]); + res <<= 8; res += byte(data[7]); + return res; +} + SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba) { QString res; diff --git a/tools/runonphone/symbianutils/trkutils.h b/tools/runonphone/symbianutils/trkutils.h index 553fc7d..e571028 100644 --- a/tools/runonphone/symbianutils/trkutils.h +++ b/tools/runonphone/symbianutils/trkutils.h @@ -135,9 +135,16 @@ enum Command { TrkDSPositionFile = 0xd4 }; +enum SerialMultiplexor { + MuxRaw = 0, + MuxTextTrace = 0x0102, + MuxTrk = 0x0190 +}; + inline byte extractByte(const char *data) { return *data; } SYMBIANUTILS_EXPORT ushort extractShort(const char *data); SYMBIANUTILS_EXPORT uint extractInt(const char *data); +SYMBIANUTILS_EXPORT quint64 extractInt64(const char *data); SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba); @@ -217,6 +224,7 @@ struct SYMBIANUTILS_EXPORT TrkResult int errorCode() const; QString errorString() const; + ushort multiplex; byte code; byte token; QByteArray data; |