From 3cb60a65e91a2addab2c4257838595e85307fcdb Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 9 Jul 2010 14:54:10 +0200 Subject: [PATCH] Doc - Add tips and tricks. Reviewed-by: con --- doc/images/qtcreator-texfinder-filter.png | Bin 0 -> 6712 bytes doc/qtcreator.qdoc | 118 +++++++++++++++++++--- src/plugins/coreplugin/editortoolbar.cpp | 2 +- src/plugins/cppeditor/cppeditor.cpp | 2 +- 4 files changed, 104 insertions(+), 18 deletions(-) create mode 100644 doc/images/qtcreator-texfinder-filter.png diff --git a/doc/images/qtcreator-texfinder-filter.png b/doc/images/qtcreator-texfinder-filter.png new file mode 100644 index 0000000000000000000000000000000000000000..b40ea9b37eef82b791eb2f84def8df211cfe8d2c GIT binary patch literal 6712 zcmeAS@N?(olHy`uVBq!ia0y~yU^vFWz>vnl#K6EH|FrT60|NtRfk$L90|Va?5N4dJ z%_q&kz`$PO>FdgVi=C58oG<>XmI+wMHKN3^v?L?Hh+*ZrGad{K3_K;S5hX6E#mPmP z1tppJc?`mwipmTO3|t^_=lp`oqRjM+5{5PWXRH_)82G@VMX8A(r3xjPxv31M-}yNi z7#KJ~GQs(2CFO}lsSL3N|3S*RL4q!s#mPB|nYpP&4BHQE>1SYI-~b7SCl=*p=A|#F|0n3*WSCX?b| z^7rrR-M>~YU)3$|9~vHheZhte1`i%=konWfEj}yXm&4G;mE-Fw1LL<}mwvfcU!E!% z`g>vInJw=Zx=j8O|JruTp<2z=+t(h<&&V*i|0`Tc)A;54YcCepGfX)B^l%$*c5d$5 z-0Uw)HGfDvjuXAMy6N}Ii@z5KKFI6|lImq+kZ6;f}YpcQ}=5AKXYHXyZrsGUAtZtE4J{Mx?e7Fc5d$P_dg%_ zs;;AyC`_CRS(8_%945r&C9Un|@BWPg1+t-m@%ORnGjvPu8( z$De;n^|me2aPp|Ft@ZQkTe#P=g>O;fzQlQX-}cR$H)CN%h`M^Sp;zJI;_e^p46~N? zs<1Lh^|C2;?RB|q5>-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17qK=2h zUhU-k)!WN|$SsfOYfFNTrn&j{W5?XGvtI`;c3T_0{oT~?xJtv^`Cm?iJ#F6YHto%{ zS6?@2&#x)|zIgqsu(eTN9~@*Z?!MZldH9C#9>w%p0|u7$@$&jpr!jeWdw-pMPVGri z^;&yP32!YElP}Nb*Nbtr^6~LGxAV<4&%bwNW$^!r^}h}+=>6OMcJ@)hV zTr$Z#_h`cggI1@+u$h;7lZ75ADBgXuN>BH#K)>D`L8l$LJ@W;8Y(8#WwQ1WnvF@Xc zjEtF?nJ3b-YHrQj{5wcKB>wvBsdIjnq^JG*`H5XP{jZ&kO^k*}my6QoQ#w<AFUXSaU;zh9rv+t086 z^yvHXZ>w+5W_)mb^89yyZr|z_Jv%x5ubq;TlaAQ#UAwHTtjdDB*8NXvzxVOA`GGdW zxn-g34G%6}V&zaYNjv1b*u*8hrFd{INBYuU18+1J;} zS`<8ZadGkgf0u1e{&=zW{nA?f?8>rl@0FF5+IS=%y?pud-Me>h-sEIwTR+%-z_8;* z=E4tmcbD7R*xY#kJ0kS%-sauwsE!tZjsvJ#B rwD2s9knjtV5o?<)LbA|||LhN4R8G4&DL-UjU|{fc^>bP0l+XkKhaSt* literal 0 HcmV?d00001 diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index 41fbc9adeb2..7c0c3cf22e7 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -532,6 +532,11 @@ an open output pane, click the \gui {Maximize Output Pane} button or press \key {Alt+9}. + To search within the \gui{Application Output} and \gui{Compile Output} + panes, press \key {Ctrl+F} when the pane is active. Enter search + criteria in the \gui Find field and click the left and right arrows to + search down and up in the pane. + To open the \gui{General Messages} and \gui{Version Control} panes, select \gui {Window > Output Panes}. @@ -805,20 +810,20 @@ \image qtcreator-editortoolbar-symbols.png - Use the toolbar to navigate between open files and symbols in use: - \list - \o To browse forward or backward through your location history, click + Use the toolbar to navigate between open files and symbols in use. + To browse forward or backward through your location history, click \inlineimage qtcreator-back.png and \inlineimage qtcreator-forward.png . - \o To go to any open file, select it from the \gui{Open files} - drop-down menu. - \o To jump to any symbol used in the current file, select it from the - \gui Symbols drop-down menu. - \endlist - When you create or edit forms in a \c{.ui} file, the toolbar contains - Qt Designer specific tools. + To go to any open file, select it from the \gui{Open files} drop-down menu. + Right-click the menu title and select \gui {Copy Full Path to Clipboard} to + copy the path and name of the current file to the clipboard. + + To jump to any symbol used in the current file, select it from the + \gui Symbols drop-down menu. By default, the symbols are displayed in the + order in which they appear in the file. Right-click the menu title and select + \gui {Sort Alphabetically} to arrange the symbols in alphabetic order. \section1 Splitting the Editor View @@ -1419,7 +1424,7 @@ \section1 Renaming Symbols - The functions used to rename symbols depends on whether you are + The functions available for renaming symbols depend on whether you are writing C++ or QML code. For QML, you can only rename IDs. To rename a specific symbol in a Qt project: @@ -1583,6 +1588,8 @@ The wizards prompt you to enter the settings needed for that particular type of project and create the necessary files for you. + To display other types of files in the \gui Projects pane, specify them in + the project file. \image qtcreator-new-project.png @@ -1619,6 +1626,25 @@ \image qtcreator-new-project-summary.png \endlist + \section1 Displaying Additional File Types in Projects Pane + + Qt Creator determines whether to display files from the project folder + in the \gui Projects pane depending on the file type (.pro, .pri, .cpp, + .h, .ui, .qrc, and so on). To display other types of files, edit the the + project file. Add filenames as values of the \c {OTHER_FILES} variable. + You can also use wildcards. + + For example, the following code specifies that text files are displayed + in the \gui Projects pane: + + \code + + OTHER_FILES += *.txt + + \endcode + + This also makes the files available in the \gui Locator. + \section1 Adding New Project Wizards If you have a team working on a large application or several applications, @@ -3205,6 +3231,12 @@ \image qtcreator-textfinder-ui-widgets.png "Adding widgets to Text Finder UI" + \note To easily locate the widgets, use the search box at the top of the + \gui Sidebar. For example, to find the \gui Label widget, start typing + the word \bold label. + + \image qtcreator-texfinder-filter.png "Filter field" + \o Double-click the \gui{Label} widget and enter the text \bold{Keyword}. \o Double-click the \gui{Push Button} widget and enter the text \bold{Find}. @@ -3738,7 +3770,7 @@ \section1 Using the Locator Filters - The \gui Locator allows you to browse not only files, but any items + The locator allows you to browse not only files, but any items defined by \bold{locator filters}. By default, the locator contains filters which locate: \list @@ -6431,7 +6463,7 @@ \title Tips and Tricks - \section1 Switching between modes + \section1 Switching Between Modes Qt Creator uses different modes for different purposes. You can quickly switch between these modes with the following keyboard shortcuts: @@ -6454,6 +6486,12 @@ To quickly move between currently open files, press \key Ctrl+Tab. + To move forward in the location history, press \key {Alt+Right} + (\key {Cmd+Opt+Right} on Mac OS). To move backward, press \key {Alt+Left} + (\key {Cmd+Opt+Right} on Mac OS). For example, if you use the \gui Locator + to jump to a symbol in the same file, you can jump back to your original + location in that file by pressing \key {Alt+Left}. + \section1 Moving To the Edit Mode @@ -6471,10 +6509,34 @@ To find specific settings you require in \gui{Tools} > \gui{Options...} use the filter located at the top left of the \gui Options dialog box. + \section1 Opening Output Panes + + The output panes provide a list of errors and warnings encountered during + a build, detailed output from the compiler, status of a program when it is + executed and debug output, as well as search results. + + To open output panes, use the following shortcuts: + + \list + + \o \gui{Build Issues} pane Alt+1 (Cmd+1 on Mac OS X) + + \o \gui{Search Results} pane Alt+2 (Cmd+2 on Mac OS X) + + \o \gui{Application Output} pane Alt+3 (Cmd+3 on Mac OS X) + + \o \gui{Compile Output} pane Alt+4 (Cmd+4 on Mac OS X) + + \endlist + + For more information about output panes, see \l{Viewing Output}. + \section1 Using Keyboard Shortcuts Qt Creator provides \l{Keyboard Shortcuts}{many useful keyboard shortcuts}. + You can see the keyboard shortcut for a menu command in the menu + or the tooltip for a button. To customize, import or export keyboard shortcuts, select \gui Tools > \gui Options... > \gui Environment > \gui Keyboard. @@ -6509,11 +6571,19 @@ \section1 Moving To Symbols To move straight to a symbol used in a project, select the symbol in the - \gui Editor toolbar drop-down menu. - - For more information on the editor toolbar, + \gui Editor toolbar drop-down menu. For more information on the editor toolbar, see \l {Using the Editor Toolbar}. + To jump to a symbol in the current file, press \key {Ctrl+K} to open the + \gui Locator, enter a period (.), and start typing the symbol name. Then + select the symbol in the list. For more information on using the locator, + see \l{Searching With the Locator}. + + Press \key Ctrl (\key Cmd on Mac OS) and click a symbol to move directly to + the definition or the declaration of the symbol. You can also move the cursor + on the symbol and press \key {F2}. For more information, see + \l{Moving to Symbol Definition or Declaration}. + \section1 Displaying Signals and Slots @@ -6527,6 +6597,9 @@ the slot in the \e slots subitem. The objects connected to this slot are shown as children of the slot. This method works with signals too. + For more information about the \gui{Locals and Watchers} view, see + \l{Locals and Watchers}. + \section1 Displaying Low Level Data @@ -6541,6 +6614,19 @@ \o Uncheck the \gui{Use Debugging Helper} checkbox. \endlist + + \section1 Locating Files + + The \gui Locator provides one of the easiest ways in Qt Creator to browse + through projects, files, classes, methods, documentation and file systems. + To quickly access files not directly mentioned in your project, you can + create your own locator filters. That way you can locate files in a + directory structure you have defined. + + To create locator filters, select \gui {Tools > Options... > Locator > Add}. + + For more information, see \l{Creating Locator Filters}. + */ diff --git a/src/plugins/coreplugin/editortoolbar.cpp b/src/plugins/coreplugin/editortoolbar.cpp index 2e6fa7f0ae1..9242dc3db1e 100644 --- a/src/plugins/coreplugin/editortoolbar.cpp +++ b/src/plugins/coreplugin/editortoolbar.cpp @@ -274,7 +274,7 @@ void EditorToolBar::listContextMenu(QPoint pos) if (fileName.isEmpty()) return; QMenu menu; - menu.addAction(tr("Copy full path to clipboard")); + menu.addAction(tr("Copy Full Path to Clipboard")); if (menu.exec(m_editorList->mapToGlobal(pos))) { QApplication::clipboard()->setText(QDir::toNativeSeparators(fileName)); } diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 4db9047e77f..6d0a06bf61e 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -673,7 +673,7 @@ void CPPEditor::createToolBar(CPPEditorEditable *editable) m_methodCombo->setModel(m_proxyModel); m_methodCombo->setContextMenuPolicy(Qt::ActionsContextMenu); - m_sortAction = new QAction(tr("Sort alphabetically"), m_methodCombo); + 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)));