Changes between Initial Version and Version 1 of QtInterface


Ignore:
Timestamp:
Sep 17, 2014, 4:28:39 PM (10 years ago)
Author:
manualwiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QtInterface

    v1 v1  
     1= Qt Interface = 
     2 
     3!RefactorErl's Qt based graphical user interface is a standard desktop application which provides the following functionalities 
     4 * File and database management 
     5 * Semantic query execution with auto-complete 
     6 * Skeletons (query schemes) 
     7 * Duplicated code analysis 
     8 * Dependency analysis with dependency graph visualisation 
     9 * Code investigations 
     10 
     11== Installation == 
     12 
     13For now the !RefactorErl Qt GUI is only available on Linux operating systems and possibly OS X (not tested yet). 
     14 
     15=== Dependencies === 
     16 
     17For the Qt GUI to be accessible the Qt application and UI framework is needed, along with the !GraphViz software: 
     18 
     19 * Qt application and UI framework, 4.x (4.8.2 is recommended) 
     20  * qt-sdk package on Ubuntu 
     21 * !GraphViz software ( http://www.graphviz.org ) for dependency graph drawing 
     22  * graphviz package on Ubuntu 
     23 * GCC 4.7.2 or newer, since the Qt GUI strongly relies on C++11 features 
     24 
     25Note that during Qt installation, using the qt-sdk package, a warning message could appear telling you there is a missing external media library called //Phonon//. You can ignore this warning since Phonon is not needed by the Qt GUI. 
     26[[Image(qt_install.png)]] 
     27 
     28Make sure that the {{{dot}}} command, g++ command and {{{qmake}}} or {{{qmake-qt4}}} commands (the latter depends on the Linux distribution) are in your PATH. 
     29 
     30To access the Qt GUI compile the tool with the following command: 
     31 
     32{{{ 
     33bin/referl -build tool -qt_gui 
     34}}} 
     35 
     36 
     37== Starting up == 
     38 
     39The interface can be started either with the {{{referl}}} script or from a running !RefactorErl shell. When using the latter option a username can be passed, this way the saved queries, skeletons and investigations will be distinguished for the different users. 
     40 
     41Start up examples: 
     42 * With the {{{referl}}} script 
     43  {{{ 
     44  bin/referl -qt 
     45  }}} 
     46 
     47 * From the shell without a user name (the current node name will be used as the default user name): 
     48  {{{ 
     49  ri:start_qt(). 
     50  }}} 
     51 
     52 * From the shell with a user name: 
     53  {{{ 
     54  ri:start_qt("userNameAsAString"). 
     55  }}} 
     56 
     57== Shutting down == 
     58 
     59Simply close the window with the X in the upper left or right corner (depends on your window manager). 
     60 
     61== Qt interface usage == 
     62 
     63The main functionalities (file management, queries, dependency graph, duplicated code and investigations) can be accessed in separate embedded windows or as tabs through the **View** menu from the top menu bar. The windows and tabs can be opened at the users will. 
     64The tab or embedded window view (used by default) can be accessed in the **View**/**View Mode** menu or via keyboard shortcuts. When using the embedded window view the windows can be arranged as tiles or as cascaded windows, also accessible from the **View** menu or via shortcuts. 
     65 
     66Some messages are displayed in dialogs, for example when a duplicated code analysis is finished or some error happens during an operation. 
     67 
     68=== File Browser === 
     69 
     70[[Image(fbrowser.png)]] 
     71 
     72This window or tab is used to manage the database. Three tabs are accessible: 
     73 * **Files:** The list of files in the database 
     74 * **Errors:** Detected errors in the database 
     75 * **Configuration Parameters:** Incldes and appbases 
     76 
     77==== Files ==== 
     78In this tab you can: 
     79 * add files and directories or drop the selected files from the list 
     80 * reset or syncronize the database 
     81 
     82==== Errors ==== 
     83View the detected errors in the database. 
     84 
     85==== Configuration Parameters ==== 
     86In this tab you can: 
     87 * add includes and appbases or drop the selected ones from the list, using the **Delete env** button 
     88 
     89=== Queries === 
     90 
     91Read more about semantic queries on the [SemanticQuery Semantic Queries Page]. 
     92 
     93[[Image(queries.png)]] 
     94 
     95On this window there are four tabs: 
     96 * **Query:** Run queries and manage skeletons 
     97 * **Last results:** Result of the latest query run in a collapsible tree format 
     98 * **Running queries:** List of currently running queries 
     99 * **Files:** File list in the database 
     100 
     101==== Queries ==== 
     102Queries can be entered with the help of autocorrect in the top textbox. The query can be ran or saved as a skeleton with the corresponding buttons below. 
     103 
     104The list of the latest queries is used to re-run previous ones from the cache. 
     105 
     106==== Last results ==== 
     107The query result is displayed in a tree structure, according to the grouping. Some parts of the tree are bound to certain code parts, these can be opened in the code browser on the right by //double clicking them using the left mouse button//. 
     108 
     109==== Running queries ==== 
     110A running query can be selected and stopped with the **Kill query** button. 
     111 
     112==== Files ==== 
     113A file can be opened in the code browser by double clicking it in the list. 
     114 
     115=== Dependency Graph === 
     116Read more about dependency analysis on the [wiki:Dependency Dependency Analysis Page]. 
     117 
     118[[Image(depgraph.png)]] 
     119 
     120You can generate: 
     121 * Qt based graphical graphs, by using the **Draw** button 
     122 * SVG graphs, by using the **Draw SVG** button 
     123 
     124The dependency analysis can be performed in the following levels: 
     125 * Function 
     126 * Module 
     127 * Module group 
     128using the whole graph (**All**) or the cyclic sub-graphs (**Cycles**). 
     129 
     130A start function or module can be given, as well as excluded modules and excluded leaves of nodes. Autocomplete helps the addition of modules or functions. 
     131 
     132For better navigation you can zoom in the graph by pressing the Ctrl key and using the mouse scroll. 
     133 
     134=== Duplicated Code === 
     135You can learn more about this topic and about the usage on CloneIdentifiErl page, whilst the services provided by this interface are detailed below. 
     136[[Image(dupcode.png)]] 
     137 
     138You can choose an algorithm by clicking on one of the top-left tabs. After filling in the parameters the analysis is started by clicking the **Run analysis** button. When the analysis is finished an info dialog pops up notifying you. 
     139Choose the group and the contents of the left and right browsers from the available drop-down lists. 
     140 
     141The result of a previous analysis can be reloaded by entering the name (helped by autocomplete) and clicking the **Load previous result** button. 
     142 
     143=== Investigations === 
     144 
     145[[Image(investigations.png)]] 
     146 
     147The usage of the investigation window is the following: 
     148 
     149 * Enter a function name in MODULE:FUNCTION/ARITY format (helped by autocomplete) and click the **Run new investigation** button. An investigation box will appear on the right side of the window with the selected function in it. 
     150 * By clicking in the code of the investigation box a new query can be ran from the specified position. The query results will appear in a list on the left side. 
     151 * Select the wanted result and click the **Add to investigation** button. 
     152 
     153Investigations can be saved using the **Save** and **Save as** buttons. To reload one select it from the list and click the **Load** button. 
     154 
     155Investigation box functionality: 
     156 * **Name:** Add a name 
     157 * **Add memo:** Add a comment box 
     158 * **Hide:** Hide the code in the box 
     159 * **Delete:** Delete the box and its subtree 
     160 * **Move to new:** Move the box and its subtree to a new investigation 
     161 * **New investigation:** Use the box as the starting point of a new investigation 
     162 
     163For better navigation you can zoom in the graph by pressing the Ctrl key and using the mouse scroll. 
     164 
     165=== Code Browser === 
     166 
     167[[Image(cbrowser.png)]] 
     168 
     169The Code Browser is not directly accessible from the **View** menu like the previous functionalities but from various places. The Queries and Duplicated Code windows have built-in Code Browsers as well as the Investigation boxes. If you double click a file in the File Browser window a separate Code Browser window opens. 
     170 
     171The Code Browser allows you to view the source of a module in the !RefactorErl database with syntax highlighting, search functionality and queries started from a selected position. The text search can be triggered by simply typing when the Code Browser is in focus, so a search bar appears on the bottom of the window. By //clicking somewhere in the code using the left mouse button// a query bar appears and a query can be given by typing or selecting the available predefined queries and started clicking the **Run query** button.