From 5c9778e7ad8f4a68c13d19f1e1f4d9ce57cfd31e Mon Sep 17 00:00:00 2001 From: con Date: Fri, 24 Apr 2009 10:20:23 +0200 Subject: [PATCH 01/10] Be less picky about "qmake --version" output. Older qmake versions have different output, don't be case sensitive. Problems were reported with Qt Embedded 4.1.4. --- src/plugins/projectexplorer/qtversionmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/qtversionmanager.cpp b/src/plugins/projectexplorer/qtversionmanager.cpp index dae9faddca4..05d2770c35e 100644 --- a/src/plugins/projectexplorer/qtversionmanager.cpp +++ b/src/plugins/projectexplorer/qtversionmanager.cpp @@ -268,10 +268,10 @@ QString QtVersionManager::qtVersionForQMake(const QString &qmakePath) if (!qmake.waitForFinished()) return false; QString output = qmake.readAllStandardOutput(); - QRegExp regexp("(QMake version|Qmake version:)[\\s]*([\\d.]*)"); + QRegExp regexp("(QMake version|QMake version:)[\\s]*([\\d.]*)", Qt::CaseInsensitive); regexp.indexIn(output); if (regexp.cap(2).startsWith("2.")) { - QRegExp regexp2("Using Qt version[\\s]*([\\d\\.]*)"); + QRegExp regexp2("Using Qt version[\\s]*([\\d\\.]*)", Qt::CaseInsensitive); regexp2.indexIn(output); return regexp2.cap(1); } From ff2afcab5a0f27ce41369adc061af6c3fa3f0aaf Mon Sep 17 00:00:00 2001 From: con Date: Wed, 25 Mar 2009 15:50:44 +0100 Subject: [PATCH 02/10] Sort method combo box alphabetically. Patch received by Kris Wong. --- src/plugins/cppeditor/cppeditor.cpp | 13 ++++++++++--- src/plugins/cppeditor/cppeditor.h | 2 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 3544cf3f2d3..d6c25309513 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -75,6 +75,7 @@ #include #include #include +#include using namespace CPlusPlus; using namespace CppEditor::Internal; @@ -239,11 +240,17 @@ void CPPEditor::createToolBar(CPPEditorEditable *editable) QTreeView *methodView = new OverviewTreeView; methodView->header()->hide(); methodView->setItemsExpandable(false); + methodView->setSortingEnabled(true); + methodView->sortByColumn(0, Qt::AscendingOrder); m_methodCombo->setView(methodView); m_methodCombo->setMaxVisibleItems(20); m_overviewModel = new OverviewModel(this); - m_methodCombo->setModel(m_overviewModel); + m_proxyModel = new QSortFilterProxyModel(this); + m_proxyModel->setSourceModel(m_overviewModel); + m_proxyModel->setDynamicSortFilter(true); + m_proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); + m_methodCombo->setModel(m_proxyModel); connect(m_methodCombo, SIGNAL(activated(int)), this, SLOT(jumpToMethod(int))); connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(updateMethodBoxIndex())); @@ -366,7 +373,7 @@ void CPPEditor::updateFileName() void CPPEditor::jumpToMethod(int) { - QModelIndex index = m_methodCombo->view()->currentIndex(); + QModelIndex index = m_proxyModel->mapToSource(m_methodCombo->view()->currentIndex()); Symbol *symbol = m_overviewModel->symbolFromIndex(index); if (! symbol) return; @@ -394,7 +401,7 @@ void CPPEditor::updateMethodBoxIndex() if (lastIndex.isValid()) { bool blocked = m_methodCombo->blockSignals(true); - m_methodCombo->setCurrentIndex(lastIndex.row()); + m_methodCombo->setCurrentIndex(m_proxyModel->mapFromSource(lastIndex).row()); updateMethodBoxToolTip(); (void) m_methodCombo->blockSignals(blocked); } diff --git a/src/plugins/cppeditor/cppeditor.h b/src/plugins/cppeditor/cppeditor.h index ae352b8d6d5..7ef5e720a44 100644 --- a/src/plugins/cppeditor/cppeditor.h +++ b/src/plugins/cppeditor/cppeditor.h @@ -37,6 +37,7 @@ QT_BEGIN_NAMESPACE class QComboBox; +class QSortFilterProxyModel; QT_END_NAMESPACE namespace CPlusPlus { @@ -161,6 +162,7 @@ private: QList m_contexts; QComboBox *m_methodCombo; CPlusPlus::OverviewModel *m_overviewModel; + QSortFilterProxyModel *m_proxyModel; }; } // namespace Internal From 9e9523b8b0d3f33b659a4ebca2932f28e9db0719 Mon Sep 17 00:00:00 2001 From: con Date: Mon, 20 Apr 2009 16:50:42 +0200 Subject: [PATCH 03/10] Make sorting of method overview optional. You can switch between sorted/unsorted via the method overview's context menu. --- src/plugins/cppeditor/cppeditor.cpp | 32 ++++++++++++++++++++++++++-- src/plugins/cppeditor/cppeditor.h | 4 +++- src/plugins/cppeditor/cppplugin.cpp | 33 ++++++++++++++++++++++++++++- src/plugins/cppeditor/cppplugin.h | 12 +++++++++++ 4 files changed, 77 insertions(+), 4 deletions(-) diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index d6c25309513..cc28c720e91 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -240,18 +240,27 @@ void CPPEditor::createToolBar(CPPEditorEditable *editable) QTreeView *methodView = new OverviewTreeView; methodView->header()->hide(); methodView->setItemsExpandable(false); - methodView->setSortingEnabled(true); - methodView->sortByColumn(0, Qt::AscendingOrder); m_methodCombo->setView(methodView); m_methodCombo->setMaxVisibleItems(20); m_overviewModel = new OverviewModel(this); m_proxyModel = new QSortFilterProxyModel(this); m_proxyModel->setSourceModel(m_overviewModel); + if (CppPlugin::instance()->sortedMethodOverview()) + m_proxyModel->sort(0, Qt::AscendingOrder); + else + m_proxyModel->sort(-1, Qt::AscendingOrder); // don't sort yet, but set column for sortedMethodOverview() m_proxyModel->setDynamicSortFilter(true); m_proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); m_methodCombo->setModel(m_proxyModel); + m_methodCombo->setContextMenuPolicy(Qt::ActionsContextMenu); + m_sortAction = new QAction(tr("Sort alphabetically"), m_methodCombo); + m_sortAction->setCheckable(true); + m_sortAction->setChecked(sortedMethodOverview()); + connect(m_sortAction, SIGNAL(toggled(bool)), CppPlugin::instance(), SLOT(setSortedMethodOverview(bool))); + m_methodCombo->addAction(m_sortAction); + connect(m_methodCombo, SIGNAL(activated(int)), this, SLOT(jumpToMethod(int))); connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(updateMethodBoxIndex())); connect(m_methodCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMethodBoxToolTip())); @@ -381,6 +390,25 @@ void CPPEditor::jumpToMethod(int) openCppEditorAt(linkToSymbol(symbol)); } +void CPPEditor::setSortedMethodOverview(bool sort) +{ + if (sort != sortedMethodOverview()) { + if (sort) + m_proxyModel->sort(0, Qt::AscendingOrder); + else + m_proxyModel->sort(-1, Qt::AscendingOrder); + bool block = m_sortAction->blockSignals(true); + m_sortAction->setChecked(m_proxyModel->sortColumn() == 0); + m_sortAction->blockSignals(block); + updateMethodBoxIndex(); + } +} + +bool CPPEditor::sortedMethodOverview() const +{ + return (m_proxyModel->sortColumn() == 0); +} + void CPPEditor::updateMethodBoxIndex() { int line = 0, column = 0; diff --git a/src/plugins/cppeditor/cppeditor.h b/src/plugins/cppeditor/cppeditor.h index 7ef5e720a44..efae361e0e6 100644 --- a/src/plugins/cppeditor/cppeditor.h +++ b/src/plugins/cppeditor/cppeditor.h @@ -87,6 +87,7 @@ public: public slots: virtual void setFontSettings(const TextEditor::FontSettings &); + void setSortedMethodOverview(bool sort); void switchDeclarationDefinition(); void jumpToDefinition(); @@ -95,7 +96,6 @@ public slots: void deleteStartOfToken(); void deleteEndOfToken(); - protected: void contextMenuEvent(QContextMenuEvent *); void mouseMoveEvent(QMouseEvent *); @@ -116,6 +116,7 @@ private slots: void onDocumentUpdated(CPlusPlus::Document::Ptr doc); private: + bool sortedMethodOverview() const; CPlusPlus::Symbol *findDefinition(CPlusPlus::Symbol *symbol); virtual void indentBlock(QTextDocument *doc, QTextBlock block, QChar typedChar); @@ -163,6 +164,7 @@ private: QComboBox *m_methodCombo; CPlusPlus::OverviewModel *m_overviewModel; QSortFilterProxyModel *m_proxyModel; + QAction *m_sortAction; }; } // namespace Internal diff --git a/src/plugins/cppeditor/cppplugin.cpp b/src/plugins/cppeditor/cppplugin.cpp index 29ad6731451..9e17083c219 100644 --- a/src/plugins/cppeditor/cppplugin.cpp +++ b/src/plugins/cppeditor/cppplugin.cpp @@ -106,7 +106,8 @@ CppPlugin *CppPlugin::m_instance = 0; CppPlugin::CppPlugin() : m_actionHandler(0), - m_factory(0) + m_factory(0), + m_sortedMethodOverview(false) { m_instance = this; } @@ -133,6 +134,20 @@ void CppPlugin::initializeEditor(CPPEditor *editor) // auto completion connect(editor, SIGNAL(requestAutoCompletion(ITextEditable*, bool)), TextEditor::Internal::CompletionSupport::instance(), SLOT(autoComplete(ITextEditable*, bool))); + // method combo box sorting + connect(this, SIGNAL(methodOverviewSortingChanged(bool)), + editor, SLOT(setSortedMethodOverview(bool))); +} + +void CppPlugin::setSortedMethodOverview(bool sorted) +{ + m_sortedMethodOverview = sorted; + emit methodOverviewSortingChanged(sorted); +} + +bool CppPlugin::sortedMethodOverview() const +{ + return m_sortedMethodOverview; } bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage) @@ -194,14 +209,30 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess | TextEditor::TextEditorActionHandler::UnCommentSelection | TextEditor::TextEditorActionHandler::UnCollapseAll); + readSettings(); return true; } +void CppPlugin::readSettings() +{ + m_sortedMethodOverview = Core::ICore::instance()->settings()->value("CppTools/SortedMethodOverview", false).toBool(); +} + +void CppPlugin::writeSettings() +{ + Core::ICore::instance()->settings()->setValue("CppTools/SortedMethodOverview", m_sortedMethodOverview); +} + void CppPlugin::extensionsInitialized() { m_actionHandler->initializeActions(); } +void CppPlugin::shutdown() +{ + writeSettings(); +} + void CppPlugin::switchDeclarationDefinition() { Core::EditorManager *em = Core::EditorManager::instance(); diff --git a/src/plugins/cppeditor/cppplugin.h b/src/plugins/cppeditor/cppplugin.h index 151eda38885..4ad8400342b 100644 --- a/src/plugins/cppeditor/cppplugin.h +++ b/src/plugins/cppeditor/cppplugin.h @@ -58,10 +58,19 @@ public: bool initialize(const QStringList &arguments, QString *error_message = 0); void extensionsInitialized(); + void shutdown(); // Connect editor to settings changed signals. void initializeEditor(CPPEditor *editor); + bool sortedMethodOverview() const; + +signals: + void methodOverviewSortingChanged(bool sort); + +public slots: + void setSortedMethodOverview(bool sorted); + private slots: void switchDeclarationDefinition(); void jumpToDefinition(); @@ -69,11 +78,14 @@ private slots: private: friend class CppEditorFactory; Core::IEditor *createEditor(QWidget *parent); + void writeSettings(); + void readSettings(); static CppPlugin *m_instance; TextEditor::TextEditorActionHandler *m_actionHandler; CppEditorFactory *m_factory; + bool m_sortedMethodOverview; }; class CppEditorFactory : public Core::IEditorFactory From 78e5293f43c0aa9f1b58e764bd105de26c95d6b7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 24 Apr 2009 14:01:11 +0200 Subject: [PATCH 04/10] Continue German translation. --- share/qtcreator/translations/qtcreator_de.ts | 1901 +++++++++-------- share/qtcreator/translations/qtcreator_ja.ts | 720 ++++--- src/plugins/coreplugin/editmode.cpp | 2 +- src/plugins/coreplugin/welcomemode.cpp | 2 +- src/plugins/coreplugin/welcomemode.ui | 4 +- src/plugins/find/findtoolbar.cpp | 2 +- .../projectexplorer/projectexplorer.cpp | 4 +- 7 files changed, 1412 insertions(+), 1223 deletions(-) diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index b3ec85fa3b3..59f68968298 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -57,7 +57,7 @@ Clear - + Löschen @@ -88,12 +88,12 @@ &Undo - &Rückgangig + &Rückgangig &Redo - &Wiederholen + &Wiederholen @@ -101,7 +101,7 @@ Add Bookmark - + Lesezeichen hinzufügen @@ -130,7 +130,7 @@ Bookmarks - + Lesezeichen @@ -154,7 +154,7 @@ Bookmarks - + Lesezeichen @@ -226,7 +226,7 @@ Bookmarks - + Lesezeichen @@ -347,8 +347,8 @@ CMakeProjectManager::Internal::CMakeBuildSettingsWidget - - Build directory: + + &Change @@ -363,12 +363,12 @@ CMakeProjectManager::Internal::CMakeRunPage - + Run CMake - + Arguments @@ -378,7 +378,7 @@ - + The directory %1 contains an outdated .cbp file. Qt Creator needs to update this file by running cmake. If you want to add additional command line arguments, add them in the below. Note, that cmake remembers command line arguments from the former runs. @@ -387,11 +387,16 @@ The directory %1 specified in a buildconfiguration, does not contain a cbp file. Qt Creator needs to recreate this file, by running cmake. Some projects require command line arguments to the initial cmake call. Note, that cmake remembers command line arguments from the former runs. + + + Qt Creator needs to run cmake in the new build directory. Some projects require command line arguments to the initial cmake call. + + CMakeProjectManager::Internal::CMakeSettingsPage - + CMake @@ -400,7 +405,7 @@ CMakeProjectManager::Internal::InSourceBuildPage - + Qt Creator has detected an in source build. This prevents shadow builds, Qt Creator won't allow you to change the build directory. If you want a shadow build, clean your source directory and open the project again. @@ -408,7 +413,7 @@ CMakeProjectManager::Internal::MakeStepConfigWidget - + Additional arguments: @@ -421,7 +426,12 @@ CMakeProjectManager::Internal::ShadowBuildPage - + + Please enter the directory in which you want to build your project. + + + + Please enter the directory in which you want to build your project. Qt Creator recommends to not use the source directory for building. This ensures that the source directory remains clean and enables multiple builds with different settings. @@ -434,7 +444,7 @@ CMakeProjectManager::Internal::XmlFileUpToDatePage - + Qt Creator has found a recent cbp file, which Qt Creator will parse to gather information about the project. You can change the command line arguments used to create this file in the project mode. Click finish to load the project @@ -452,6 +462,48 @@ + + CdbDumperHelper + + + Loading dumpers... + + + + + The debugger does not appear to be Qt application. + + + + + The dumper module appears to be already loaded. + + + + + Dumper library '%1' loaded. + + + + + The dumper library '%1' could not be loaded: +%2 + + + + + <none> + + + + + %n known types, Qt version: %1, Qt namespace: %2 + + + + + + CdbOptionsPageWidget @@ -490,7 +542,7 @@ Print Document - + Dokument drucken @@ -644,7 +696,7 @@ General - + Allgemein @@ -754,12 +806,12 @@ Open Link - + Adresse öffnen Open Link in New Tab - + Adresse in neuem Reiter öffnen @@ -781,17 +833,17 @@ Unable to create the directory %1. - + Das Verzeichnis %1 kann nicht erstellt werden. Unable to open %1 for writing: %2 - + Die Datei %1 kann nicht zum Schreiben geöffnet werden: %2 Error while writing to %1: %2 - + Fehler beim Schreiben in %1: %2 @@ -836,47 +888,47 @@ Sollen sie überschrieben werden? Revert to Saved - + Wiederherstellen Close - + Schließen Close All - + Alle schließen Next Document in History - + Nächstes Dokument im Verlauf Previous Document in History - + Vorhergehendes Dokument im Verlauf Go back - + Vorheriges Go forward - + Nächstes Open in External Editor - + Öffne in externem Editor Revert File to Saved - + Gespeicherten Stand wiederherstellen @@ -951,7 +1003,7 @@ Sollen sie überschrieben werden? Remove Current Split - + Teilung aufheben @@ -961,7 +1013,7 @@ Sollen sie überschrieben werden? Remove All Splits - + Alle Teilungen aufheben @@ -971,7 +1023,7 @@ Sollen sie überschrieben werden? Goto Other Split - + Gehe zu anderer Teilung @@ -981,7 +1033,7 @@ Sollen sie überschrieben werden? &Advanced - + &Weitere @@ -991,78 +1043,78 @@ Sollen sie überschrieben werden? Opening File - + Datei Öffnen Cannot open file %1! - + Die Datei '%1' kann nicht geöffnet werden! Open File - + Datei öffnen Failed! - + Fehler Could not open the file for edit with SCC. - + Die Datei konnte nicht mit Hilfe der Versionsverwaltung schreibbar gemacht werden. Could not set permissions to writable. - + Die Datei konnte schreibbar gemacht werden. <b>Warning:</b> You are changing a read-only file. - + <b>Hinweis:</b> Sie sind im Begriff, eine schreibgeschützte Datei zu ändern. Make writable - + Schreibbar machen Save %1 As... - + Speicher '%1' unter... &Save %1 - + &Speichere %1 Revert %1 to Saved - + Stelle %1 wieder her Close %1 - + Schließe %1 You will lose your current changes if you proceed reverting %1. - + Bei der Wiederherstellung von %1 gehen Ihre derzeitigen Änderungen verloren. Proceed - + Weiter Cancel - + Abbrechen @@ -1075,27 +1127,27 @@ Sollen sie überschrieben werden? Can't save file - + Die Datei kann nicht gespeichert werden Can't save changes to '%1'. Do you want to continue and loose your changes? - + Die Datei '%1' kann nicht gespeichert werden. Wollen Sie trotzdem fortsetzen und Ihre Änderungen aufgeben? Overwrite? - + Überschreiben? An item named '%1' already exists at this location. Do you want to overwrite it? - + Es existiert bereits eine Datei des Namens '%1' an dieser Stelle. Wollen Sie sie überschreiben? Save File As - + Datei speichern @@ -1103,7 +1155,7 @@ Sollen sie überschrieben werden? Activate %1 - + Aktiviere %1 @@ -1114,6 +1166,14 @@ Sollen sie überschrieben werden? + + Core::Internal::EditMode + + + Edit + Editieren + + Core::Internal::EditorSplitter @@ -1198,17 +1258,17 @@ Sollen sie überschrieben werden? Close - + Schließen Make writable - + Schreibbar machen File is writable - + Die Datei ist schreibbar @@ -1216,7 +1276,7 @@ Sollen sie überschrieben werden? General - + Allgemein @@ -1239,64 +1299,64 @@ Sollen sie überschrieben werden? Output - Ausgaben + Ausgaben &File - &Datei + &Datei &Edit - &Bearbeiten + &Bearbeiten &Tools - &Werkzeuge + &Werkzeuge &Window - &Fenster + &Fenster &Help - &Hilfe + &Hilfe &New... - &Neu + &Neu... &Open... - &Öffnen + &Öffnen... &Open With... - Öffnen &mit... + Öffnen &mit... Recent Files - Zuletzt bearbeitet + Zuletzt bearbeitet &Save - &Speichern + &Speichern Save &As... - Speichern &unter... + Speichern &unter... @@ -1307,17 +1367,17 @@ Sollen sie überschrieben werden? Save A&ll - &Alles speichern + &Alles speichern &Print... - &Drucken... + &Drucken... E&xit - B&eenden + B&eenden @@ -1328,38 +1388,38 @@ Sollen sie überschrieben werden? &Undo - &Rückgangig + &Rückgangig &Redo - &Wiederholen + &Wiederholen Cu&t - &Ausschneiden + &Ausschneiden &Copy - &Kopieren + &Kopieren &Paste - &Einfügen + &Einfügen &Select All - Alles Aus&wählen + Alles Aus&wählen &Go To Line... - &Gehe zu Zeile... + &Gehe zu Zeile... @@ -1369,48 +1429,48 @@ Sollen sie überschrieben werden? &Options... - &Einstellungen + &Einstellungen Minimize - Minimieren + Minimieren Zoom - Vergrößern + Vergrößern Show Sidebar - Seitenleiste anzeigen + Seitenleiste anzeigen Full Screen - Vollbild + Vollbild About &Qt Creator - Über &Qt Creator + Über &Qt Creator About &Qt Creator... - Über &Qt Creator... + Über &Qt Creator... About &Plugins... - Plugins... + Plugins... New Title of dialog - Neu + Neu @@ -1418,7 +1478,7 @@ Sollen sie überschrieben werden? General - + Allgemein @@ -1426,7 +1486,7 @@ Sollen sie überschrieben werden? Activate %1 - + Aktiviere %1 @@ -1439,7 +1499,7 @@ Sollen sie überschrieben werden? Close - + Schließen @@ -1447,7 +1507,7 @@ Sollen sie überschrieben werden? Activate %1 Pane - + Aktiviere Panel '%1' @@ -1473,7 +1533,7 @@ Sollen sie überschrieben werden? Open Documents - + Offene Dokumente @@ -1489,7 +1549,7 @@ Sollen sie überschrieben werden? Open file '%1' with: - + Öffne '%1; mit: @@ -1497,17 +1557,17 @@ Sollen sie überschrieben werden? Output - Ausgaben + Ausgaben Clear - + Löschen Output &Panes - + Ausgabe&panels @@ -1515,32 +1575,33 @@ Sollen sie überschrieben werden? Details - + Beschreibung Error Details - + Fehlermeldungen zu %1 + Fehlermeldungen Close - + Schließen Installed Plugins - + Installierte Plugins Plugin Details of %1 - + Pluginbeschreibung zu %1 Plugin Errors of %1 - + @@ -1548,7 +1609,7 @@ Sollen sie überschrieben werden? Processes - + Prozesse @@ -1556,22 +1617,22 @@ Sollen sie überschrieben werden? Don't Save - + Nicht speichern Save All - + Alle speichern Save - + Speichern Save Selected - + Auswahl speichern @@ -1613,7 +1674,7 @@ Sollen sie überschrieben werden? Close - + Schließen @@ -1621,7 +1682,7 @@ Sollen sie überschrieben werden? About Qt Creator - + Über Qt Creator @@ -1632,9 +1693,119 @@ Sollen sie überschrieben werden? Core::Internal::WelcomeMode - (last session) - (letzte Sitzung) + (letzte Sitzung) + + + + %1 (last session) + %1 (zuletzt benutzt) + + + + Core::Internal::WelcomePage + + + <style> +h1 { + font-size: 24px; + font-weight: normal; + color: #4d4d4d; + margin-top: 0px; + margin-bottom: 20px; +} + +p { + margin-top: 0px; + margin-bottom: 7px; +} +</style> + +<p>&nbsp;</p> +<h1>Welcome</h1> +<!-- QTextDocument does not support line-height, so wrap the lines manually ... --> +<p>Qt Creator is an intuitive, modern cross platform IDE that</p> <p>enables developers to create graphically appealing applications</p> +<p>for desktop, embedded, and mobile devices. Click on <strong>Getting</strong></p> +<p><strong>Started</strong> to begin developing with Qt Creator.</p> +<hr style="margin-top:15px"/> + + <style> +h1 { + font-size: 24px; + font-weight: normal; + color: #4d4d4d; + margin-top: 0px; + margin-bottom: 20px; +} + +p { + margin-top: 0px; + margin-bottom: 7px; +} +</style> + +<p>&nbsp;</p> +<h1>Welcome</h1> +<!-- QTextDocument does not support line-height, so wrap the lines manually ... --> +<p>Qt Creator ist eine intuitive, moderne cross-platform IDE, die</p> +<p>es Entwicklern ermöglicht, graphisch ansprechende</p> +<p>Anwendungen für die Bereiche Desktop und Embedded sowie</p> +<p>mobile Geräte zu erstellen. Klicken Sie auf <strong>Start</strong>,</p> +<p> um die Entwicklung mit Qt Creator zu beginnen.</p> +<hr style="margin-top:15px"/> + + + + * { + background-image: url(":/core/images/welcomemode/btn_getting_started.png"); +} + +*:hover { + background-image: url(:/core/images/welcomemode/btn_getting_started_hover.png) +} + + + + + + #recentSessionsFrame { +border-image: url(:/core/images/welcomemode/rc_combined.png) 8 8 8 8 stretch stretch; +border-width: 8 8 8 8; +} + + + + + + * { + background-image: url(":/core/images/welcomemode/btn_restore_session.png"); +} + +*:hover { + background-image: url(:/core/images/welcomemode/btn_restore_session_hover.png) +} + + + + + + #bottomWidget { +background-image: url(:/core/images/welcomemode/feedback-bar-background.png); +} + + + + + + * { + background-image: url(":/core/images/welcomemode/btn_feedback.png"); +} + +*:hover { + background-image: url(:/core/images/welcomemode/btn_feedback_hover.png) +} + + @@ -1642,7 +1813,7 @@ Sollen sie überschrieben werden? Switch to %1 mode - + Gehe zu Mode '%1' @@ -1673,7 +1844,7 @@ Sollen sie überschrieben werden? The class name must not contain namespace delimiters. - Der Klassenname darf keine Namensraum-Trenner enthalten. + Der Klassenname darf keine Namensraum-Trenner enthalten. @@ -1793,17 +1964,17 @@ Sollen sie überschrieben werden? Invalid header file name: '%1' - Ungültiger Header-Dateiname: '%1' + Ungültiger Header-Dateiname: '%1' Invalid source file name: '%1' - Ungültiger Quelldateiname: '%1' + Ungültiger Quelldateiname: '%1' Invalid form file name: '%1' - Ungültiger Form-Dateiname: '%1' + Ungültiger Form-Dateiname: '%1' @@ -1813,37 +1984,37 @@ Sollen sie überschrieben werden? Class name: - Klassenname: + Klassenname: Base class: - Basisklasse: + Basisklasse: Header file: - Header-Datei: + Header-Datei: Source file: - Quelldatei: + Quelldatei: Generate form: - Form-Datei generieren: + Form-Datei generieren: Form file: - Form-Datei: + Form-Datei: Path: - Pfad: + Pfad: @@ -1861,37 +2032,37 @@ Sollen sie überschrieben werden? Choose a directory - Wählen Sie ein Verzeichnis + Wählen Sie ein Verzeichnis Choose a file - Wählen Sie eine Datei + Wählen Sie eine Datei The path must not be empty. - Der Pfad darf nicht leer sein. + Der Pfad darf nicht leer sein. The path '%1' does not exist. - Der Pfad '%1' existiert nicht. + Der Pfad '%1' existiert nicht. The path '%1' is not a directory. - Der Pfad '%1' zeigt nicht zu einem Verzeichnis. + Der Pfad '%1' zeigt nicht zu einem Verzeichnis. The path '%1' is not a file. - Der Pfad '%1' zeigt nicht zu einer Datei. + Der Pfad '%1' zeigt nicht zu einer Datei. Path: - Pfad: + Pfad: @@ -1899,17 +2070,17 @@ Sollen sie überschrieben werden? <Enter_Name> - <Name> + <Name> The project already exists. - Das Projekt existiert bereits. + Das Projekt existiert bereits. A file with that name already exists. - Eine Datei dieses Namens existiert bereits. + Eine Datei dieses Namens existiert bereits. @@ -1919,7 +2090,7 @@ Sollen sie überschrieben werden? Introduction and project location - Einführung und Projektverzeichnis + Einführung und Projektverzeichnis @@ -1929,12 +2100,12 @@ Sollen sie überschrieben werden? Name: - Name: + Name: Create in: - Erzeugen in: + Erzeugen in: @@ -1942,7 +2113,7 @@ Sollen sie überschrieben werden? The name must not contain the '.'-character. - Der Name darf das Zeichen '.' nicht enthalten. + Der Name darf das Zeichen '.' nicht enthalten. @@ -1950,17 +2121,17 @@ Sollen sie überschrieben werden? Subversion Submit - Subversion Submit + Subversion Submit Des&cription - &Beschreibung + &Beschreibung F&iles - &Dateien + &Dateien @@ -1973,17 +2144,25 @@ Sollen sie überschrieben werden? Choose the location - Verzeichnis auswählen + Verzeichnis auswählen Name: - Name: + Name: Path: - Pfad: + Pfad: + + + + CppEditor::Internal::CPPEditor + + + Sort alphabetically + @@ -1991,17 +2170,17 @@ Sollen sie überschrieben werden? Enter class name - + Geben Sie einen Klassennamen ein The header and source file names will be derived from the class name - + Die Dateinamen werden aus dem Klassennamen generiert Configure... - + Einstellungen... @@ -2009,7 +2188,7 @@ Sollen sie überschrieben werden? Error while generating file contents. - + Fehler beim Generieren der Dateien. @@ -2017,7 +2196,7 @@ Sollen sie überschrieben werden? C++ Class Wizard - + Neue C++ Klasse @@ -2025,25 +2204,25 @@ Sollen sie überschrieben werden? Unfiltered - + Kein CppEditor::Internal::CppPlugin - + C++ - + C++ Creates a new C++ header file. - + Erzeugt eine neue C++-Header-Datei. C++ Header File - + C++ Header-Datei @@ -2122,7 +2301,7 @@ Sollen sie überschrieben werden? C++ - + C++ @@ -2135,7 +2314,7 @@ Sollen sie überschrieben werden? Text Editor - + Text Editor @@ -2253,7 +2432,7 @@ Sollen sie überschrieben werden? Number - + Zahl @@ -2263,7 +2442,7 @@ Sollen sie überschrieben werden? File - Datei + Datei @@ -2332,22 +2511,22 @@ Sollen sie überschrieben werden? Debugger::Internal::CdbDebugEngine - + Unable to load the debugger engine library '%1': %2 - + Unable to resolve '%1' in the debugger engine library '%2' - + The dumper library '%1' does not exist. - + The console stub process was unable to start '%1'. @@ -2372,7 +2551,7 @@ Sollen sie überschrieben werden? - + Unable to assign the value '%1' to '%2': %3 @@ -2382,7 +2561,7 @@ Sollen sie überschrieben werden? - + Debugger Error @@ -2406,7 +2585,7 @@ Sollen sie überschrieben werden? Debug - + Debuggen @@ -2414,114 +2593,114 @@ Sollen sie überschrieben werden? Start and Debug External Application... - + Debugge externe Anwendung... Attach to Running External Application... - + Debugge externe, laufende Anwendung... Attach to Core... - + Debugge core-Datei Continue - + Fortsetzen Interrupt - + Anhalten Reset Debugger - + Debugger zurücksetzen Step Over - + Einzelschritt über Step Into - + Einzelschritt herein Step Over Instruction - + Einzelschritt über Anweisung Step One Instruction - + Einzelschritt eine Anweisung Step Out - + Einzelschritt heraus Run to Line - + Ausführen bis Zeile Run to Outermost Function - + Ausführen bis zu äußerster Funktion Jump to Line - + Zeile anspringen Toggle Breakpoint - + Haltepunkt umschalten Set Breakpoint at Function... - + Haltepunkt bei Funktion Set Breakpoint at Function "main" - + Haltepunkt bei Funktion main() setzen Add to Watch Window - + Zu Watch-Fenster hinzufügen Stop requested... - + Stop angefordert... Stopped. - + Angehalten. Running requested... - + Fortsetzung angefordert... Running... - + Läuft... @@ -2537,7 +2716,7 @@ Sollen sie überschrieben werden? Warning - + Warnung @@ -2552,17 +2731,17 @@ Sollen sie überschrieben werden? Save Debugger Log - + Debugger Log speichern Stop Debugger - + Debugger anhalten Open Qt preferences - + Qt-Versionseinstellungen öffnen @@ -2603,7 +2782,7 @@ Sollen sie überschrieben werden? Toggle Breakpoint - + Haltepunkt umschalten @@ -2613,7 +2792,7 @@ Sollen sie überschrieben werden? Reset Debugger - + Debugger zurücksetzen @@ -2641,7 +2820,7 @@ Sollen sie überschrieben werden? Debug - + Debuggen @@ -2953,7 +3132,7 @@ Using gdb 6.7 or later is strongly recommended. Running... - + Läuft... @@ -3308,7 +3487,7 @@ Using gdb 6.7 or later is strongly recommended. Stopped. - + Angehalten. @@ -3378,7 +3557,7 @@ Using gdb 6.7 or later is strongly recommended. File - Datei + Datei @@ -3506,7 +3685,7 @@ Using gdb 6.7 or later is strongly recommended. Type - + Typ @@ -3684,7 +3863,7 @@ Using gdb 6.7 or later is strongly recommended. Configure... - + Einstellungen... @@ -3896,7 +4075,7 @@ Using gdb 6.7 or later is strongly recommended. untitled - + kein Titel @@ -4010,7 +4189,7 @@ It also automatically sets the correct qt version. Name: - Name: + Name: @@ -4353,7 +4532,7 @@ Reason: %3 General - + Allgemein @@ -4469,7 +4648,7 @@ Reason: %3 %1: canceled. %2 occurrences found in %3 files. - + %1: abgebrochen. @@ -4517,7 +4696,7 @@ Reason: %3 1 - 1 + 1 @@ -4535,37 +4714,37 @@ Reason: %3 Search for... - + Suche... Sc&ope: - + &Bereich: &Search - + &Suchen Search &for: - + Suche &nach: Close - + Schließen &Case sensitive - + &Groß/Kleinschreibung &Whole words only - + Ganze &Worte @@ -4573,12 +4752,12 @@ Reason: %3 &Find/Replace - + &Suchen/Ersetzen Find Dialog - + Suchdialog @@ -4591,37 +4770,32 @@ Reason: %3 Current Document - + Aktuelles Dokument Enter Find String - + Suchmuster eingeben - - Find.EnterFindString - - - - + Ctrl+E Find Next - + Nächste Fundstelle Find Previous - + Vorhergehende Fundstelle Replace && Find Next - + Ersetzen und weitersuchen @@ -4631,22 +4805,22 @@ Reason: %3 Replace && Find Previous - + Ersetzen und rückwarts weitersuchen Replace All - + Alles ersetzen Case Sensitive - + Groß/Kleinschreibung Whole Words Only - + Ganze Worte @@ -4654,22 +4828,22 @@ Reason: %3 Find - + Suchen Find: - + Suchen: Replace with: - + Ersetzen durch: All - + Alle @@ -4677,131 +4851,17 @@ Reason: %3 Search Results - + Suchergebnisse No matches found! - + Es wurden keine Treffer gefunden! Expand All - - - - - GdbOptionPage - - - Form - - - - - Gdb interaction - - - - - This is either a full abolute path leading to the gdb binary you intend to use or the name of a gdb binary that will be searched in your PATH. - - - - - Gdb location: - - - - - Environment: - - - - - This is either empty or points to a file containing gdb commands that will be executed immediately after gdb starts up. - - - - - Gdb startup script: - - - - - Behaviour of breakpoint setting in plugins - - - - - This is the slowest but safest option. - - - - - Try to set breakpoints in plugins always automatically. - - - - - Try to set breakpoints in selected plugins - - - - - Matching regular expression: - - - - - Never set breakpoints in plugins automatically - - - - - User interface - - - - - Checking this will populate the source file view automatically but might slow down debugger startup considerably. - - - - - Populate source file view automatically - - - - - When this option is checked, 'Step Into' compresses several steps into one in certain situations, leading to 'less noisy' debugging. So will, e.g., the atomic - reference counting code be skipped, and a single 'Step Into' for a signal emission will end up directly in the slot connected to it. - - - - - Skip known frames when stepping - - - - - Checking this will make enable tooltips for variable values during debugging. Since this can slow down debugging and does not provide reliable information as it does not use scope information, it is switched off by default. - - - - - Use tooltips while debugging - - - - - Maximal stack depth: - - - - - <unlimited> - + Alles aufklappen @@ -4987,7 +5047,7 @@ Reason: %3 Projects - + Projekte @@ -5033,7 +5093,7 @@ Reason: %3 Delete - + Löschen @@ -5465,12 +5525,12 @@ Reason: %3 &Undo - &Rückgangig + &Rückgangig &Redo - &Wiederholen + &Wiederholen @@ -5505,7 +5565,7 @@ Reason: %3 File - Datei + Datei @@ -5771,7 +5831,7 @@ Reason: %3 Contents - + Inhalt @@ -5780,33 +5840,33 @@ Reason: %3 Documentation - + Dokumentation Help - + Hilfe Add Documentation - + Dokumentation hinzufügen Qt Help Files (*.qch) - + Qt-Hilfedateien (*.qch) The file %1 is not a valid Qt Help file! - + Die Datei %1 ist keine gültige Qt-Hilfedatei! Cannot unregister documentation file %1! - + Die Dokumentationsdatei %1 kann nicht entladen werden! @@ -5814,12 +5874,12 @@ Reason: %3 Filters - + Filter Help - + Hilfe @@ -5827,7 +5887,7 @@ Reason: %3 Help index - + Hilfe - Index @@ -5835,97 +5895,97 @@ Reason: %3 Help - + Hilfe Help::Internal::HelpPlugin - + Contents - + Inhalt Index - + Index Search - + Suche Bookmarks - + Lesezeichen Home - + Startseite Previous - + Vorige Next - + Nächste Add Bookmark - + Lesezeichen hinzufügen Context Help - + Kontexthilfe Activate Index in Help mode - + Index im Modus "Hilfe" zeigen Activate Contents in Help mode - + Inhalt im Modus "Hilfe" zeigen Activate Search in Help mode - + Suchen im Modus "Hilfe" zeigen Unfiltered - + Kein <html><head><title>No Documentation</title></head><body><br/><center><b>%1</b><br/>No documentation available.</center></body></html> - + <html><head><title>Dokumentation fehlt</title></head><body><br/><center><b>%1</b><br/>Es ist keine Dokumentation verfügbar.</center></body></html> <html><head><title>No Documentation</title></head><body><br/><br/><center>No documentation available.</center></body></html> - + <html><head><title>Dokumentation fehlt</title></head><body><br/><br/><center>Es ist keine Dokumentation verfügbar.</center></body></html></center></body></html> Filtered by: - + Filter: @@ -5933,18 +5993,19 @@ Reason: %3 Failed to load keyword index file! - + Die Schlüsselwort-Indexdatei konnte nicht geladen werden! Cannot open the index file %1 - + DIe Indexdatei %1 kann nicht geöffnet werden Documentation file %1 does not exist! Skipping file. - + Die Dokumentationsdatei %1 existiert nicht! +Sie wird übersprungen. @@ -5952,12 +6013,12 @@ Skipping file. Look for: - + Suche nach: Index - + Index @@ -5965,28 +6026,28 @@ Skipping file. &Copy - &Kopieren + &Kopieren Copy &Link Location - + &Adresse kopieren Open Link in New Tab - + Adresse in neuem Reiter öffnen Select All - + Alles auswählen Open Link - + Adresse öffnen @@ -5995,7 +6056,8 @@ Skipping file. Documentation file %1 does not exist! Skipping file. - + Die Dokumentationsdatei %1 existiert nicht! +Sie wird übersprungen. @@ -6009,7 +6071,7 @@ Skipping file. Open Link in New Tab - + Adresse in neuem Reiter öffnen @@ -6019,7 +6081,7 @@ Skipping file. Help - + Hilfe @@ -6035,7 +6097,7 @@ Skipping file. Copy &Link Location - + &Adresse kopieren @@ -6053,12 +6115,12 @@ Skipping file. Open Link - + Adresse öffnen Open Link in New Tab - + Adresse in neuem Reiter öffnen @@ -6074,7 +6136,7 @@ Skipping file. Filters - + Filter @@ -6093,7 +6155,7 @@ Skipping file. File - Datei + Datei @@ -6178,7 +6240,7 @@ Skipping file. Debug - + Debuggen @@ -6193,7 +6255,7 @@ Skipping file. Open File - + Datei öffnen @@ -6293,7 +6355,7 @@ in your .pro file. Clear - + Löschen @@ -6345,7 +6407,7 @@ in your .pro file. Cancel - + Abbrechen @@ -6382,7 +6444,7 @@ in your .pro file. Edit - + Editieren @@ -6414,7 +6476,7 @@ in your .pro file. Delete - + Löschen @@ -6536,12 +6598,12 @@ in your .pro file. &Undo - &Rückgangig + &Rückgangig &Redo - &Wiederholen + &Wiederholen @@ -6842,22 +6904,22 @@ in your .pro file. Details - + Beschreibung Error Details - + Fehlermeldungen Installed Plugins - + Installierte Plugins Plugin Details of %1 - + Pluginbeschreibung zu %1 @@ -7092,7 +7154,7 @@ Library base name: %1 Files in any project - + Dateien aus allen Projekten @@ -7100,12 +7162,12 @@ Library base name: %1 All Projects - + Alle Projekte File &pattern: - + Such&muster für Dateinamen @@ -7131,7 +7193,7 @@ Library base name: %1 Run - + Ausführung @@ -7139,12 +7201,12 @@ Library base name: %1 Starting %1... - + Starte %1... %1 exited with code %2 - + %1 beendet, Rückgabewert %2 @@ -7152,7 +7214,7 @@ Library base name: %1 Build Settings - + 'Build'-Einstellungen @@ -7165,7 +7227,7 @@ Library base name: %1 Configurations - + Konfigurationen @@ -7188,12 +7250,12 @@ Library base name: %1 Create &New - + &Neu erzeugen &Clone Selected - + Auswahl duplizieren @@ -7204,43 +7266,43 @@ Library base name: %1 General - + Allgemein Build Steps - + Erstellungsschritte Set as Active - + Aktivieren Clone - + Duplizieren Delete - + Löschen New configuration - + Neue Konfiguration New Configuration Name: - + Name der neuen Konfiguration: Clone configuration - + Konfiguration duplizieren @@ -7253,7 +7315,7 @@ Library base name: %1 1 - 1 + 1 @@ -7278,7 +7340,7 @@ Library base name: %1 Build Steps - + Erstellungsschritte @@ -7287,34 +7349,34 @@ Library base name: %1 Compile Output - + Kompilierung ProjectExplorer::Internal::CoreListenerCheckingForRunningBuild - + Cancel Build && Close - + Erstellen abbrechen und schließen Don't Close - + Nicht schließen - - Close QtCreator? - - - - + A project is currently being built. - - Do you want to cancel the build process and close QtCreator anyway? + + Close Qt Creator? + + + + + Do you want to cancel the build process and close Qt Creator anyway? @@ -7336,7 +7398,7 @@ Library base name: %1 File &pattern: - + Such&muster für Dateinamen @@ -7344,7 +7406,7 @@ Library base name: %1 Name: - Name: + Name: @@ -7519,7 +7581,7 @@ Library base name: %1 Name: - Name: + Name: @@ -7582,7 +7644,7 @@ Library base name: %1 Projects - + Projekte @@ -7600,7 +7662,7 @@ Library base name: %1 Projects - + Projekte @@ -7626,6 +7688,117 @@ Library base name: %1 + + ProjectExplorer::Internal::QtOptionsPageWidget + + + <specify a name> + + + + + <specify a path> + + + + + Select QTDIR + + + + + Select the Qt Directory + + + + + The Qt Version %1 is not installed. Run make install + + + + + %1 is not a valid qt directory + + + + + Found Qt version %1, using mkspec %2 + + + + + ProjectExplorer::Internal::QtVersionManager + + + Form + + + + + Qt versions + + + + + + + + + + + - + + + + + Name + + + + + Path + + + + + Debugging Helper + + + + + Version Name: + + + + + Path: + Pfad: + + + + MinGw Directory: + + + + + Debugging Helper: + + + + + Show &Log + + + + + &Rebuild + + + + + Default Qt Version: + + + ProjectExplorer::Internal::RemoveFileDialog @@ -7690,27 +7863,27 @@ Library base name: %1 Session Manager - + Sessionverwaltung Choose your session - + Sitzung auswählen Create New Session - + Neue Sitzung erstellen Clone Session - + Sitzung duplizieren Delete Session - + Sitzung löschen @@ -7718,13 +7891,13 @@ Library base name: %1 Session - + Sitzung Untitled default file name to display - + kein Titel @@ -7741,12 +7914,12 @@ Library base name: %1 Build Issues - + &Copy - &Kopieren + &Kopieren @@ -7804,32 +7977,32 @@ Library base name: %1 Projects - + Projekte - + &Build - + &Erstellen &Debug - + &Debuggen Open With - + Öffnen mit Session Manager... - + Sitzungsverwaltung New Project... - + Neues Projekt... @@ -7839,7 +8012,7 @@ Library base name: %1 Load Project... - + Projekt laden @@ -7849,33 +8022,33 @@ Library base name: %1 Open File - + Datei öffnen Show in Finder... - + In Finder anzeigen... Recent Projects - + Zuletzt bearbeitete Projekte Unload Project - + Projekt entladen Unload All Projects - + Alle Projekte entladen Session - + Sitzung @@ -7885,7 +8058,7 @@ Library base name: %1 Build All - + Alles erstellen @@ -7895,18 +8068,18 @@ Library base name: %1 Rebuild All - + Alles neu erstellen Clean All - + Alles bereinigen Build Project - + Projekt erstellen @@ -7916,18 +8089,18 @@ Library base name: %1 Rebuild Project - + Projekt neu erstellen Clean Project - + Projekt bereinigen Run - + Ausführen @@ -7937,7 +8110,7 @@ Library base name: %1 Set Run Configuration - + Laufzeitkonfiguration setzen @@ -7947,13 +8120,13 @@ Library base name: %1 Cancel Build - + Erstellen abbrechen Start Debugging - + Debuggen @@ -7963,108 +8136,126 @@ Library base name: %1 Add New... - + Hinzufügen Add Existing Files... - + Existierende Datei hinzufügen Remove File... - + Datei entfernen... Rename - + Umbenennen Load Project - + Projekt laden New Project Title of dialog - Neues Projekt + Neues Projekt Unload Project "%1" - + Projekt "%1" entladen Build Project "%1" - + Projekt '%1" erstellen New File Title of dialog - + Neue Datei Add Existing Files - + Existierende Dateien hinzufügen Could not add following files to project %1: - + Die folgenden Dateien konnten nicht zum Projekt %1 hinzugefügt werden: + Add files to project failed - + Das Hinzufügen der Dateien zum Projekt schlug fehl Add to Version Control - + Unter Versionsverwaltung stellen Add files %1 to version control (%2)? - + Sollen die Dateien +%1 +unter Versionsverwaltung (%2) gestellt werden? Could not add following files to version control (%1) - + Die folgenden Dateien konnten nicht unter Versionsverwaltung (%1) gestellt werden + Add files to version control failed - + Die Hinzufügen der Dateien zur Versionsverwaltung schlug fehl Remove file failed - + Die Datei konnte nicht entfernt werden Could not remove file %1 from project %2. - + Die Datei %1 konnte nicht vom Projekt %2 entfernt werden. Delete file failed - + Das Löschen der Datei schlug fehl Could not delete file %1. - + Die Datei %1 konnte nicht gelöscht werden. + + + + ProjectExplorer::QtVersionManager + + + + Auto-detected Qt + Vorgefundene Qt-Installation + + + + <not found> + <nicht gefunden> @@ -8072,22 +8263,22 @@ to version control (%2)? Error while loading session - + Fehler beim Laden der Sitzung Could not load session %1 - + Die Sitzung %1 konnte nicht geladen werden Error while saving session - + Fehler beim Speichern der Sitzung Could not save session to file %1 - + Die Sitzung konnte nicht unter %1 gespeichert werden @@ -8098,20 +8289,12 @@ to version control (%2)? Untitled - + Kein Titel Session ('%1') - - - - - QHelpProjectPlugin::Internal::QHelpProjectManager - - - Qt Help Project File (*.qthp) - + Sitzung ('%1') @@ -8249,7 +8432,7 @@ to version control (%2)? Make writable - + Schreibbar machen @@ -8266,11 +8449,6 @@ to version control (%2)? FakeVim properties... - - - Files - - Pass @@ -8294,7 +8472,7 @@ to version control (%2)? Warning - + Warnung @@ -8362,36 +8540,43 @@ to version control (%2)? QrcEditor + Form + Add + Remove + Properties + Prefix: + Language: + Alias: @@ -8455,7 +8640,7 @@ to version control (%2)? 1 - 1 + 1 @@ -8480,7 +8665,7 @@ to version control (%2)? Cancel - + Abbrechen @@ -8508,7 +8693,7 @@ to version control (%2)? Delete - + Löschen @@ -8593,7 +8778,7 @@ to version control (%2)? Type - + Typ @@ -8619,7 +8804,7 @@ to version control (%2)? New - Neu + Neu @@ -8733,7 +8918,7 @@ to version control (%2)? Qt4ProjectManager::Internal::ProjectLoadWizard - + Import existing settings @@ -8754,9 +8939,104 @@ to version control (%2)? - Qt4ProjectManager::Internal::Qt4BuildConfigWidget + Qt4ProjectManager::Internal::Qt4BuildEnvironmentWidget - + + Form + + + + + Clear system environment + + + + + &Edit + &Bearbeiten + + + + &Add + + + + + &Reset + + + + + &Unset + + + + + Build Environment + + + + + Reset + + + + + Remove + + + + + Qt4ProjectManager::Internal::Qt4PriFileNode + + + + Failed! + Fehler + + + + Could not open the file for edit with SCC. + Die Datei konnte nicht mit Hilfe der Versionsverwaltung schreibbar gemacht werden. + + + + Could not set permissions to writable. + Die Datei konnte schreibbar gemacht werden. + + + + There are unsaved changes for project file %1. + + + + + Error while parsing file %1. Giving up. + + + + + Error while changing pro file %1. + + + + + Qt4ProjectManager::Internal::Qt4ProFileNode + + + Error while parsing file %1. Giving up. + + + + + Could not find .pro file for sub dir '%1' in '%2' + + + + + Qt4ProjectManager::Internal::Qt4ProjectConfigWidget + + Form @@ -8796,14 +9076,14 @@ to version control (%2)? - + Shadow Build Directory - + General - + Allgemein @@ -8811,114 +9091,19 @@ to version control (%2)? - - Qt4ProjectManager::Internal::Qt4BuildEnvironmentWidget - - - Form - - - - - Clear system environment - - - - - &Edit - &Bearbeiten - - - - &Add - - - - - &Reset - - - - - &Unset - - - - - Build Environment - - - - - Reset - - - - - Remove - - - - - Qt4ProjectManager::Internal::Qt4PriFileNode - - - - Failed! - - - - - Could not open the file for edit with SCC. - - - - - Could not set permissions to writable. - - - - - There are unsaved changes for project file %1. - - - - - Error while parsing file %1. Giving up. - - - - - Error while changing pro file %1. - - - - - Qt4ProjectManager::Internal::Qt4ProFileNode - - - Error while parsing file %1. Giving up. - - - - - Could not find .pro file for sub dir '%1' in '%2' - - - Qt4ProjectManager::Internal::Qt4ProjectManagerPlugin - + Run qmake - + qmake ausführen Qt4ProjectManager::Internal::Qt4RunConfiguration - + Qt4RunConfiguration @@ -8934,7 +9119,7 @@ to version control (%2)? Name: - Name: + Name: @@ -8962,126 +9147,11 @@ to version control (%2)? - - Qt4ProjectManager::Internal::QtDirWidget - - - <specify a name> - - - - - <specify a path> - - - - - Select QTDIR - - - - - Select the Qt Directory - - - - - The Qt Version %1 is not installed. Run make install - - - - - %1 is not a valid qt directory - - - - - Found Qt version %1, using mkspec %2 - - - Qt4ProjectManager::Internal::QtVersionManager - - Form - - - - - Qt versions - - - - - + - - - - - - - - - - - Name - - - - - Path - - - - - Debugging Helper - - - - - Version Name: - - - - Path: - Pfad: - - - - MinGw Directory: - - - - - Debugging Helper: - - - - - Show &Log - - - - - &Rebuild - - - - - Default Qt Version: - - - - - - Auto-detected Qt - - - - - <not found> - + Pfad: @@ -9162,7 +9232,7 @@ to version control (%2)? New - Neu + Neu @@ -9193,7 +9263,7 @@ to version control (%2)? Qt4ProjectManager::MakeStep - + <font color="#ff0000">Could not find make command: %1 in the build environment</font> @@ -9241,7 +9311,7 @@ to version control (%2)? Qt4ProjectManager::Qt4Manager - + Loading project %1 ... @@ -9317,7 +9387,7 @@ to version control (%2)? Filter Configuration - + Filterkonfiguration @@ -9340,7 +9410,7 @@ to version control (%2)? Filter Configuration - + Filterkonfiguration @@ -9380,7 +9450,7 @@ to version control (%2)? Name: - Name: + Name: @@ -9499,7 +9569,7 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and Configure... - + Einstellungen... @@ -9537,7 +9607,7 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and Edit - + Editieren @@ -9583,7 +9653,7 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and Edit - + Editieren @@ -9715,12 +9785,12 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and &Undo - &Rückgangig + &Rückgangig &Redo - &Wiederholen + &Wiederholen @@ -9728,7 +9798,7 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and untitled - + kein Titel @@ -9918,7 +9988,7 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and Label - + Sprungmarke @@ -9964,7 +10034,7 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and ShowBuildLog - + Debugging Helper Build Log @@ -10410,7 +10480,7 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and Delete - + Löschen @@ -10485,12 +10555,12 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and &Undo - &Rückgangig + &Rückgangig &Redo - &Wiederholen + &Wiederholen @@ -10615,7 +10685,7 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and Subversion Submit - Subversion Submit + Subversion Submit @@ -10624,17 +10694,17 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and %1 found - + %1 gefunden List of comma separated wildcard filters - + Liste von Suchmustern, durch Kommas getrennt Use Regular E&xpressions - + Benutze reguläre Ausdrücke @@ -10642,43 +10712,43 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and untitled - + kein Titel <em>Binary data</em> - + <em>Binäre Daten</em> TextEditor::BaseTextEditor - + Print Document - + Dokument drucken - + <b>Error:</b> Could not decode "%1" with "%2"-encoding. Editing not possible. - + <b>Fehler:</b> Die Datei "%1" kann nicht mit dem Encoding "%2" dargestellt werden. Sie kann nicht editiert werden. Select Encoding - + Encoding auswählen TextEditor::BaseTextEditorEditable - + Line: %1, Col: %2 - + Zeile: %1, Spalte: %2 Line: %1, Col: 999 - + Zeile: %1, Spalte: 999 @@ -10691,77 +10761,77 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and Storage - + Abspeichern Removes trailing whitespace on saving. - + Leerzeichen am Zeilenende beim Abspeichern entfernen. &Clean whitespace - + &Leerzeichen bereinigen Clean whitespace in entire document instead of only for changed parts. - + Bereinigt Leerzeichen im gesamten Dokument und nicht nur in den geänderten Teilen. In entire &document - + Im &gesamten Dokument Correct leading whitespace according to tab settings. - + Leerzeichen am Zeilenanfang entsprechend Tabulatoreinstellungen korrigieren. Clean indentation - + Einrückung korrigieren &Ensure newline at end of file - + &Zeilenvorschub am Dateiende anfügen Tabs and Indentation - + Tabulatoren und Einrückung Ta&b size: - + Tabulator&weite: &Indent size: - + &Einrückung: Backspace will go back one indentation level instead of one space. - + Die Rücktaste folgt der Einrückungstiefe anstatt nur ein Zeichen zu löschen. &Backspace follows indentation - + &Rücktaste folgt der Einrückungstiefe Insert &spaces instead of tabs - + Leerzeichen &anstelle Tabulatoren einfügen Enable automatic &indentation - + Automatische Ein&rückung @@ -10774,47 +10844,52 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and Display - + Anzeige Display line &numbers - + Zeilen&nummern anzeigen Display &folding markers - + Code&folding-Zeichen anzeigen Show tabs and spaces. - + Tabulatoren und Leerzeichen darstellen. &Visualize whitespace - + &Leerzeichen darstellen Highlight current &line - + Aktuelle &Zeile hervorheben Text Wrapping - + Umbruch Enable text &wrapping - + &Umbruch aktivieren Display right &margin at column: - + Rechten &Rand anzeigen bei Spalte: + + + + Highlight &blocks + Blöcke hervorheben @@ -10822,13 +10897,14 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and Font & Colors - + Zeichensatz und Farben This is only an example. - + + Dies ist ein Beispiel. @@ -10836,28 +10912,29 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and Text Encoding - + Text Encoding The following encodings are likely to fit: - + +Die folgenden Encodings scheinen der Datei zu entsprechen: Select encoding for "%1".%2 - + Auswahl des Encodings für "%1".%2 Reload with Encoding - + Neu laden Save with Encoding - + Mit Encoding abspeichern @@ -10865,27 +10942,27 @@ The following encodings are likely to fit: Files on Disk - + Dateien auf Datenträger &Directory: - + &Verzeichnis: &Browse - + &Auswählen File &pattern: - + Such&muster für Dateinamen Directory to search - + Verzeichnis @@ -10898,47 +10975,47 @@ The following encodings are likely to fit: Font - + Zeichensatz Family: - + Name: Size: - + Größe: Color Scheme - + Farbschema: Bold - + Fett Italic - + Kursiv Background: - + Hintergrund: Foreground: - + Zeichen: Erase background - + Hintergrund löschen @@ -10948,7 +11025,7 @@ The following encodings are likely to fit: Preview: - + Vorschau: @@ -10956,12 +11033,12 @@ The following encodings are likely to fit: Line in current document - + Zeile im aktuellenDokument Line %1 - + Zeile %1 @@ -10969,22 +11046,22 @@ The following encodings are likely to fit: This creates a new text file (.txt) - + Erzeugt eine neue Textdatei (.txt) Text File - + Textdatei General - + Allgemein Triggers a completion in this scope - + Beginnt eine Ergänzung in diesem Bereich @@ -11002,22 +11079,22 @@ The following encodings are likely to fit: &Undo - &Rückgangig + &Rückgangig &Redo - &Wiederholen + &Wiederholen Select Encoding... - + Encoding auswählen... Auto-&indent Selection - + Ein&rückung in Auswahl korrigieren @@ -11027,7 +11104,7 @@ The following encodings are likely to fit: &Visualize Whitespace - + &Leerzeichen anzeigen @@ -11037,12 +11114,12 @@ The following encodings are likely to fit: Clean Whitespace - + Leerzeichen bereinigen Enable Text &Wrapping - + Text&umbruch aktivieren @@ -11052,7 +11129,7 @@ The following encodings are likely to fit: (Un)Comment &Selection - + Auswahl aus&kommentieren @@ -11062,7 +11139,7 @@ The following encodings are likely to fit: Delete &Line - + &Zeile löschen @@ -11072,7 +11149,7 @@ The following encodings are likely to fit: Collapse - + Einklappen @@ -11082,7 +11159,7 @@ The following encodings are likely to fit: Expand - + Ausklappen @@ -11092,12 +11169,12 @@ The following encodings are likely to fit: (Un)&Collapse All - + Alles ein/aus&klappen Increase Font Size - + Schrift vergrößern @@ -11107,7 +11184,7 @@ The following encodings are likely to fit: Decrease Font Size - + Schrift verkleinern @@ -11117,7 +11194,7 @@ The following encodings are likely to fit: Goto Block Start - + Zum Blockanfang gehen @@ -11127,7 +11204,7 @@ The following encodings are likely to fit: Goto Block End - + Zum Blockende gehen @@ -11137,7 +11214,7 @@ The following encodings are likely to fit: Goto Block Start With Selection - + Zum Blockanfang mit Auswahl gehen @@ -11147,7 +11224,7 @@ The following encodings are likely to fit: Goto Block End With Selection - + Zum Blockende mit Auswahl gehen @@ -11157,7 +11234,7 @@ The following encodings are likely to fit: Select Block Up - + Einen Block nach oben auswählen @@ -11167,7 +11244,7 @@ The following encodings are likely to fit: Select Block Down - + Einen Block nach unten auswählen @@ -11177,7 +11254,7 @@ The following encodings are likely to fit: Move Line Up - + Eine Zeile nach oben gehen @@ -11187,7 +11264,7 @@ The following encodings are likely to fit: Move Line Down - + Eine Zeile nach unten gehen @@ -11197,7 +11274,7 @@ The following encodings are likely to fit: <line number> - + <Zeilennummer> @@ -11205,134 +11282,134 @@ The following encodings are likely to fit: Text - + Text Link - + Link Selection - + Auswahl Line Number - + Zeilennummer Search Result - + Suchergebnisse Search Scope - + Suchbereich Parentheses - + Klammern Current Line - + Aktuelle Zeile Number - + Zahl String - + Zeichenkette Type - + Typ Keyword - + Schlüsselwort Operator - + Operator Preprocessor - + Präprozessor Label - + Sprungmarke Comment - + Kommentar Doxygen Comment - + Doxygen-Kommentar Doxygen Tag - + Doxygen-Schlüsselwort Disabled Code - + Deaktivierter Code Added Line - + Hinzugefügte Zeile Removed Line - + Entfernte Zeile Diff File - + Diff-Dateiangabe Diff Location - + Diff-Zeilenangabe Text Editor - + Text Editor Behavior - + Verhalten Display - + Anzeige @@ -11414,7 +11491,7 @@ The following encodings are likely to fit: File - Datei + Datei @@ -11631,4 +11708,54 @@ p, li { white-space: pre-wrap; } + + welcomePage + + <style> +h1 { + font-size: 24px; + font-weight: normal; + color: #4d4d4d; + margin-top: 0px; + margin-bottom: 20px; +} + +p { + margin-top: 0px; + margin-bottom: 7px; +} +</style> + +<p>&nbsp;</p> +<h1>Welcome</h1> +<!-- QTextDocument does not support line-height, so wrap the lines manually ... --> +<p>Qt Creator is an intuitive, modern cross platform IDE that</p> <p>enables developers to create graphically appealing applications</p> +<p>for desktop, embedded, and mobile devices. Click on <strong>Getting</strong></p> +<p><strong>Started</strong> to begin developing with Qt Creator.</p> +<hr style="margin-top:15px"/> + + <style> +h1 { + font-size: 24px; + font-weight: normal; + color: #4d4d4d; + margin-top: 0px; + margin-bottom: 20px; +} + +p { + margin-top: 0px; + margin-bottom: 7px; +} +</style> + +<p>&nbsp;</p> +<h1>Welcome</h1> +<!-- QTextDocument does not support line-height, so wrap the lines manually ... --> +<p>Qt Creator ist eine intuitive, moderne cross-platform IDE, die</p> <p>es Entwicklern ermöglicht, graphisch ansprechende Anwendungen für die Bereiche Desktop und Embedded sowie</p> +<p>mobile Geräte zu erstellen. Klicken Sie auf <strong>Start</strong>,</p> +<p> um die Entwicklung mit Qt Creator zu beginnen.</p> +<hr style="margin-top:15px"/> + + diff --git a/share/qtcreator/translations/qtcreator_ja.ts b/share/qtcreator/translations/qtcreator_ja.ts index a98e6facbff..76a490e231e 100644 --- a/share/qtcreator/translations/qtcreator_ja.ts +++ b/share/qtcreator/translations/qtcreator_ja.ts @@ -347,8 +347,8 @@ CMakeProjectManager::Internal::CMakeBuildSettingsWidget - - Build directory: + + &Change @@ -363,12 +363,12 @@ CMakeProjectManager::Internal::CMakeRunPage - + Run CMake - + Arguments @@ -378,7 +378,7 @@ - + The directory %1 contains an outdated .cbp file. Qt Creator needs to update this file by running cmake. If you want to add additional command line arguments, add them in the below. Note, that cmake remembers command line arguments from the former runs. @@ -387,11 +387,16 @@ The directory %1 specified in a buildconfiguration, does not contain a cbp file. Qt Creator needs to recreate this file, by running cmake. Some projects require command line arguments to the initial cmake call. Note, that cmake remembers command line arguments from the former runs. + + + Qt Creator needs to run cmake in the new build directory. Some projects require command line arguments to the initial cmake call. + + CMakeProjectManager::Internal::CMakeSettingsPage - + CMake @@ -400,7 +405,7 @@ CMakeProjectManager::Internal::InSourceBuildPage - + Qt Creator has detected an in source build. This prevents shadow builds, Qt Creator won't allow you to change the build directory. If you want a shadow build, clean your source directory and open the project again. @@ -408,7 +413,7 @@ CMakeProjectManager::Internal::MakeStepConfigWidget - + Additional arguments: @@ -421,7 +426,12 @@ CMakeProjectManager::Internal::ShadowBuildPage - + + Please enter the directory in which you want to build your project. + + + + Please enter the directory in which you want to build your project. Qt Creator recommends to not use the source directory for building. This ensures that the source directory remains clean and enables multiple builds with different settings. @@ -434,7 +444,7 @@ CMakeProjectManager::Internal::XmlFileUpToDatePage - + Qt Creator has found a recent cbp file, which Qt Creator will parse to gather information about the project. You can change the command line arguments used to create this file in the project mode. Click finish to load the project @@ -452,6 +462,47 @@ + + CdbDumperHelper + + + Loading dumpers... + + + + + The debugger does not appear to be Qt application. + + + + + The dumper module appears to be already loaded. + + + + + Dumper library '%1' loaded. + + + + + The dumper library '%1' could not be loaded: +%2 + + + + + <none> + + + + + %n known types, Qt version: %1, Qt namespace: %2 + + + + + CdbOptionsPageWidget @@ -1111,6 +1162,14 @@ Would you like to overwrite them? + + Core::Internal::EditMode + + + Edit + + + Core::Internal::EditorSplitter @@ -1629,8 +1688,91 @@ Would you like to overwrite them? Core::Internal::WelcomeMode - - (last session) + + %1 (last session) + + + + + Core::Internal::WelcomePage + + + <style> +h1 { + font-size: 24px; + font-weight: normal; + color: #4d4d4d; + margin-top: 0px; + margin-bottom: 20px; +} + +p { + margin-top: 0px; + margin-bottom: 7px; +} +</style> + +<p>&nbsp;</p> +<h1>Welcome</h1> +<!-- QTextDocument does not support line-height, so wrap the lines manually ... --> +<p>Qt Creator is an intuitive, modern cross platform IDE that</p> <p>enables developers to create graphically appealing applications</p> +<p>for desktop, embedded, and mobile devices. Click on <strong>Getting</strong></p> +<p><strong>Started</strong> to begin developing with Qt Creator.</p> +<hr style="margin-top:15px"/> + + + + + + * { + background-image: url(":/core/images/welcomemode/btn_getting_started.png"); +} + +*:hover { + background-image: url(:/core/images/welcomemode/btn_getting_started_hover.png) +} + + + + + + #recentSessionsFrame { +border-image: url(:/core/images/welcomemode/rc_combined.png) 8 8 8 8 stretch stretch; +border-width: 8 8 8 8; +} + + + + + + * { + background-image: url(":/core/images/welcomemode/btn_restore_session.png"); +} + +*:hover { + background-image: url(:/core/images/welcomemode/btn_restore_session_hover.png) +} + + + + + + #bottomWidget { +background-image: url(:/core/images/welcomemode/feedback-bar-background.png); +} + + + + + + * { + background-image: url(":/core/images/welcomemode/btn_feedback.png"); +} + +*:hover { + background-image: url(:/core/images/welcomemode/btn_feedback_hover.png) +} + @@ -1982,6 +2124,14 @@ Would you like to overwrite them? + + CppEditor::Internal::CPPEditor + + + Sort alphabetically + + + CppEditor::Internal::ClassNamePage @@ -2027,7 +2177,7 @@ Would you like to overwrite them? CppEditor::Internal::CppPlugin - + C++ @@ -2328,22 +2478,22 @@ Would you like to overwrite them? Debugger::Internal::CdbDebugEngine - + Unable to load the debugger engine library '%1': %2 - + Unable to resolve '%1' in the debugger engine library '%2' - + The dumper library '%1' does not exist. - + The console stub process was unable to start '%1'. @@ -2368,7 +2518,7 @@ Would you like to overwrite them? - + Unable to assign the value '%1' to '%2': %3 @@ -2378,7 +2528,7 @@ Would you like to overwrite them? - + Debugger Error @@ -4595,12 +4745,7 @@ Reason: %3 - - Find.EnterFindString - - - - + Ctrl+E @@ -4689,115 +4834,8 @@ Reason: %3 GdbOptionPage - Form - フォーム - - - - Environment: - - - - - This is either empty or points to a file containing gdb commands that will be executed immediately after gdb starts up. - - - - - When this option is checked, 'Step Into' compresses several steps into one in certain situations, leading to 'less noisy' debugging. So will, e.g., the atomic - reference counting code be skipped, and a single 'Step Into' for a signal emission will end up directly in the slot connected to it. - - - - - Skip known frames when stepping - - - - - Checking this will make enable tooltips for variable values during debugging. Since this can slow down debugging and does not provide reliable information as it does not use scope information, it is switched off by default. - - - - - Use tooltips while debugging - - - - - Gdb interaction - - - - - This is either a full abolute path leading to the gdb binary you intend to use or the name of a gdb binary that will be searched in your PATH. - - - - - Gdb location: - - - - - Gdb startup script: - - - - - Behaviour of breakpoint setting in plugins - - - - - This is the slowest but safest option. - - - - - Try to set breakpoints in plugins always automatically. - - - - - Try to set breakpoints in selected plugins - - - - - Matching regular expression: - - - - - Never set breakpoints in plugins automatically - - - - - User interface - - - - - Checking this will populate the source file view automatically but might slow down debugger startup considerably. - - - - - Populate source file view automatically - - - - - Maximal stack depth: - - - - - <unlimited> - + フォーム @@ -5832,7 +5870,7 @@ Reason: %3 Help::Internal::HelpPlugin - + Contents コンテンツ @@ -7285,7 +7323,7 @@ Library base name: %1 ProjectExplorer::Internal::CoreListenerCheckingForRunningBuild - + Cancel Build && Close @@ -7295,18 +7333,18 @@ Library base name: %1 - - Close QtCreator? - - - - + A project is currently being built. - - Do you want to cancel the build process and close QtCreator anyway? + + Close Qt Creator? + + + + + Do you want to cancel the build process and close Qt Creator anyway? @@ -7618,6 +7656,117 @@ Library base name: %1 + + ProjectExplorer::Internal::QtOptionsPageWidget + + + <specify a name> + + + + + <specify a path> + + + + + Select QTDIR + + + + + Select the Qt Directory + + + + + The Qt Version %1 is not installed. Run make install + + + + + %1 is not a valid qt directory + + + + + Found Qt version %1, using mkspec %2 + + + + + ProjectExplorer::Internal::QtVersionManager + + + Form + フォーム + + + + Qt versions + + + + + + + + + + + - + + + + + Name + + + + + Path + + + + + Debugging Helper + + + + + Version Name: + + + + + Path: + + + + + MinGw Directory: + + + + + Debugging Helper: + + + + + Show &Log + + + + + &Rebuild + + + + + Default Qt Version: + + + ProjectExplorer::Internal::RemoveFileDialog @@ -7799,7 +7948,7 @@ Library base name: %1 プロジェクト - + &Build @@ -8059,6 +8208,20 @@ to version control (%2)? + + ProjectExplorer::QtVersionManager + + + + Auto-detected Qt + + + + + <not found> + + + ProjectExplorer::SessionManager @@ -8098,14 +8261,6 @@ to version control (%2)? - - QHelpProjectPlugin::Internal::QHelpProjectManager - - - Qt Help Project File (*.qthp) - - - QLibrary @@ -8249,9 +8404,8 @@ to version control (%2)? - Files - ファイル + ファイル @@ -8354,36 +8508,43 @@ to version control (%2)? QrcEditor + Form フォーム + Add 追加 + Remove 削除 + Properties + Prefix: + Language: + Alias: @@ -8725,7 +8886,7 @@ to version control (%2)? Qt4ProjectManager::Internal::ProjectLoadWizard - + Import existing settings @@ -8748,59 +8909,12 @@ to version control (%2)? Qt4ProjectManager::Internal::Qt4BuildConfigWidget - Form - フォーム + フォーム - - Configuration Name: - - - - - Qt Version: - - - - - Manage Qt Versions - - - - - This Qt-Version is invalid. - - - - - Shadow Build: - - - - - Build Directory: - - - - - <a href="import">Import existing build</a> - - - - - Shadow Build Directory - - - - General - 全般 - - - - Default Qt Version - + 全般 @@ -8854,7 +8968,7 @@ to version control (%2)? Qt4ProjectManager::Internal::Qt4PriFileNode - + Failed! @@ -8898,10 +9012,68 @@ to version control (%2)? + + Qt4ProjectManager::Internal::Qt4ProjectConfigWidget + + + Form + フォーム + + + + Configuration Name: + + + + + Qt Version: + + + + + Manage Qt Versions + + + + + This Qt-Version is invalid. + + + + + Shadow Build: + + + + + Build Directory: + + + + + <a href="import">Import existing build</a> + + + + + Shadow Build Directory + + + + + General + 全般 + + + + Default Qt Version + + + Qt4ProjectManager::Internal::Qt4ProjectManagerPlugin - + Run qmake @@ -8910,7 +9082,7 @@ to version control (%2)? Qt4ProjectManager::Internal::Qt4RunConfiguration - + Qt4RunConfiguration @@ -8954,126 +9126,11 @@ to version control (%2)? - - Qt4ProjectManager::Internal::QtDirWidget - - - <specify a name> - - - - - <specify a path> - - - - - Select QTDIR - - - - - Select the Qt Directory - - - - - The Qt Version %1 is not installed. Run make install - - - - - %1 is not a valid qt directory - - - - - Found Qt version %1, using mkspec %2 - - - Qt4ProjectManager::Internal::QtVersionManager - Form - フォーム - - - - Qt versions - - - - - + - - - - - - - - - - - Name - - - - - Path - - - - - Version Name: - - - - - Path: - - - - - MinGw Directory: - - - - - Default Qt Version: - - - - - Debugging Helper - - - - - Debugging Helper: - - - - - Show &Log - - - - - &Rebuild - - - - - - Auto-detected Qt - - - - - <not found> - + フォーム @@ -9185,7 +9242,7 @@ to version control (%2)? Qt4ProjectManager::MakeStep - + <font color="#ff0000">Could not find make command: %1 in the build environment</font> @@ -9233,7 +9290,7 @@ to version control (%2)? Qt4ProjectManager::Qt4Manager - + Loading project %1 ... @@ -9956,7 +10013,7 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and ShowBuildLog - + Debugging Helper Build Log @@ -10645,12 +10702,12 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and TextEditor::BaseTextEditor - + Print Document ドキュメントを印刷 - + <b>Error:</b> Could not decode "%1" with "%2"-encoding. Editing not possible. @@ -10663,7 +10720,7 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and TextEditor::BaseTextEditorEditable - + Line: %1, Col: %2 @@ -10808,6 +10865,11 @@ To do this you type this shortcut and a space in the QuickOpen entry field, and Display right &margin at column: + + + Highlight &blocks + + TextEditor::FontSettingsPage diff --git a/src/plugins/coreplugin/editmode.cpp b/src/plugins/coreplugin/editmode.cpp index d9a812bc77f..b3115a7006d 100644 --- a/src/plugins/coreplugin/editmode.cpp +++ b/src/plugins/coreplugin/editmode.cpp @@ -91,7 +91,7 @@ EditMode::~EditMode() QString EditMode::name() const { - return QLatin1String("Edit"); + return tr("Edit"); } QIcon EditMode::icon() const diff --git a/src/plugins/coreplugin/welcomemode.cpp b/src/plugins/coreplugin/welcomemode.cpp index adf3e933f3d..ac8f87874ba 100644 --- a/src/plugins/coreplugin/welcomemode.cpp +++ b/src/plugins/coreplugin/welcomemode.cpp @@ -52,7 +52,7 @@ struct WelcomeModePrivate QWidget *m_widget; QWidget *m_welcomePage; - Ui::welcomePage ui; + Ui::WelcomePage ui; WelcomeMode::WelcomePageData lastData; }; diff --git a/src/plugins/coreplugin/welcomemode.ui b/src/plugins/coreplugin/welcomemode.ui index c4189e142df..8692e27c711 100644 --- a/src/plugins/coreplugin/welcomemode.ui +++ b/src/plugins/coreplugin/welcomemode.ui @@ -1,7 +1,7 @@ - welcomePage - + Core::Internal::WelcomePage + 0 diff --git a/src/plugins/find/findtoolbar.cpp b/src/plugins/find/findtoolbar.cpp index 97f66d5d275..675e5334811 100644 --- a/src/plugins/find/findtoolbar.cpp +++ b/src/plugins/find/findtoolbar.cpp @@ -154,7 +154,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen if (QApplication::clipboard()->supportsFindBuffer()) { m_enterFindStringAction = new QAction(tr("Enter Find String"), this); - cmd = am->registerAction(m_enterFindStringAction, tr("Find.EnterFindString"), globalcontext); + cmd = am->registerAction(m_enterFindStringAction, QLatin1String("Find.EnterFindString"), globalcontext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E"))); mfind->addAction(cmd, Constants::G_FIND_ACTIONS); connect(m_enterFindStringAction, SIGNAL(triggered()), this, SLOT(putSelectionToFindClipboard())); diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 320b89de503..af2289699f9 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -114,9 +114,9 @@ bool CoreListenerCheckingForRunningBuild::coreAboutToClose() QPushButton *closeAnyway = box.addButton(tr("Cancel Build && Close"), QMessageBox::AcceptRole); QPushButton *cancelClose = box.addButton(tr("Don't Close"), QMessageBox::RejectRole); box.setDefaultButton(cancelClose); - box.setWindowTitle(tr("Close QtCreator?")); + box.setWindowTitle(tr("Close Qt Creator?")); box.setText(tr("A project is currently being built.")); - box.setInformativeText(tr("Do you want to cancel the build process and close QtCreator anyway?")); + box.setInformativeText(tr("Do you want to cancel the build process and close Qt Creator anyway?")); box.exec(); return (box.clickedButton() == closeAnyway); } From 713105ad85ab06b393d70ab0d13707b389f28be4 Mon Sep 17 00:00:00 2001 From: con Date: Fri, 24 Apr 2009 16:00:19 +0200 Subject: [PATCH 05/10] Some documentation. --- doc/api/qtcreator-api.qdoc | 98 ++++++++++++++++++- doc/api/qtcreator-api.qdocconf | 6 +- doc/doc.pri | 2 + .../coreplugin/actionmanager/command.cpp | 4 - .../coreplugin/actionmanager/commandsfile.cpp | 1 - src/plugins/coreplugin/basemode.cpp | 1 - src/plugins/coreplugin/baseview.cpp | 75 -------------- src/plugins/coreplugin/coreplugin.pro | 12 +-- src/plugins/coreplugin/dialogs/ioptionspage.h | 15 --- .../coreplugin/editormanager/ieditor.h | 29 +----- src/plugins/coreplugin/filemanager.cpp | 5 +- src/plugins/cppeditor/cppeditor.cpp | 41 +------- src/plugins/cppeditor/cppeditor.h | 6 +- src/plugins/cppeditor/cppplugin.cpp | 33 +------ src/plugins/cppeditor/cppplugin.h | 12 --- src/plugins/find/findplugin.cpp | 14 +++ src/plugins/quickopen/quickopenplugin.cpp | 10 +- 17 files changed, 138 insertions(+), 226 deletions(-) diff --git a/doc/api/qtcreator-api.qdoc b/doc/api/qtcreator-api.qdoc index 1cf030faaca..12d4179cb8a 100644 --- a/doc/api/qtcreator-api.qdoc +++ b/doc/api/qtcreator-api.qdoc @@ -9,6 +9,8 @@ simple means for plugin cooperation that allow plugins to provide hooks for other plugin's extensions. + To get an overview of what parts of QtCreator are extensible, have a look at the \l{Common Extension Tasks} page. + \section1 Core Libraries There are a few core libraries used by many parts of Qt Creator. @@ -19,12 +21,12 @@ \o Description \row - \o \l{Aggregation}{Aggregation} + \o \l{Aggregation} \o Adds functionality for "glueing" QObjects of different types together, so you can "cast" between them. \row - \o \l{ExtensionSystem}{ExtensionSystem} + \o \l{ExtensionSystem} \o Implements the plugin loader framework. Provides a base class for plugins and basic mechanisms for plugin interaction like an object pool. @@ -43,10 +45,18 @@ \o Description \row - \o \l{Core} {Core} + \o \l{Core} \o The core plugin. Provides the main window and managers for editors, actions, mode windows and files, just to mention the most important ones. + \row + \o \l{Find} + \o Support for searching text in arbitrary widgets, and arbitrary other things. + + \row + \o \l{QuickOpen} + \o Hooks for providing content for Locator. + \endtable */ @@ -79,3 +89,85 @@ \generatelist functionindex */ +/*! + \page common_extension_tasks.html + \title Common Extension Tasks + + \table + \header + \o Task + \o Details + \o API + + \row + \o Add a menu / menu entry. + \o You can extend existing menus or create new ones. + \o \l{Core::ActionManager}, \l{Core::Command}, \l{Core::ICore::actionManager()} + + \row + \o Add a configurable keyboard shortcut. + \o Registerng shortcuts makes it possible for users to configure them in the common shortcut settings dialog. + \o \l{Core::ActionManager}, \l{Core::Command}, \l{Core::ICore::actionManager()} + + \row + \o Add a mode. + \o Modes correspond to complete screens of controls, specialized for a task. + \o \l{Core::IMode}, \l{Core::BaseMode} + + \row + \o Add a new editor type. + \o Like an editor for xml files. + \o \l{Core::IEditorFactory}, \l{Core::IEditor}, \l{Core::IFile} + + \row + \o Add a "New" wizard. + \o That is added to the list when users do File->New..., allows you to basically do whatever you want. + \o \l{Core::IWizard}, \l{Core::StandardFileWizard}, \l{Core::BaseFileWizard}, \l{Core::BaseFileWizardParameters} + + \row + \o Add support for a new version control system. + \o Version control systems provided by QtCreator itself are Perforce, Git and Subversion. + \o \l{Core::IVersionControl} + + \row + \o Add a view to the navigation sidebar. + \o The one which shows the project tree, filesystem, open documents or bookmarks. + \o \l{Core::INavigationWidgetFactory} + + \row + \o Add a preferences page to the preferences dialog. + \o Add a new page to existing or new category in Tools->Options. + \o \l{Core::IOptionsPage} + + \row + \o Add a find filter for the find dialog. + \o Implement any kind of search term based search. + \o \l{Find::IFindFilter}, \l{Find::SearchResultWindow}, \l{Find::ResultWindowItem} + + \row + \o Add support for the find tool bar to a widget. + \o The widget that has focus is asked if it supports text search, you can provide that for widgets under your control. + \o \l{Find::IFindSupport}, \l{Find::BaseTextFind} + + \row + \o Add a completely new project type. + \o + \o + + \row + \o Add a new type of build step. + \o + \o + + \row + \o Add a new filter to Locator. + \o For a text typed in by the user you provide a list of things to show in the popup. When the user selects an entry you are requested to do whatever you want. + \o \l{QuickOpen::IQuickOpenFilter}, \l{QuickOpen::FilterEntry}, \l{QuickOpen::BaseFileFilter} + + \row + \o + \o + \o + + \endtable +*/ diff --git a/doc/api/qtcreator-api.qdocconf b/doc/api/qtcreator-api.qdocconf index 476c8e6a4df..9396d126257 100644 --- a/doc/api/qtcreator-api.qdocconf +++ b/doc/api/qtcreator-api.qdocconf @@ -7,13 +7,15 @@ headerdirs = . \ ../../src/libs/aggregation \ ../../src/libs/extensionsystem \ ../../src/plugins/coreplugin \ - ../../src/plugins/coreplugin/actionmanager + ../../src/plugins/find \ + ../../src/plugins/quickopen sourcedirs = . \ ../../src/libs/aggregation \ ../../src/libs/extensionsystem \ ../../src/plugins/coreplugin \ - ../../src/plugins/coreplugin/actionmanager + ../../src/plugins/find \ + ../../src/plugins/quickopen headers.fileextesnions = "*.h" sources.fileextensions = "*.cpp *.qdoc" diff --git a/doc/doc.pri b/doc/doc.pri index 1b1918c6d63..67428a03892 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -44,3 +44,5 @@ macx { OTHER_FILES = qtcreator.qdoc \ qtcreator.qdocconf +OTHER_FILES += api/qtcreator-api.qdoc \ + api/qtcreator-api.qdocconf diff --git a/src/plugins/coreplugin/actionmanager/command.cpp b/src/plugins/coreplugin/actionmanager/command.cpp index d8292551f6d..28ff14195e2 100644 --- a/src/plugins/coreplugin/actionmanager/command.cpp +++ b/src/plugins/coreplugin/actionmanager/command.cpp @@ -36,7 +36,6 @@ /*! \class Core::Command \mainclass - \ingroup qwb \brief The class... @@ -197,7 +196,6 @@ QString CommandPrivate::stringWithAppendedShortcut(const QString &str) const /*! \class Shortcut - \ingroup qwb */ /*! @@ -309,7 +307,6 @@ bool Shortcut::isActive() const /*! \class Action - \ingroup qwb */ /*! @@ -401,7 +398,6 @@ QKeySequence Action::keySequence() const /*! \class OverrideableAction - \ingroup qwb */ /*! diff --git a/src/plugins/coreplugin/actionmanager/commandsfile.cpp b/src/plugins/coreplugin/actionmanager/commandsfile.cpp index 08890a2e1dd..fcfaea28981 100644 --- a/src/plugins/coreplugin/actionmanager/commandsfile.cpp +++ b/src/plugins/coreplugin/actionmanager/commandsfile.cpp @@ -42,7 +42,6 @@ using namespace Core::Internal; /*! \class CommandsFile \brief The CommandsFile class provides a collection of import and export commands. - \ingroup qwb \inheaderfile commandsfile.h */ diff --git a/src/plugins/coreplugin/basemode.cpp b/src/plugins/coreplugin/basemode.cpp index 04467c23f8a..b0c3680ebd8 100644 --- a/src/plugins/coreplugin/basemode.cpp +++ b/src/plugins/coreplugin/basemode.cpp @@ -38,7 +38,6 @@ using namespace Core; /*! \class BaseMode \mainclass - \ingroup qwb \inheaderfile basemode.h \brief A base implementation of the mode interface IMode. diff --git a/src/plugins/coreplugin/baseview.cpp b/src/plugins/coreplugin/baseview.cpp index 0365e64b126..a03b6e88a4e 100644 --- a/src/plugins/coreplugin/baseview.cpp +++ b/src/plugins/coreplugin/baseview.cpp @@ -33,42 +33,6 @@ using namespace Core; -/*! - \class BaseView - \mainclass - \ingroup qwb - \inheaderfile baseview.h - \brief A base implementation of IView. - - The BaseView class can be used directly for most IView implementations. - It has setter functions for the views properties, and a convenience constructor - for the most important ones. - - The ownership of the widget is given to the BaseView, so when the BaseView is destroyed it - deletes its widget. - - A typical use case is to do the following in the init method of a plugin: - \code - bool MyPlugin::init(QString *error_message) - { - [...] - addObject(new Core::BaseView("myplugin.myview", - new MyWidget, - QList() << myContextId, - Qt::LeftDockWidgetArea, - this)); - [...] - } - \endcode -*/ - -/*! - \fn BaseView::BaseView() - - Creates a View with empty view name, no widget, empty context, NoDockWidgetArea, - no menu group and empty default shortcut. You should use the setter functions - to give the view a meaning. -*/ BaseView::BaseView(QObject *parent) : IView(parent), m_viewName(""), @@ -78,66 +42,37 @@ BaseView::BaseView(QObject *parent) { } -/*! - \fn BaseView::~BaseView() - - Destructor also destroys the widget. -*/ BaseView::~BaseView() { delete m_widget; } -/*! - \fn const QList &BaseView::context() const -*/ QList BaseView::context() const { return m_context; } -/*! - \fn QWidget *BaseView::widget() -*/ QWidget *BaseView::widget() { return m_widget; } -/*! - \fn const char *BaseView::uniqueViewName() const -*/ const char *BaseView::uniqueViewName() const { return m_viewName; } -/*! - \fn IView::ViewPosition BaseView::defaultPosition() const -*/ IView::ViewPosition BaseView::defaultPosition() const { return m_defaultPosition; } -/*! - \fn void BaseView::setUniqueViewName(const char *name) - - \a name -*/ void BaseView::setUniqueViewName(const char *name) { m_viewName = name; } -/*! - \fn QWidget *BaseView::setWidget(QWidget *widget) - - The BaseView takes the ownership of the \a widget. The previously - set widget (if existent) is not deleted but returned, and responsibility - for deleting it moves to the caller of this method. -*/ QWidget *BaseView::setWidget(QWidget *widget) { QWidget *oldWidget = m_widget; @@ -145,21 +80,11 @@ QWidget *BaseView::setWidget(QWidget *widget) return oldWidget; } -/*! - \fn void BaseView::setContext(const QList &context) - - \a context -*/ void BaseView::setContext(const QList &context) { m_context = context; } -/*! - \fn void BaseView::setDefaultPosition(IView::ViewPosition position) - - \a position -*/ void BaseView::setDefaultPosition(IView::ViewPosition position) { m_defaultPosition = position; diff --git a/src/plugins/coreplugin/coreplugin.pro b/src/plugins/coreplugin/coreplugin.pro index 3fd27bb5352..5eedf3bab85 100644 --- a/src/plugins/coreplugin/coreplugin.pro +++ b/src/plugins/coreplugin/coreplugin.pro @@ -4,7 +4,6 @@ DEFINES += CORE_LIBRARY QT += xml \ script \ svg - include(../../qworkbenchplugin.pri) include(../../libs/utils/utils.pri) include(../../shared/scriptwrapper/scriptwrapper.pri) @@ -72,7 +71,9 @@ SOURCES += mainwindow.cpp \ sidebar.cpp \ fileiconprovider.cpp \ mimedatabase.cpp \ - icore.cpp + icore.cpp \ + editormanager/ieditor.cpp \ + dialogs/ioptionspage.cpp HEADERS += mainwindow.h \ welcomemode.h \ welcomemode_p.h \ @@ -160,12 +161,9 @@ FORMS += dialogs/newdialog.ui \ welcomemode.ui RESOURCES += core.qrc \ fancyactionbar.qrc - -linux-* { +linux-* { images.files = images/qtcreator_logo_*.png - images.path = /share/pixmaps - + images.path = /share/pixmaps INSTALLS += images } - OTHER_FILES += Core.pluginspec diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.h b/src/plugins/coreplugin/dialogs/ioptionspage.h index 35c4b6b4f46..8d895a3da29 100644 --- a/src/plugins/coreplugin/dialogs/ioptionspage.h +++ b/src/plugins/coreplugin/dialogs/ioptionspage.h @@ -38,21 +38,6 @@ namespace Core { -/*! - \class Core::IOptionsPage - \brief The IOptionsPage is an interface for providing options pages. - - Guidelines for implementing: - \list - \o id() is an id used for filtering when calling ICore:: showOptionsDialog() - \o trName() is the (translated) name for display. - \o category() is the category used for filtering when calling ICore:: showOptionsDialog() - \o trCategory() is the translated category - \o apply() is called to store the settings. It should detect if any changes have been - made and store those. - \endlist -*/ - class CORE_EXPORT IOptionsPage : public QObject { Q_OBJECT diff --git a/src/plugins/coreplugin/editormanager/ieditor.h b/src/plugins/coreplugin/editormanager/ieditor.h index 927220c296f..789863cce39 100644 --- a/src/plugins/coreplugin/editormanager/ieditor.h +++ b/src/plugins/coreplugin/editormanager/ieditor.h @@ -40,31 +40,6 @@ QT_END_NAMESPACE namespace Core { -/*! - \class Core::IEditor - \brief The IEditor is an interface for providing different editors for different file types. - - Classes that implement this interface are for example the editors for - C++ files, ui-files and resource files. - - Whenever a user wants to edit or create a file, the EditorManager scans all - EditorFactoryInterfaces for suitable editors. The selected EditorFactory - is then asked to create an editor, which must implement this interface. - - Guidelines for implementing: - \list - \o displayName() is used as a user visible description of the document (usually filename w/o path). - \o kind() must be the same value as the kind() of the corresponding EditorFactory. - \o The changed() signal should be emitted when the modified state of the document changes - (so /bold{not} every time the document changes, but /bold{only once}). - \o If duplication is supported, you need to ensure that all duplicates - return the same file(). - \endlist - - \sa Core::EditorFactoryInterface Core::IContext - -*/ - class CORE_EXPORT IEditor : public IContext { Q_OBJECT @@ -85,8 +60,8 @@ public: virtual QByteArray saveState() const = 0; virtual bool restoreState(const QByteArray &state) = 0; - virtual int currentLine() const { return 0; }; - virtual int currentColumn() const { return 0; }; + virtual int currentLine() const { return 0; } + virtual int currentColumn() const { return 0; } virtual QToolBar *toolBar() = 0; diff --git a/src/plugins/coreplugin/filemanager.cpp b/src/plugins/coreplugin/filemanager.cpp index a13c72accc3..5a9276fd851 100644 --- a/src/plugins/coreplugin/filemanager.cpp +++ b/src/plugins/coreplugin/filemanager.cpp @@ -56,7 +56,6 @@ using namespace Core::Internal; /*! \class FileManager \mainclass - \ingroup qwb \inheaderfile filemanager.h \brief Manages a set of IFile objects. @@ -549,7 +548,7 @@ void FileManager::saveRecentFiles() The current file is e.g. the file currently opened when an editor is active, or the selected file in case a Project Explorer is active ... - \see currentFile + \sa currentFile */ void FileManager::setCurrentFile(const QString &filePath) { @@ -565,7 +564,7 @@ void FileManager::setCurrentFile(const QString &filePath) The current file is e.g. the file currently opened when an editor is active, or the selected file in case a Project Explorer is active ... - \see setCurrentFile + \sa setCurrentFile */ QString FileManager::currentFile() const { diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index cc28c720e91..3544cf3f2d3 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -75,7 +75,6 @@ #include #include #include -#include using namespace CPlusPlus; using namespace CppEditor::Internal; @@ -244,22 +243,7 @@ void CPPEditor::createToolBar(CPPEditorEditable *editable) m_methodCombo->setMaxVisibleItems(20); m_overviewModel = new OverviewModel(this); - m_proxyModel = new QSortFilterProxyModel(this); - m_proxyModel->setSourceModel(m_overviewModel); - if (CppPlugin::instance()->sortedMethodOverview()) - m_proxyModel->sort(0, Qt::AscendingOrder); - else - m_proxyModel->sort(-1, Qt::AscendingOrder); // don't sort yet, but set column for sortedMethodOverview() - m_proxyModel->setDynamicSortFilter(true); - m_proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); - m_methodCombo->setModel(m_proxyModel); - - m_methodCombo->setContextMenuPolicy(Qt::ActionsContextMenu); - m_sortAction = new QAction(tr("Sort alphabetically"), m_methodCombo); - m_sortAction->setCheckable(true); - m_sortAction->setChecked(sortedMethodOverview()); - connect(m_sortAction, SIGNAL(toggled(bool)), CppPlugin::instance(), SLOT(setSortedMethodOverview(bool))); - m_methodCombo->addAction(m_sortAction); + m_methodCombo->setModel(m_overviewModel); connect(m_methodCombo, SIGNAL(activated(int)), this, SLOT(jumpToMethod(int))); connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(updateMethodBoxIndex())); @@ -382,7 +366,7 @@ void CPPEditor::updateFileName() void CPPEditor::jumpToMethod(int) { - QModelIndex index = m_proxyModel->mapToSource(m_methodCombo->view()->currentIndex()); + QModelIndex index = m_methodCombo->view()->currentIndex(); Symbol *symbol = m_overviewModel->symbolFromIndex(index); if (! symbol) return; @@ -390,25 +374,6 @@ void CPPEditor::jumpToMethod(int) openCppEditorAt(linkToSymbol(symbol)); } -void CPPEditor::setSortedMethodOverview(bool sort) -{ - if (sort != sortedMethodOverview()) { - if (sort) - m_proxyModel->sort(0, Qt::AscendingOrder); - else - m_proxyModel->sort(-1, Qt::AscendingOrder); - bool block = m_sortAction->blockSignals(true); - m_sortAction->setChecked(m_proxyModel->sortColumn() == 0); - m_sortAction->blockSignals(block); - updateMethodBoxIndex(); - } -} - -bool CPPEditor::sortedMethodOverview() const -{ - return (m_proxyModel->sortColumn() == 0); -} - void CPPEditor::updateMethodBoxIndex() { int line = 0, column = 0; @@ -429,7 +394,7 @@ void CPPEditor::updateMethodBoxIndex() if (lastIndex.isValid()) { bool blocked = m_methodCombo->blockSignals(true); - m_methodCombo->setCurrentIndex(m_proxyModel->mapFromSource(lastIndex).row()); + m_methodCombo->setCurrentIndex(lastIndex.row()); updateMethodBoxToolTip(); (void) m_methodCombo->blockSignals(blocked); } diff --git a/src/plugins/cppeditor/cppeditor.h b/src/plugins/cppeditor/cppeditor.h index efae361e0e6..ae352b8d6d5 100644 --- a/src/plugins/cppeditor/cppeditor.h +++ b/src/plugins/cppeditor/cppeditor.h @@ -37,7 +37,6 @@ QT_BEGIN_NAMESPACE class QComboBox; -class QSortFilterProxyModel; QT_END_NAMESPACE namespace CPlusPlus { @@ -87,7 +86,6 @@ public: public slots: virtual void setFontSettings(const TextEditor::FontSettings &); - void setSortedMethodOverview(bool sort); void switchDeclarationDefinition(); void jumpToDefinition(); @@ -96,6 +94,7 @@ public slots: void deleteStartOfToken(); void deleteEndOfToken(); + protected: void contextMenuEvent(QContextMenuEvent *); void mouseMoveEvent(QMouseEvent *); @@ -116,7 +115,6 @@ private slots: void onDocumentUpdated(CPlusPlus::Document::Ptr doc); private: - bool sortedMethodOverview() const; CPlusPlus::Symbol *findDefinition(CPlusPlus::Symbol *symbol); virtual void indentBlock(QTextDocument *doc, QTextBlock block, QChar typedChar); @@ -163,8 +161,6 @@ private: QList m_contexts; QComboBox *m_methodCombo; CPlusPlus::OverviewModel *m_overviewModel; - QSortFilterProxyModel *m_proxyModel; - QAction *m_sortAction; }; } // namespace Internal diff --git a/src/plugins/cppeditor/cppplugin.cpp b/src/plugins/cppeditor/cppplugin.cpp index 9e17083c219..29ad6731451 100644 --- a/src/plugins/cppeditor/cppplugin.cpp +++ b/src/plugins/cppeditor/cppplugin.cpp @@ -106,8 +106,7 @@ CppPlugin *CppPlugin::m_instance = 0; CppPlugin::CppPlugin() : m_actionHandler(0), - m_factory(0), - m_sortedMethodOverview(false) + m_factory(0) { m_instance = this; } @@ -134,20 +133,6 @@ void CppPlugin::initializeEditor(CPPEditor *editor) // auto completion connect(editor, SIGNAL(requestAutoCompletion(ITextEditable*, bool)), TextEditor::Internal::CompletionSupport::instance(), SLOT(autoComplete(ITextEditable*, bool))); - // method combo box sorting - connect(this, SIGNAL(methodOverviewSortingChanged(bool)), - editor, SLOT(setSortedMethodOverview(bool))); -} - -void CppPlugin::setSortedMethodOverview(bool sorted) -{ - m_sortedMethodOverview = sorted; - emit methodOverviewSortingChanged(sorted); -} - -bool CppPlugin::sortedMethodOverview() const -{ - return m_sortedMethodOverview; } bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage) @@ -209,30 +194,14 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess | TextEditor::TextEditorActionHandler::UnCommentSelection | TextEditor::TextEditorActionHandler::UnCollapseAll); - readSettings(); return true; } -void CppPlugin::readSettings() -{ - m_sortedMethodOverview = Core::ICore::instance()->settings()->value("CppTools/SortedMethodOverview", false).toBool(); -} - -void CppPlugin::writeSettings() -{ - Core::ICore::instance()->settings()->setValue("CppTools/SortedMethodOverview", m_sortedMethodOverview); -} - void CppPlugin::extensionsInitialized() { m_actionHandler->initializeActions(); } -void CppPlugin::shutdown() -{ - writeSettings(); -} - void CppPlugin::switchDeclarationDefinition() { Core::EditorManager *em = Core::EditorManager::instance(); diff --git a/src/plugins/cppeditor/cppplugin.h b/src/plugins/cppeditor/cppplugin.h index 4ad8400342b..151eda38885 100644 --- a/src/plugins/cppeditor/cppplugin.h +++ b/src/plugins/cppeditor/cppplugin.h @@ -58,19 +58,10 @@ public: bool initialize(const QStringList &arguments, QString *error_message = 0); void extensionsInitialized(); - void shutdown(); // Connect editor to settings changed signals. void initializeEditor(CPPEditor *editor); - bool sortedMethodOverview() const; - -signals: - void methodOverviewSortingChanged(bool sort); - -public slots: - void setSortedMethodOverview(bool sorted); - private slots: void switchDeclarationDefinition(); void jumpToDefinition(); @@ -78,14 +69,11 @@ private slots: private: friend class CppEditorFactory; Core::IEditor *createEditor(QWidget *parent); - void writeSettings(); - void readSettings(); static CppPlugin *m_instance; TextEditor::TextEditorActionHandler *m_actionHandler; CppEditorFactory *m_factory; - bool m_sortedMethodOverview; }; class CppEditorFactory : public Core::IEditorFactory diff --git a/src/plugins/find/findplugin.cpp b/src/plugins/find/findplugin.cpp index 2a5d1047070..37f85326665 100644 --- a/src/plugins/find/findplugin.cpp +++ b/src/plugins/find/findplugin.cpp @@ -47,6 +47,20 @@ #include #include +/*! + \namespace Find + The Find namespace provides everything that has to do with search term based searches. +*/ + +/*! + \namespace Find::Internal + \internal +*/ +/*! + \namespace Find::Internal::ItemDataRoles + \internal +*/ + Q_DECLARE_METATYPE(Find::IFindFilter*) namespace { diff --git a/src/plugins/quickopen/quickopenplugin.cpp b/src/plugins/quickopen/quickopenplugin.cpp index 5ef84c3ea74..d8834b3bdfe 100644 --- a/src/plugins/quickopen/quickopenplugin.cpp +++ b/src/plugins/quickopen/quickopenplugin.cpp @@ -51,10 +51,18 @@ #include #include +/*! + \namespace QuickOpen + The QuickOpen namespace provides the hooks for Locator content. +*/ +/*! + \namespace QuickOpen::Internal + \internal +*/ + using namespace QuickOpen; using namespace QuickOpen::Internal; - namespace { static bool filterLessThan(const IQuickOpenFilter *first, const IQuickOpenFilter *second) { From 5f8992117993a103ca5d0e30e39bbf75fa6721a4 Mon Sep 17 00:00:00 2001 From: mae Date: Fri, 24 Apr 2009 16:44:48 +0200 Subject: [PATCH 06/10] polishing of block highlighting, and a new folder bar. --- src/plugins/texteditor/basetexteditor.cpp | 329 +++++++++++---------- src/plugins/texteditor/basetexteditor.h | 3 +- src/plugins/texteditor/basetexteditor_p.h | 6 +- src/plugins/texteditor/displaysettings.cpp | 4 +- 4 files changed, 183 insertions(+), 159 deletions(-) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index e821bce1239..5c3d084e211 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -135,6 +135,7 @@ ITextEditor *BaseTextEditor::openEditorAt(const QString &fileName, texteditor->gotoLine(line, column); return texteditor; } + return 0; } @@ -161,9 +162,8 @@ BaseTextEditor::BaseTextEditor(QWidget *parent) d->extraAreaSelectionAnchorBlockNumber = d->extraAreaToggleMarkBlockNumber = d->extraAreaHighlightCollapseBlockNumber - = d->extraAreaHighlightFadingBlockNumber + = d->extraAreaHighlightCollapseColumn = -1; - d->extraAreaCollapseAlpha = 255; d->visibleCollapsedBlockNumber = d->suggestedVisibleCollapsedBlockNumber = -1; @@ -199,13 +199,6 @@ BaseTextEditor::BaseTextEditor(QWidget *parent) slotCursorPositionChanged(); setFrameStyle(QFrame::NoFrame); - - d->extraAreaTimeLine = new QTimeLine(150, this); - d->extraAreaTimeLine->setFrameRange(0, 255); - connect(d->extraAreaTimeLine, SIGNAL(frameChanged(int)), this, - SLOT(setCollapseIndicatorAlpha(int))); - - connect(Core::EditorManager::instance(), SIGNAL(currentEditorChanged(Core::IEditor*)), this, SLOT(currentEditorChanged(Core::IEditor*))); } @@ -1227,7 +1220,7 @@ void BaseTextEditor::setHighlightBlocks(bool b) if (d->m_highlightBlocks == b) return; d->m_highlightBlocks = b; - d->m_highlightBlocksInfo = BaseTextEditorPrivateHighlightBlocks(); + d->extraAreaHighlightCollapseBlockNumber = -1; _q_highlightBlocks(); } @@ -1512,14 +1505,22 @@ void BaseTextEditor::resizeEvent(QResizeEvent *e) QRect(cr.left(), cr.top(), extraAreaWidth(), cr.height()))); } -QRect BaseTextEditor::collapseBox(const QTextBlock &block) +QRect BaseTextEditor::collapseBox() { - QRectF br = blockBoundingGeometry(block).translated(contentOffset()); - int collapseBoxWidth = fontMetrics().lineSpacing() + 1; - return QRect(d->m_extraArea->width() - collapseBoxWidth + collapseBoxWidth/4, - int(br.top()) + collapseBoxWidth/4, - 2 * (collapseBoxWidth/4) + 1, 2 * (collapseBoxWidth/4) + 1); + if (d->m_highlightBlocksInfo.isEmpty() || d->extraAreaHighlightCollapseBlockNumber < 0) + return QRect(); + QTextBlock begin = document()->findBlockByNumber(d->m_highlightBlocksInfo.open.last()); + QTextBlock end= document()->findBlockByNumber(d->m_highlightBlocksInfo.close.first()); + if (!begin.isValid() || !end.isValid()) + return QRect(); + QRectF br = blockBoundingGeometry(begin).translated(contentOffset()); + QRectF er = blockBoundingGeometry(end).translated(contentOffset()); + int collapseBoxWidth = fontMetrics().lineSpacing() + 1; + return QRect(d->m_extraArea->width() - collapseBoxWidth, + int(br.top()), + collapseBoxWidth, + er.bottom() - br.top()); } QTextBlock BaseTextEditor::collapsedBlockAt(const QPoint &pos, QRect *box) const { @@ -1703,9 +1704,8 @@ void BaseTextEditorPrivate::moveCursorVisible(bool ensureVisible) static QColor calcBlendColor(const QColor &baseColor, int factor = 1) { -const int blendBase = (baseColor.value() > 128) ? 0 : 255; + const int blendBase = (baseColor.value() > 128) ? 0 : 255; // Darker backgrounds may need a bit more contrast - // (this calculation is temporary solution until we have a setting for this color) const int blendFactor = (baseColor.value() > 128) ? 8 : 16; QColor blendColor = baseColor; @@ -1791,7 +1791,7 @@ void BaseTextEditor::paintEvent(QPaintEvent *e) QRectF r = blockBoundingRect(block).translated(offset); - if (d->m_highlightBlocks) { + if (!d->m_highlightBlocksInfo.isEmpty()) { int n = block.blockNumber(); int depth = 0; @@ -2169,6 +2169,9 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e) TextEditDocumentLayout *documentLayout = qobject_cast(doc->documentLayout()); QTC_ASSERT(documentLayout, return); + int cursorBlockNumber = textCursor().blockNumber(); + + const QColor baseColor = palette().base().color(); QPalette pal = d->m_extraArea->palette(); pal.setCurrentColorGroup(QPalette::Active); QPainter painter(d->m_extraArea); @@ -2188,12 +2191,12 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e) painter.fillRect(e->rect().intersected(QRect(0, 0, extraAreaWidth, INT_MAX)), pal.color(QPalette::Background)); - QTextBlock block = firstVisibleBlock(); int blockNumber = block.blockNumber(); int top = (int)blockBoundingGeometry(block).translated(contentOffset()).top(); int bottom = top; +#if 0 int extraAreaHighlightCollapseEndBlockNumber = -1; int extraAreaHighlightCollapseBlockNumber = d->extraAreaHighlightCollapseBlockNumber; @@ -2208,7 +2211,7 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e) else extraAreaHighlightCollapseEndBlockNumber = extraAreaHighlightCollapseBlockNumber; } - +#endif while (block.isValid() && top <= e->rect().bottom()) { @@ -2274,68 +2277,57 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e) } if (d->m_codeFoldingVisible) { - const QRect box(extraAreaWidth + collapseBoxWidth/4, top + collapseBoxWidth/4, - 2 * (collapseBoxWidth/4) + 1, 2 * (collapseBoxWidth/4) + 1); - const QPoint boxCenter = box.center(); + const QRect r(extraAreaWidth+2, top, collapseBoxWidth-4, bottom - top); + bool drawBox = !nextBlock.isVisible(); - QColor textColorAlpha = pal.text().color(); - textColorAlpha.setAlpha(d->extraAreaCollapseAlpha); - QColor textColorInactive = pal.text().color(); - textColorInactive.setAlpha(100); - QColor textColor = pal.text().color(); - textColor.setAlpha(qMax(textColorInactive.alpha(), d->extraAreaCollapseAlpha)); - - const QPen pen( (blockNumber >= extraAreaHighlightCollapseBlockNumber - && blockNumber <= extraAreaHighlightCollapseEndBlockNumber) ? - textColorAlpha : pal.base().color()); - const QPen boxPen((blockNumber == extraAreaHighlightCollapseBlockNumber) ? - textColor : textColorInactive); - const QPen endPen((blockNumber == extraAreaHighlightCollapseEndBlockNumber) ? - textColorAlpha : pal.base().color()); - const QPen previousPen((blockNumber-1 >= extraAreaHighlightCollapseBlockNumber - && blockNumber-1 < extraAreaHighlightCollapseEndBlockNumber) ? - textColorAlpha : pal.base().color()); - const QPen nextPen((blockNumber+1 > extraAreaHighlightCollapseBlockNumber - && blockNumber+1 <= extraAreaHighlightCollapseEndBlockNumber) ? - textColorAlpha : pal.base().color()); - - TextBlockUserData *nextBlockUserData = TextEditDocumentLayout::testUserData(nextBlock); - - bool collapseNext = nextBlockUserData - && nextBlockUserData->collapseMode() - == TextBlockUserData::CollapseThis - && !nextBlockUserData->ifdefedOut(); - - bool nextHasClosingCollapse = nextBlockUserData - && nextBlockUserData->hasClosingCollapseInside() - && nextBlockUserData->ifdefedOut(); - - bool drawBox = ((collapseAfter || collapseNext) && !nextHasClosingCollapse); - - if (braceDepth || (collapseNext && nextBlock.isVisible())) { - painter.setPen((hasClosingCollapse || !nextBlock.isVisible())? nextPen : pen); - painter.drawLine(boxCenter.x(), boxCenter.y(), boxCenter.x(), bottom - 1); + int minBraceDepth = qMax(braceDepth, previousBraceDepth); + if (minBraceDepth > 0) { + QColor color = calcBlendColor(baseColor, minBraceDepth); + if (!d->m_highlightBlocksInfo.isEmpty() + && blockNumber >= d->m_highlightBlocksInfo.open.last() + && blockNumber <= d->m_highlightBlocksInfo.close.first()) + color = color.light(); + painter.fillRect(r, color); } + bool drawDown = !d->m_highlightBlocksInfo.isEmpty() + && blockNumber == d->m_highlightBlocksInfo.open.last(); + bool drawUp = !d->m_highlightBlocksInfo.isEmpty() + && blockNumber == d->m_highlightBlocksInfo.close.first(); - if (previousBraceDepth || collapseThis) { - painter.setPen((collapseAfter || collapseNext) ? previousPen : pen); - painter.drawLine(boxCenter.x(), top, boxCenter.x(), boxCenter.y()); - } - if (drawBox) { - painter.setPen(boxPen); - painter.setBrush(pal.base()); - painter.drawRect(box.adjusted(0, 0, -1, -1)); - if (!nextBlock.isVisible()) - painter.drawLine(boxCenter.x(), box.top() + 2, boxCenter.x(), box.bottom() - 2); - painter.drawLine(box.left() + 2, boxCenter.y(), box.right() - 2, boxCenter.y()); - } else if (hasClosingCollapse || collapseAfter || collapseNext) { - painter.setPen(endPen); - painter.drawLine(boxCenter.x() + 1, boxCenter.y(), box.right() - 1, boxCenter.y()); + if (drawBox || drawDown || drawUp) { + painter.setRenderHint(QPainter::Antialiasing, true); + painter.translate(.5, .5); + painter.setPen(pal.text().color()); + painter.setBrush(pal.text().color()); + + if (drawBox) { + QPointF points1[3] = { QPointF(r.left(), r.center().y()-1), + QPointF(r.center().x(), r.top()), + QPointF(r.right(), r.center().y()-1) }; + QPointF points2[3] = { QPointF(r.left(), r.center().y()+1), + QPointF(r.center().x(), r.bottom()-1), + QPointF(r.right(), r.center().y()+1) }; + painter.drawPolygon(points1, 3); + painter.drawPolygon(points2, 3); + } else if (drawUp) { + QPointF points[3] = { QPointF(r.left(), r.bottom()-1), + QPointF(r.center().x(), r.center().y()), + QPointF(r.right(), r.bottom()-1) }; + painter.drawPolygon(points, 3); + } else if(drawDown) { + QPointF points[3] = { QPointF(r.left(), r.top()), + QPointF(r.center().x(), r.center().y()), + QPointF(r.right(), r.top()) }; + painter.drawPolygon(points, 3); + } + painter.translate(-.5, -.5); + painter.setRenderHint(QPainter::Antialiasing, false); } } + painter.restore(); } @@ -2353,12 +2345,34 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e) if (d->m_lineNumbersVisible) { const QString &number = QString::number(blockNumber + 1); + if (blockNumber == cursorBlockNumber) { + painter.save(); + painter.setPen(pal.color(QPalette::Background).value() < 128 ? Qt::white : Qt::black); + } painter.drawText(markWidth, top, extraAreaWidth - markWidth - 4, fm.height(), Qt::AlignRight, number); + if (blockNumber == cursorBlockNumber) + painter.restore(); } block = nextVisibleBlock; blockNumber = nextVisibleBlockNumber; } + + if (d->m_codeFoldingVisible) { + painter.drawLine(extraAreaWidth, 0, + extraAreaWidth, viewport()->height()); + painter.drawLine(extraAreaWidth + collapseBoxWidth - 1, 0, + extraAreaWidth + collapseBoxWidth - 1, viewport()->height()); + QRect cb = collapseBox(); +// if (!cb.isEmpty()) { +// QPen pen(baseColor.value() < 128 ? Qt::white : Qt::black); +// pen.setWidth(2); +// painter.setPen(pen); +// painter.setRenderHint(QPainter::Antialiasing, true); +// painter.translate(.5, .5); +// painter.drawRoundedRect(QRect(cb.adjusted(0, 0,-2, -2)), 4, 4); +// } + } } void BaseTextEditor::slotModificationChanged(bool m) @@ -2429,6 +2443,9 @@ void BaseTextEditor::slotCursorPositionChanged() setExtraSelections(CurrentLineSelection, extraSelections); if (d->m_highlightBlocks) { + QTextCursor cursor = textCursor(); + d->extraAreaHighlightCollapseBlockNumber = cursor.blockNumber(); + d->extraAreaHighlightCollapseColumn = cursor.position() - cursor.block().position(); d->m_highlightBlocksTimer->start(100); } } @@ -2450,12 +2467,6 @@ void BaseTextEditor::slotUpdateBlockNotify(const QTextBlock &block) } } -void BaseTextEditor::setCollapseIndicatorAlpha(int alpha) -{ - d->extraAreaCollapseAlpha = alpha; - d->m_extraArea->update(); -} - void BaseTextEditor::timerEvent(QTimerEvent *e) { if (e->timerId() == d->autoScrollTimer.timerId()) { @@ -2545,13 +2556,9 @@ void BaseTextEditor::mousePressEvent(QMouseEvent *e) void BaseTextEditor::extraAreaLeaveEvent(QEvent *) { - if (d->extraAreaHighlightCollapseBlockNumber >= 0) { - d->extraAreaHighlightFadingBlockNumber = d->extraAreaHighlightCollapseBlockNumber; - d->extraAreaHighlightCollapseBlockNumber = -1; // missing mouse move event from Qt - d->extraAreaTimeLine->setDirection(QTimeLine::Backward); - if (d->extraAreaTimeLine->state() != QTimeLine::Running) - d->extraAreaTimeLine->start(); - } + // fake missing mouse move event from Qt + QMouseEvent me(QEvent::MouseMove, QPoint(-1, -1), Qt::NoButton, 0, 0); + extraAreaMouseEvent(&me); } void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e) @@ -2562,43 +2569,48 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e) int markWidth; extraAreaWidth(&markWidth); - if (e->type() == QEvent::MouseMove && e->buttons() == 0) { // mouse tracking + if (d->m_codeFoldingVisible + && e->type() == QEvent::MouseMove && e->buttons() == 0) { // mouse tracking // Update which folder marker is highlighted const int highlightBlockNumber = d->extraAreaHighlightCollapseBlockNumber; + const int highlightColumn = d->extraAreaHighlightCollapseColumn; d->extraAreaHighlightCollapseBlockNumber = -1; + d->extraAreaHighlightCollapseColumn = -1; - if (d->m_codeFoldingVisible - && TextBlockUserData::canCollapse(cursor.block()) - && !TextBlockUserData::hasClosingCollapseInside(cursor.block().next()) - && collapseBox(cursor.block()).contains(e->pos())) + if (d->m_highlightBlocks) { + QTextCursor cursor = textCursor(); d->extraAreaHighlightCollapseBlockNumber = cursor.blockNumber(); - - // Set whether the mouse cursor is a hand or normal arrow - bool hand = (e->pos().x() <= markWidth || d->extraAreaHighlightCollapseBlockNumber >= 0); - if (hand != (d->m_extraArea->cursor().shape() == Qt::PointingHandCursor)) - d->m_extraArea->setCursor(hand ? Qt::PointingHandCursor : Qt::ArrowCursor); - - // Start fading in or out the highlighted folding marker - if (highlightBlockNumber != d->extraAreaHighlightCollapseBlockNumber) { - d->extraAreaTimeLine->stop(); - d->extraAreaTimeLine->setDirection(d->extraAreaHighlightCollapseBlockNumber >= 0? - QTimeLine::Forward : QTimeLine::Backward); - if (d->extraAreaTimeLine->direction() == QTimeLine::Backward) - d->extraAreaHighlightFadingBlockNumber = highlightBlockNumber; - else - d->extraAreaHighlightFadingBlockNumber = -1; - if (d->extraAreaTimeLine->state() != QTimeLine::Running) - d->extraAreaTimeLine->start(); + d->extraAreaHighlightCollapseColumn = cursor.position() - cursor.block().position(); } + + int collapseBoxWidth = fontMetrics().lineSpacing() + 1; + if (e->pos().x() > extraArea()->width() - collapseBoxWidth) { + d->extraAreaHighlightCollapseBlockNumber = cursor.blockNumber(); + if (!TextBlockUserData::hasClosingCollapse(cursor.block())) + d->extraAreaHighlightCollapseColumn = cursor.block().length()-1; + } + if (highlightBlockNumber != d->extraAreaHighlightCollapseBlockNumber + || highlightColumn != d->extraAreaHighlightCollapseColumn) + d->m_highlightBlocksTimer->start(100); } if (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) { if (e->button() == Qt::LeftButton) { - if (d->m_codeFoldingVisible && TextBlockUserData::canCollapse(cursor.block()) - && !TextBlockUserData::hasClosingCollapseInside(cursor.block().next()) - && collapseBox(cursor.block()).contains(e->pos())) { - toggleBlockVisible(cursor.block()); - d->moveCursorVisible(false); + int collapseBoxWidth = fontMetrics().lineSpacing() + 1; + if (d->m_codeFoldingVisible && e->pos().x() > extraArea()->width() - collapseBoxWidth) { + if (!cursor.block().next().isVisible()) { + toggleBlockVisible(cursor.block()); + d->moveCursorVisible(false); + } else if (collapseBox().contains(e->pos())) { + cursor.setPosition( + document()->findBlockByNumber(d->m_highlightBlocksInfo.open.last()).position() + ); + QTextBlock c = cursor.block(); + if (!TextBlockUserData::canCollapse(c)) + c = c.previous(); + toggleBlockVisible(c); + d->moveCursorVisible(false); + } } else if (d->m_marksVisible && e->pos().x() > markWidth) { QTextCursor selection = cursor; selection.setVisualNavigation(true); @@ -3153,33 +3165,6 @@ bool TextBlockUserData::findPreviousOpenParenthesis(QTextCursor *cursor, bool se return false; } -bool TextBlockUserData::findNextClosingParenthesis(QTextCursor *cursor, bool select) -{ - QTextBlock block = cursor->block(); - int position = cursor->position(); - int ignore = 0; - while (block.isValid()) { - Parentheses parenList = TextEditDocumentLayout::parentheses(block); - if (!parenList.isEmpty() && !TextEditDocumentLayout::ifdefedOut(block)) { - for (int i = 0; i < parenList.count(); ++i) { - Parenthesis paren = parenList.at(i); - if (block == cursor->block() && position - block.position() >= paren.pos) - continue; - if (paren.type == Parenthesis::Opened) { - ++ignore; - } else if (ignore > 0) { - --ignore; - } else { - cursor->setPosition(block.position() + paren.pos+1, select ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor); - return true; - } - } - } - block = block.next(); - } - return false; -} - bool TextBlockUserData::findPreviousBlockOpenParenthesis(QTextCursor *cursor) { QTextBlock block = cursor->block(); @@ -3194,7 +3179,7 @@ bool TextBlockUserData::findPreviousBlockOpenParenthesis(QTextCursor *cursor) && paren.chr != QLatin1Char('+') && paren.chr != QLatin1Char('-')) continue; if (block == cursor->block() && - (position - block.position() <= paren.pos)) + (position - block.position() <= paren.pos + (paren.type == Parenthesis::Closed ? 1 : 0))) continue; if (paren.type == Parenthesis::Closed) { ++ignore; @@ -3211,6 +3196,34 @@ bool TextBlockUserData::findPreviousBlockOpenParenthesis(QTextCursor *cursor) return false; } +bool TextBlockUserData::findNextClosingParenthesis(QTextCursor *cursor, bool select) +{ + QTextBlock block = cursor->block(); + int position = cursor->position(); + int ignore = 0; + while (block.isValid()) { + Parentheses parenList = TextEditDocumentLayout::parentheses(block); + if (!parenList.isEmpty() && !TextEditDocumentLayout::ifdefedOut(block)) { + for (int i = 0; i < parenList.count(); ++i) { + Parenthesis paren = parenList.at(i); + if (block == cursor->block() && + (position - block.position() > paren.pos - (paren.type == Parenthesis::Opened ? 1 : 0))) + continue; + if (paren.type == Parenthesis::Opened) { + ++ignore; + } else if (ignore > 0) { + --ignore; + } else { + cursor->setPosition(block.position() + paren.pos+1, select ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor); + return true; + } + } + } + block = block.next(); + } + return false; +} + bool TextBlockUserData::findNextBlockClosingParenthesis(QTextCursor *cursor) { QTextBlock block = cursor->block(); @@ -3224,7 +3237,8 @@ bool TextBlockUserData::findNextBlockClosingParenthesis(QTextCursor *cursor) if (paren.chr != QLatin1Char('{') && paren.chr != QLatin1Char('}') && paren.chr != QLatin1Char('+') && paren.chr != QLatin1Char('-')) continue; - if (block == cursor->block() && position - block.position() >= paren.pos) + if (block == cursor->block() && + (position - block.position() > paren.pos - (paren.type == Parenthesis::Opened ? 1 : 0))) continue; if (paren.type == Parenthesis::Opened) { ++ignore; @@ -3378,18 +3392,31 @@ void BaseTextEditor::_q_matchParentheses() void BaseTextEditor::_q_highlightBlocks() { - QTextCursor cursor = textCursor(); - QTextCursor closeCursor = cursor; BaseTextEditorPrivateHighlightBlocks highlightBlocksInfo; - while (TextBlockUserData::findPreviousBlockOpenParenthesis(&cursor)) { - highlightBlocksInfo.open.prepend(cursor.blockNumber()); - highlightBlocksInfo.visualIndent.prepend(d->visualIndent(cursor.block())); - if (TextBlockUserData::findNextBlockClosingParenthesis(&closeCursor)) - highlightBlocksInfo.close.append(closeCursor.blockNumber()); + + if (d->extraAreaHighlightCollapseBlockNumber >= 0) { + QTextBlock block = document()->findBlockByNumber(d->extraAreaHighlightCollapseBlockNumber); + if (block.isValid()) { + QTextCursor cursor(block); + if (d->extraAreaHighlightCollapseColumn >= 0) + cursor.setPosition(cursor.position() + qMin(d->extraAreaHighlightCollapseColumn+1, + block.length())); + QTextCursor closeCursor; + while (TextBlockUserData::findPreviousBlockOpenParenthesis(&cursor)) { + highlightBlocksInfo.open.prepend(cursor.blockNumber()); + highlightBlocksInfo.visualIndent.prepend(d->visualIndent(cursor.block())); + if (closeCursor.isNull()) + closeCursor = cursor; + if (TextBlockUserData::findNextBlockClosingParenthesis(&closeCursor)) + highlightBlocksInfo.close.append(closeCursor.blockNumber()); + } + } } + if (d->m_highlightBlocksInfo != highlightBlocksInfo) { d->m_highlightBlocksInfo = highlightBlocksInfo; viewport()->update(); + d->m_extraArea->update(); } } diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h index f0669a71046..7493fd34c89 100644 --- a/src/plugins/texteditor/basetexteditor.h +++ b/src/plugins/texteditor/basetexteditor.h @@ -370,7 +370,6 @@ private slots: void restoreCursorPosition(); void highlightSearchResults(const QString &txt, QTextDocument::FindFlags findFlags); void setFindScope(const QTextCursor &); - void setCollapseIndicatorAlpha(int); void currentEditorChanged(Core::IEditor *editor); private: @@ -460,7 +459,7 @@ private: void saveCurrentCursorPositionForNavigation(); void toggleBlockVisible(const QTextBlock &block); - QRect collapseBox(const QTextBlock &block); + QRect collapseBox(); QTextBlock collapsedBlockAt(const QPoint &pos, QRect *box = 0) const; diff --git a/src/plugins/texteditor/basetexteditor_p.h b/src/plugins/texteditor/basetexteditor_p.h index 844d3777689..1372087f00d 100644 --- a/src/plugins/texteditor/basetexteditor_p.h +++ b/src/plugins/texteditor/basetexteditor_p.h @@ -33,7 +33,6 @@ #include "basetexteditor.h" #include -#include #include #include @@ -119,6 +118,7 @@ struct BaseTextEditorPrivateHighlightBlocks QList open; QList close; QList visualIndent; + inline bool isEmpty() const { return open.isEmpty() || close.isEmpty() || visualIndent.isEmpty(); } inline bool operator==(const BaseTextEditorPrivateHighlightBlocks &o) const { return (open == o.open && close == o.close && visualIndent == o.visualIndent); } @@ -178,9 +178,7 @@ public: int extraAreaSelectionAnchorBlockNumber; int extraAreaToggleMarkBlockNumber; int extraAreaHighlightCollapseBlockNumber; - int extraAreaCollapseAlpha; - int extraAreaHighlightFadingBlockNumber; - QTimeLine *extraAreaTimeLine; + int extraAreaHighlightCollapseColumn; QBasicTimer collapsedBlockTimer; int visibleCollapsedBlockNumber; diff --git a/src/plugins/texteditor/displaysettings.cpp b/src/plugins/texteditor/displaysettings.cpp index 27480d3dcc5..0dd0c33db52 100644 --- a/src/plugins/texteditor/displaysettings.cpp +++ b/src/plugins/texteditor/displaysettings.cpp @@ -40,7 +40,7 @@ static const char * const showWrapColumnKey = "ShowWrapColumn"; static const char * const wrapColumnKey = "WrapColumn"; static const char * const visualizeWhitespaceKey = "VisualizeWhitespace"; static const char * const displayFoldingMarkersKey = "DisplayFoldingMarkersV2"; -static const char * const highlightCurrentLineKey = "HighlightCurrentLineKey"; +static const char * const highlightCurrentLineKey = "HighlightCurrentLineKeyV2"; static const char * const highlightBlocksKey = "HighlightBlocksKeyV2"; static const char * const groupPostfix = "DisplaySettings"; @@ -53,7 +53,7 @@ DisplaySettings::DisplaySettings() : m_wrapColumn(80), m_visualizeWhitespace(false), m_displayFoldingMarkers(false), - m_highlightCurrentLine(true), + m_highlightCurrentLine(false), m_highlightBlocks(true) { } From 13c699e2407c07ff6a50725c74be2dd5ea34879c Mon Sep 17 00:00:00 2001 From: con Date: Fri, 24 Apr 2009 16:47:39 +0200 Subject: [PATCH 07/10] Missing files. --- .../coreplugin/dialogs/ioptionspage.cpp | 46 ++++++++++++++++ .../coreplugin/editormanager/ieditor.cpp | 55 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 src/plugins/coreplugin/dialogs/ioptionspage.cpp create mode 100644 src/plugins/coreplugin/editormanager/ieditor.cpp diff --git a/src/plugins/coreplugin/dialogs/ioptionspage.cpp b/src/plugins/coreplugin/dialogs/ioptionspage.cpp new file mode 100644 index 00000000000..4db23a85738 --- /dev/null +++ b/src/plugins/coreplugin/dialogs/ioptionspage.cpp @@ -0,0 +1,46 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +**************************************************************************/ + +#include "ioptionspage.h" + +/*! + \class Core::IOptionsPage + \mainclass + \brief The IOptionsPage is an interface for providing options pages. + + Guidelines for implementing: + \list + \o id() is an id used for filtering when calling ICore:: showOptionsDialog() + \o trName() is the (translated) name for display. + \o category() is the category used for filtering when calling ICore:: showOptionsDialog() + \o trCategory() is the translated category + \o apply() is called to store the settings. It should detect if any changes have been + made and store those. + \endlist +*/ diff --git a/src/plugins/coreplugin/editormanager/ieditor.cpp b/src/plugins/coreplugin/editormanager/ieditor.cpp new file mode 100644 index 00000000000..85e5adac347 --- /dev/null +++ b/src/plugins/coreplugin/editormanager/ieditor.cpp @@ -0,0 +1,55 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +**************************************************************************/ + +#include "ieditor.h" + +/*! + \class Core::IEditor + \brief The IEditor is an interface for providing different editors for different file types. + + Classes that implement this interface are for example the editors for + C++ files, ui-files and resource files. + + Whenever a user wants to edit or create a file, the EditorManager scans all + EditorFactoryInterfaces for suitable editors. The selected EditorFactory + is then asked to create an editor, which must implement this interface. + + Guidelines for implementing: + \list + \o displayName() is used as a user visible description of the document (usually filename w/o path). + \o kind() must be the same value as the kind() of the corresponding EditorFactory. + \o The changed() signal should be emitted when the modified state of the document changes + (so /bold{not} every time the document changes, but /bold{only once}). + \o If duplication is supported, you need to ensure that all duplicates + return the same file(). + \endlist + + \sa Core::EditorFactoryInterface Core::IContext + +*/ From b9e376f5dd81c732df377fd108aea3ba23be90dd Mon Sep 17 00:00:00 2001 From: mae Date: Fri, 24 Apr 2009 18:08:22 +0200 Subject: [PATCH 08/10] fix block highlighting off-by-one --- src/plugins/texteditor/basetexteditor.cpp | 10 ++++++---- src/plugins/texteditor/basetexteditor.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 5c3d084e211..9bc9ef529a6 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -3165,10 +3165,10 @@ bool TextBlockUserData::findPreviousOpenParenthesis(QTextCursor *cursor, bool se return false; } -bool TextBlockUserData::findPreviousBlockOpenParenthesis(QTextCursor *cursor) +bool TextBlockUserData::findPreviousBlockOpenParenthesis(QTextCursor *cursor, bool checkStartPosition) { QTextBlock block = cursor->block(); - int position = cursor->position(); + int position = cursor->position() + (checkStartPosition ? 1 : 0 ); int ignore = 0; while (block.isValid()) { Parentheses parenList = TextEditDocumentLayout::parentheses(block); @@ -3399,10 +3399,12 @@ void BaseTextEditor::_q_highlightBlocks() if (block.isValid()) { QTextCursor cursor(block); if (d->extraAreaHighlightCollapseColumn >= 0) - cursor.setPosition(cursor.position() + qMin(d->extraAreaHighlightCollapseColumn+1, + cursor.setPosition(cursor.position() + qMin(d->extraAreaHighlightCollapseColumn, block.length())); QTextCursor closeCursor; - while (TextBlockUserData::findPreviousBlockOpenParenthesis(&cursor)) { + bool firstRun = true; + while (TextBlockUserData::findPreviousBlockOpenParenthesis(&cursor), firstRun) { + firstRun = false; highlightBlocksInfo.open.prepend(cursor.blockNumber()); highlightBlocksInfo.visualIndent.prepend(d->visualIndent(cursor.block())); if (closeCursor.isNull()) diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h index 7493fd34c89..e917696b57e 100644 --- a/src/plugins/texteditor/basetexteditor.h +++ b/src/plugins/texteditor/basetexteditor.h @@ -167,7 +167,7 @@ public: static bool findPreviousOpenParenthesis(QTextCursor *cursor, bool select = false); static bool findNextClosingParenthesis(QTextCursor *cursor, bool select = false); - static bool findPreviousBlockOpenParenthesis(QTextCursor *cursor); + static bool findPreviousBlockOpenParenthesis(QTextCursor *cursor, bool checkStartPosition = false); static bool findNextBlockClosingParenthesis(QTextCursor *cursor); From 7f64e11cc126791903fd3bf032b3c855aca249a4 Mon Sep 17 00:00:00 2001 From: mae Date: Fri, 24 Apr 2009 18:12:36 +0200 Subject: [PATCH 09/10] the comma operator in C++ is evil --- src/plugins/texteditor/basetexteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 9bc9ef529a6..474fa0c4435 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -3403,7 +3403,7 @@ void BaseTextEditor::_q_highlightBlocks() block.length())); QTextCursor closeCursor; bool firstRun = true; - while (TextBlockUserData::findPreviousBlockOpenParenthesis(&cursor), firstRun) { + while (TextBlockUserData::findPreviousBlockOpenParenthesis(&cursor, firstRun)) { firstRun = false; highlightBlocksInfo.open.prepend(cursor.blockNumber()); highlightBlocksInfo.visualIndent.prepend(d->visualIndent(cursor.block())); From 8d59b0ab6488a892976162684ddc2406d1d338e6 Mon Sep 17 00:00:00 2001 From: mae Date: Fri, 24 Apr 2009 18:16:30 +0200 Subject: [PATCH 10/10] eat tooltip events when control is pressed, otherwise the tools destroy the navigation experience --- src/plugins/texteditor/basetexteditor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 474fa0c4435..77d35fcdb52 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -1480,6 +1480,8 @@ bool BaseTextEditor::viewportEvent(QEvent *event) setTextCursor(cursorForPosition(ce->pos())); } else if (event->type() == QEvent::ToolTip) { const QHelpEvent *he = static_cast(event); + if (QApplication::keyboardModifiers() & Qt::ControlModifier) + return true; // eat tooltip event when control is pressed const QPoint &pos = he->pos(); // Allow plugins to show tooltips