240 |
240 |
241 // ============================================================================= |
241 // ============================================================================= |
242 // ----------------------------------------------------------------------------- |
242 // ----------------------------------------------------------------------------- |
243 DEFINE_ACTION (Help, KEY (F1)) |
243 DEFINE_ACTION (Help, KEY (F1)) |
244 { |
244 { |
245 |
|
246 } |
245 } |
247 |
246 |
248 // ============================================================================= |
247 // ============================================================================= |
249 // ----------------------------------------------------------------------------- |
248 // ----------------------------------------------------------------------------- |
250 DEFINE_ACTION (About, 0) |
249 DEFINE_ACTION (About, 0) |
349 |
348 |
350 // ============================================================================= |
349 // ============================================================================= |
351 // ----------------------------------------------------------------------------- |
350 // ----------------------------------------------------------------------------- |
352 DEFINE_ACTION (InsertFrom, 0) |
351 DEFINE_ACTION (InsertFrom, 0) |
353 { str fname = QFileDialog::getOpenFileName(); |
352 { str fname = QFileDialog::getOpenFileName(); |
354 ulong idx = g_win->getInsertionPoint(); |
353 int idx = g_win->getInsertionPoint(); |
355 |
354 |
356 if (!fname.length()) |
355 if (!fname.length()) |
357 return; |
356 return; |
358 |
357 |
359 File f (fname, File::Read); |
358 File f (fname, File::Read); |
406 } |
405 } |
407 |
406 |
408 // ============================================================================= |
407 // ============================================================================= |
409 // ----------------------------------------------------------------------------- |
408 // ----------------------------------------------------------------------------- |
410 DEFINE_ACTION (InsertRaw, 0) |
409 DEFINE_ACTION (InsertRaw, 0) |
411 { ulong idx = g_win->getInsertionPoint(); |
410 { int idx = g_win->getInsertionPoint(); |
412 |
411 |
413 QDialog* const dlg = new QDialog; |
412 QDialog* const dlg = new QDialog; |
414 QVBoxLayout* const layout = new QVBoxLayout; |
413 QVBoxLayout* const layout = new QVBoxLayout; |
415 QTextEdit* const te_edit = new QTextEdit; |
414 QTextEdit* const te_edit = new QTextEdit; |
416 QDialogButtonBox* const bbx_buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel); |
415 QDialogButtonBox* const bbx_buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel); |
443 // ============================================================================= |
442 // ============================================================================= |
444 // ----------------------------------------------------------------------------- |
443 // ----------------------------------------------------------------------------- |
445 DEFINE_ACTION (Screenshot, 0) |
444 DEFINE_ACTION (Screenshot, 0) |
446 { setlocale (LC_ALL, "C"); |
445 { setlocale (LC_ALL, "C"); |
447 |
446 |
448 ushort w, h; |
447 int w, h; |
449 uchar* imgdata = g_win->R()->screencap (w, h); |
448 uchar* imgdata = g_win->R()->screencap (w, h); |
450 QImage img = imageFromScreencap (imgdata, w, h); |
449 QImage img = imageFromScreencap (imgdata, w, h); |
451 |
450 |
452 str root = basename (LDFile::current()->name()); |
451 str root = basename (LDFile::current()->name()); |
453 |
452 |