Class: TaskWindow
- Inherits:
-
Qt::Widget
- Object
- Qt::Widget
- TaskWindow
show all
- Defined in:
- lib/taskwin.rb
Overview
Defined Under Namespace
Classes: Item, TaskItem, TaskTable
Constant Summary
collapse
- SOURCE =
0
- FILE =
1
- LAPSE =
2
- STATUS =
3
- GroupName =
"TaskWindow"
Instance Method Summary
collapse
Constructor Details
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
|
# File 'lib/taskwin.rb', line 318
def initialize()
super
tvLayout = Qt::VBoxLayout.new
@table = TaskTable.new
tvLayout.addWidget(@table)
@table.(['Source', 'File', 'Lapse', 'Status'])
@table..stretchLastSection = true
@table.selectionBehavior = Qt::AbstractItemView::SelectRows
@table.alternatingRowColors = true
setLayout(tvLayout)
end
|
Instance Method Details
#addTask(process) ⇒ Object
349
350
351
352
353
354
355
356
357
|
# File 'lib/taskwin.rb', line 349
def addTask(process)
src = process.sourceUrl
save = process.rawFileName
taskItem = TaskItem.new(process, src, save, 0, 'prepare')
@table.insertTaskItem(taskItem)
taskItem
end
|
#each(&block) ⇒ Object
359
360
361
|
# File 'lib/taskwin.rb', line 359
def each(&block)
@table.each(&block)
end
|
#readSettings ⇒ Object
342
343
344
345
|
# File 'lib/taskwin.rb', line 342
def readSettings
config = $config.group(GroupName)
@table..restoreState(config.readEntry('Header', @table..saveState))
end
|
#writeSettings ⇒ Object
337
338
339
340
|
# File 'lib/taskwin.rb', line 337
def writeSettings
config = $config.group(GroupName)
config.writeEntry('Header', @table..saveState)
end
|