1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import QtQuick 1.1
- import com.nokia.meego 1.0
- import "Logic.js" as Logic
- PageStackWindow {
- id: appWindow
- showStatusBar: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? false : true
- UserTheme { id: userTheme }
- function checkFile( __file ) {
- return cppMeeWords.checkFile( __file )
- }
- //initialPage: mainPage
- initialPage: splashPage
- /* набор параметров на процесс обучения */
- property string learnWord: "word"
- property string learnTranslation: "translation"
- property int answTrue: 0
- property int answFalse: 0
- property variant bufWords
- property int siz_bufWords:0
- property int porgressLearn: 0
- property int curShowTrue: 0
- property int curShowFalse: 0
- property int curWordId: 0
- /*--------------------------------------------------*/
- property variant bufWordsErrorTest
- /*--------------------------------------------------*/
- property variant filterWords: []
- property variant filterWords_indx: []
- function initTableDB() {
- var db = Logic.getDatabase()
- console.log("initTableDB()")
- db.transaction( function(tx) {
- //tx.executeSql("drop table categories")
- //tx.executeSql("drop table words")
- tx.executeSql( "CREATE TABLE IF NOT EXISTS categories ('id' INTEGER UNIQUE PRIMARY KEY AUTOINCREMENT NOT NULL, category TEXT, description TEXT )" )
- tx.executeSql( "CREATE TABLE IF NOT EXISTS words ('id' INTEGER UNIQUE PRIMARY KEY AUTOINCREMENT NOT NULL, word TEXT, translation TEXT, show_true INTEGER, show_false INTEGER, category_id INTEGER REFERENCES categories ('id') ON DELETE CASCADE ON UPDATE CASCADE )" )
- }
- )
- }
- MainPage { id: mainPage }
- Splash { id: splashPage }
- Component.onCompleted: {
- initTableDB()
- }
- }
|