Skip to content
Snippets Groups Projects
Commit c6847bad authored by Kaj Koivunen's avatar Kaj Koivunen :coffee:
Browse files

dokumentaatiota

parent e48237f6
No related branches found
Tags vaihe6
No related merge requests found
......@@ -94,8 +94,13 @@ class Project {
}
}
/**
* Runs automated translation on page with provided number
* @param page number of page to translate
*/
fun translatePage(page: Int) = pages[page].translatePage()
/** Runs automated translaiton on all pages */
fun translateAllPages() {
TranslationBackend.sourceLanguage = "ja"
TranslationBackend.destinationLanguage = "en-US"
......
......@@ -23,6 +23,7 @@ class Ronove: App(MainView::class, RonoveStylesheet::class) {
/** Amount of pages in project */
var pageCount = SimpleIntegerProperty(project.pages.size)
/** Reference to [TableView] in [MainView], used to call refresh on it. */
lateinit var table: TableView<Line>
/**
......@@ -42,11 +43,13 @@ class Ronove: App(MainView::class, RonoveStylesheet::class) {
table.refresh()
}
/** Adds new line to the end of page */
fun addLine() {
project.pages[currentPage.value-1].lines.add(Line())
table.refresh()
}
/** Removes current page */
fun removePage() {
project.pages.removeAt(currentPage.value-1)
pageCount.set(project.pages.size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment