class_a_data_base_setup.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.20"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>openPilotLog: ADataBaseSetup Class Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="resize.js"></script>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  17. <script type="text/javascript" src="search/searchdata.js"></script>
  18. <script type="text/javascript" src="search/search.js"></script>
  19. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  20. <link href="custom_dark_theme.css" rel="stylesheet" type="text/css"/>
  21. </head>
  22. <body>
  23. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  24. <div id="titlearea">
  25. <table cellspacing="0" cellpadding="0">
  26. <tbody>
  27. <tr style="height: 56px;">
  28. <td id="projectalign" style="padding-left: 0.5em;">
  29. <div id="projectname">openPilotLog
  30. </div>
  31. </td>
  32. </tr>
  33. </tbody>
  34. </table>
  35. </div>
  36. <!-- end header part -->
  37. <!-- Generated by Doxygen 1.8.20 -->
  38. <script type="text/javascript">
  39. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  40. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  41. /* @license-end */
  42. </script>
  43. <script type="text/javascript" src="menudata.js"></script>
  44. <script type="text/javascript" src="menu.js"></script>
  45. <script type="text/javascript">
  46. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  47. $(function() {
  48. initMenu('',true,false,'search.php','Search');
  49. $(document).ready(function() { init_search(); });
  50. });
  51. /* @license-end */</script>
  52. <div id="main-nav"></div>
  53. </div><!-- top -->
  54. <div id="side-nav" class="ui-resizable side-nav-resizable">
  55. <div id="nav-tree">
  56. <div id="nav-tree-contents">
  57. <div id="nav-sync" class="sync"></div>
  58. </div>
  59. </div>
  60. <div id="splitbar" style="-moz-user-select:none;"
  61. class="ui-resizable-handle">
  62. </div>
  63. </div>
  64. <script type="text/javascript">
  65. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  66. $(document).ready(function(){initNavTree('class_a_data_base_setup.html',''); initResizable(); });
  67. /* @license-end */
  68. </script>
  69. <div id="doc-content">
  70. <!-- window showing the filter options -->
  71. <div id="MSearchSelectWindow"
  72. onmouseover="return searchBox.OnSearchSelectShow()"
  73. onmouseout="return searchBox.OnSearchSelectHide()"
  74. onkeydown="return searchBox.OnSearchSelectKey(event)">
  75. </div>
  76. <!-- iframe showing the search results (closed by default) -->
  77. <div id="MSearchResultsWindow">
  78. <iframe src="javascript:void(0)" frameborder="0"
  79. name="MSearchResults" id="MSearchResults">
  80. </iframe>
  81. </div>
  82. <div class="header">
  83. <div class="summary">
  84. <a href="#pub-static-methods">Static Public Member Functions</a> &#124;
  85. <a href="class_a_data_base_setup-members.html">List of all members</a> </div>
  86. <div class="headertitle">
  87. <div class="title">ADataBaseSetup Class Reference</div> </div>
  88. </div><!--header-->
  89. <div class="contents">
  90. <p>The <a class="el" href="class_a_data_base_setup.html" title="The ADataBaseSetup class is responsible for the inital setup of the database when the application is ...">ADataBaseSetup</a> class is responsible for the inital setup of the database when the application is first launched. It creates the database in the specified default location and creates all required tables and views. It can also be used to reset the database currently used.
  91. <a href="class_a_data_base_setup.html#details">More...</a></p>
  92. <p><code>#include &lt;<a class="el" href="adatabasesetup_8h_source.html">adatabasesetup.h</a>&gt;</code></p>
  93. <table class="memberdecls">
  94. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
  95. Static Public Member Functions</h2></td></tr>
  96. <tr class="memitem:ac9c061c0d18777537dcf6273683c5468"><td class="memItemLeft" align="right" valign="top"><a id="ac9c061c0d18777537dcf6273683c5468"></a>
  97. static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_data_base_setup.html#ac9c061c0d18777537dcf6273683c5468">debug</a> ()</td></tr>
  98. <tr class="memdesc:ac9c061c0d18777537dcf6273683c5468"><td class="mdescLeft">&#160;</td><td class="mdescRight">dbSetup::debug prints Database Layout <br /></td></tr>
  99. <tr class="separator:ac9c061c0d18777537dcf6273683c5468"><td class="memSeparator" colspan="2">&#160;</td></tr>
  100. <tr class="memitem:ac91241891205e66592a6fdc37274c858"><td class="memItemLeft" align="right" valign="top"><a id="ac91241891205e66592a6fdc37274c858"></a>
  101. static bool&#160;</td><td class="memItemRight" valign="bottom"><b>createDatabase</b> ()</td></tr>
  102. <tr class="separator:ac91241891205e66592a6fdc37274c858"><td class="memSeparator" colspan="2">&#160;</td></tr>
  103. <tr class="memitem:a5fa999b8405625660337754ff89ad55a"><td class="memItemLeft" align="right" valign="top"><a id="a5fa999b8405625660337754ff89ad55a"></a>
  104. static bool&#160;</td><td class="memItemRight" valign="bottom"><b>fillTemplates</b> ()</td></tr>
  105. <tr class="separator:a5fa999b8405625660337754ff89ad55a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:a595ecb2a529399711d20052968a9eae7"><td class="memItemLeft" align="right" valign="top"><a id="a595ecb2a529399711d20052968a9eae7"></a>
  107. static bool&#160;</td><td class="memItemRight" valign="bottom"><b>importDefaultData</b> ()</td></tr>
  108. <tr class="separator:a595ecb2a529399711d20052968a9eae7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="memitem:a89fee11dbb1510262a783ee97d946ab7"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_data_base_setup.html#a89fee11dbb1510262a783ee97d946ab7">resetToDefault</a> ()</td></tr>
  110. <tr class="memdesc:a89fee11dbb1510262a783ee97d946ab7"><td class="mdescLeft">&#160;</td><td class="mdescRight">DbSetup::resetToDefault Empties all user-generated content in the database. <a href="class_a_data_base_setup.html#a89fee11dbb1510262a783ee97d946ab7">More...</a><br /></td></tr>
  111. <tr class="separator:a89fee11dbb1510262a783ee97d946ab7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. <tr class="memitem:aa05e875621bd9c01319b545746dd4936"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_data_base_setup.html#aa05e875621bd9c01319b545746dd4936">commitData</a> (QVector&lt; QStringList &gt; fromCSV, const QString &amp;tableName)</td></tr>
  113. <tr class="memdesc:aa05e875621bd9c01319b545746dd4936"><td class="mdescLeft">&#160;</td><td class="mdescRight">DbSetup::commitData inserts the data parsed from a csv file into the database. The first line of the csv file has to contain the column names of the corresponding table in the database. <a href="class_a_data_base_setup.html#aa05e875621bd9c01319b545746dd4936">More...</a><br /></td></tr>
  114. <tr class="separator:aa05e875621bd9c01319b545746dd4936"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. </table>
  116. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  117. <div class="textblock"><p>The <a class="el" href="class_a_data_base_setup.html" title="The ADataBaseSetup class is responsible for the inital setup of the database when the application is ...">ADataBaseSetup</a> class is responsible for the inital setup of the database when the application is first launched. It creates the database in the specified default location and creates all required tables and views. It can also be used to reset the database currently used. </p>
  118. </div><h2 class="groupheader">Member Function Documentation</h2>
  119. <a id="aa05e875621bd9c01319b545746dd4936"></a>
  120. <h2 class="memtitle"><span class="permalink"><a href="#aa05e875621bd9c01319b545746dd4936">&#9670;&nbsp;</a></span>commitData()</h2>
  121. <div class="memitem">
  122. <div class="memproto">
  123. <table class="mlabels">
  124. <tr>
  125. <td class="mlabels-left">
  126. <table class="memname">
  127. <tr>
  128. <td class="memname">bool ADataBaseSetup::commitData </td>
  129. <td>(</td>
  130. <td class="paramtype">QVector&lt; QStringList &gt;&#160;</td>
  131. <td class="paramname"><em>fromCSV</em>, </td>
  132. </tr>
  133. <tr>
  134. <td class="paramkey"></td>
  135. <td></td>
  136. <td class="paramtype">const QString &amp;&#160;</td>
  137. <td class="paramname"><em>tableName</em>&#160;</td>
  138. </tr>
  139. <tr>
  140. <td></td>
  141. <td>)</td>
  142. <td></td><td></td>
  143. </tr>
  144. </table>
  145. </td>
  146. <td class="mlabels-right">
  147. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  148. </tr>
  149. </table>
  150. </div><div class="memdoc">
  151. <p>DbSetup::commitData inserts the data parsed from a csv file into the database. The first line of the csv file has to contain the column names of the corresponding table in the database. </p>
  152. <dl class="params"><dt>Parameters</dt><dd>
  153. <table class="params">
  154. <tr><td class="paramname">fromCSV</td><td>input as parsed from CSV::read() </td></tr>
  155. <tr><td class="paramname">tableName</td><td>as in the database </td></tr>
  156. </table>
  157. </dd>
  158. </dl>
  159. <dl class="section return"><dt>Returns</dt><dd></dd></dl>
  160. </div>
  161. </div>
  162. <a id="a89fee11dbb1510262a783ee97d946ab7"></a>
  163. <h2 class="memtitle"><span class="permalink"><a href="#a89fee11dbb1510262a783ee97d946ab7">&#9670;&nbsp;</a></span>resetToDefault()</h2>
  164. <div class="memitem">
  165. <div class="memproto">
  166. <table class="mlabels">
  167. <tr>
  168. <td class="mlabels-left">
  169. <table class="memname">
  170. <tr>
  171. <td class="memname">bool ADataBaseSetup::resetToDefault </td>
  172. <td>(</td>
  173. <td class="paramname"></td><td>)</td>
  174. <td></td>
  175. </tr>
  176. </table>
  177. </td>
  178. <td class="mlabels-right">
  179. <span class="mlabels"><span class="mlabel">static</span></span> </td>
  180. </tr>
  181. </table>
  182. </div><div class="memdoc">
  183. <p>DbSetup::resetToDefault Empties all user-generated content in the database. </p>
  184. <dl class="section return"><dt>Returns</dt><dd>true on success </dd></dl>
  185. </div>
  186. </div>
  187. <hr/>The documentation for this class was generated from the following files:<ul>
  188. <li>src/database/<a class="el" href="adatabasesetup_8h_source.html">adatabasesetup.h</a></li>
  189. <li>src/database/adatabasesetup.cpp</li>
  190. </ul>
  191. </div><!-- contents -->
  192. </div><!-- doc-content -->
  193. <!-- start footer part -->
  194. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  195. <ul>
  196. <li class="navelem"><a class="el" href="class_a_data_base_setup.html">ADataBaseSetup</a></li>
  197. <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
  198. </ul>
  199. </div>
  200. </body>
  201. </html>