void TextEditTestWindow::on_actionSave_triggered() { PHDEBUG << _settings->currentDocument(); if(QFile(_settings->currentDocument()).exists()) saveDocument(_settings->currentDocument()); else on_actionSave_as_triggered(); }
void notepad::on_actionSave_as_triggered() { QString file = QFileDialog::getSaveFileName(this,"Open file"); if(!file.isEmpty()) { FileName = file; on_actionSave_as_triggered(); } }
void MainWindow::on_actionSave_triggered() { if(fileName.isEmpty()) { on_actionSave_as_triggered(); } else { c->savePic(fileName); } }
void MainWindow::on_actionSave_triggered() { if(file_name.isEmpty()) on_actionSave_as_triggered(); else { saved=1; QFile sFile(file_name); if(sFile.open(QFile::WriteOnly | QFile::Text)) { QTextStream out(&sFile); out << ui->txtedit->toPlainText(); sFile.flush(); sFile.close(); } } }
void MainWindow::on_actionSave_triggered() { if(m_file_name.isEmpty()) { on_actionSave_as_triggered(); } else { QFile sFile(m_file_name); if(sFile.open(QFile::WriteOnly | QFile::Text)) { QTextStream out(&sFile); out.setCodec("UTF-8"); out << m_ui->txtedit->toPlainText(); m_saved = m_ui->txtedit->toPlainText(); sFile.flush(); sFile.close(); } } UpdateStatusBar(); }
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_actionNew_triggered(); break; case 1: on_actionAbout_triggered(); break; case 2: on_actionOpen_triggered(); break; case 3: on_actionRedo_triggered(); break; case 4: on_actionCopy_triggered(); break; case 5: on_actionCut_triggered(); break; case 6: on_actionPaste_triggered(); break; case 7: on_actionSave_triggered(); break; case 8: on_actionSave_as_triggered(); break; case 9: on_actionUndo_triggered(); break; default: ; } _id -= 10; } return _id; }
int EditorWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_actionClear_triggered(); break; case 1: on_action_New_triggered(); break; case 2: on_action_Run_File_triggered(); break; case 3: onEngineStarted(); break; case 4: onEngineStopped(); break; case 5: onEnginePanic((*reinterpret_cast< Atom(*)>(_a[1])),(*reinterpret_cast< Word(*)>(_a[2])),(*reinterpret_cast< const QString(*)>(_a[3])),(*reinterpret_cast< const QString(*)>(_a[4]))); break; case 6: on_action_Inspect_Selection_triggered(); break; case 7: on_action_Quit_triggered(); break; case 8: on_action_Save_triggered(); break; case 9: on_actionSave_as_triggered(); break; case 10: on_action_Open_triggered(); break; default: ; } _id -= 11; } return _id; }