Mercurial > hg > octave-lyh
changeset 14709:f50591409306 gui
Started to rename class names and methods from camel case to underscore-
line wrap: on
line diff
--- a/gui/src/files-dockwidget.cc +++ b/gui/src/files-dockwidget.cc @@ -25,7 +25,7 @@ #include <QProcess> #include <QDebug> -FilesDockWidget::FilesDockWidget (QWidget *parent) +files_dock_widget::files_dock_widget (QWidget *parent) : QDockWidget (parent) { setObjectName ("FilesDockWidget"); @@ -103,7 +103,7 @@ } void -FilesDockWidget::itemDoubleClicked (const QModelIndex & index) +files_dock_widget::itemDoubleClicked (const QModelIndex & index) { // Retrieve the file info associated with the model index. QFileInfo fileInfo = m_fileSystemModel->fileInfo (index); @@ -120,7 +120,7 @@ else { // Check if the user wants to use a custom file editor. - QSettings *settings = ResourceManager::instance ()->settings (); + QSettings *settings = resource_manager::instance ()->settings (); if (settings->value ("useCustomFileEditor").toBool ()) { QString editor = settings->value ("customFileEditor").toString (); @@ -136,13 +136,13 @@ } void -FilesDockWidget::setCurrentDirectory (QString currentDirectory) +files_dock_widget::setCurrentDirectory (QString currentDirectory) { m_currentDirectory->setText (currentDirectory); } void -FilesDockWidget::onUpDirectory (void) +files_dock_widget::onUpDirectory (void) { QDir dir = QDir (m_fileSystemModel->filePath (m_fileTreeView->rootIndex ())); @@ -154,7 +154,7 @@ } void -FilesDockWidget::currentDirectoryEntered () +files_dock_widget::currentDirectoryEntered () { QFileInfo fileInfo (m_currentDirectory->text ()); if (fileInfo.isDir ()) @@ -172,9 +172,9 @@ } void -FilesDockWidget::noticeSettings () +files_dock_widget::noticeSettings () { - QSettings *settings = ResourceManager::instance ()->settings (); + QSettings *settings = resource_manager::instance ()->settings (); m_fileTreeView->setColumnHidden (0, !settings->value ("showFilenames").toBool ()); m_fileTreeView->setColumnHidden (1, !settings->value ("showFileSize").toBool ()); m_fileTreeView->setColumnHidden (2, !settings->value ("showFileType").toBool ()); @@ -185,14 +185,14 @@ } void -FilesDockWidget::handleVisibilityChanged (bool visible) +files_dock_widget::handleVisibilityChanged (bool visible) { if (visible) emit activeChanged (true); } void -FilesDockWidget::closeEvent (QCloseEvent *event) +files_dock_widget::closeEvent (QCloseEvent *event) { emit activeChanged (false); QDockWidget::closeEvent (event);
--- a/gui/src/files-dockwidget.h +++ b/gui/src/files-dockwidget.h @@ -33,11 +33,11 @@ #include <QDockWidget> #include <QLineEdit> -class FilesDockWidget : public QDockWidget +class files_dock_widget : public QDockWidget { Q_OBJECT public: - FilesDockWidget (QWidget *parent = 0); + files_dock_widget (QWidget *parent = 0); public slots: /** Slot for handling a change in directory via double click. */
--- a/gui/src/history-dockwidget.cc +++ b/gui/src/history-dockwidget.cc @@ -18,16 +18,16 @@ #include "history-dockwidget.h" #include <QVBoxLayout> -HistoryDockWidget::HistoryDockWidget (QWidget * parent):QDockWidget (parent) +history_dock_widget::history_dock_widget (QWidget * parent):QDockWidget (parent) { setObjectName ("HistoryDockWidget"); construct (); } void -HistoryDockWidget::construct () +history_dock_widget::construct () { - m_sortFilterProxyModel.setSourceModel(OctaveLink::instance ()->historyModel()); + m_sortFilterProxyModel.setSourceModel(octave_link::instance ()->historyModel()); m_historyListView = new QListView (this); m_historyListView->setModel (&m_sortFilterProxyModel); m_historyListView->setAlternatingRowColors (true); @@ -52,20 +52,20 @@ } void -HistoryDockWidget::handleDoubleClick (QModelIndex modelIndex) +history_dock_widget::handleDoubleClick (QModelIndex modelIndex) { emit commandDoubleClicked (modelIndex.data().toString()); } void -HistoryDockWidget::handleVisibilityChanged (bool visible) +history_dock_widget::handleVisibilityChanged (bool visible) { if (visible) emit activeChanged (true); } void -HistoryDockWidget::closeEvent (QCloseEvent *event) +history_dock_widget::closeEvent (QCloseEvent *event) { emit activeChanged (false); QDockWidget::closeEvent (event);
--- a/gui/src/history-dockwidget.h +++ b/gui/src/history-dockwidget.h @@ -24,11 +24,11 @@ #include <QSortFilterProxyModel> #include "octave-link.h" -class HistoryDockWidget:public QDockWidget +class history_dock_widget:public QDockWidget { Q_OBJECT public: - HistoryDockWidget (QWidget *parent = 0); + history_dock_widget (QWidget *parent = 0); void updateHistory (QStringList history); public slots:
--- a/gui/src/m-editor/file-editor-interface.h +++ b/gui/src/m-editor/file-editor-interface.h @@ -21,47 +21,47 @@ #include <QDockWidget> class QTerminal; -class MainWindow; +class main_window; -class FileEditorInterface : public QDockWidget +class file_editor_interface : public QDockWidget { Q_OBJECT public: - FileEditorInterface (QTerminal *terminal, MainWindow *mainWindow) + file_editor_interface (QTerminal *terminal, main_window *mainWindow) : QDockWidget ((QWidget*)mainWindow) // QDockWidget constructor is explicit, hence the cast. { setObjectName ("FileEditor"); m_terminal = terminal; m_mainWindow = mainWindow; - connect (this, SIGNAL (visibilityChanged (bool)), this, SLOT (handleVisibilityChanged (bool))); + connect (this, SIGNAL (visibilityChanged (bool)), this, SLOT (handle_visibility_changed (bool))); } - virtual ~FileEditorInterface () { } + virtual ~file_editor_interface () { } public slots: - virtual void requestNewFile () = 0; - virtual void requestOpenFile () = 0; - virtual void requestOpenFile (QString fileName) = 0; + virtual void request_new_file () = 0; + virtual void request_open_file () = 0; + virtual void request_open_file (QString fileName) = 0; signals: - void activeChanged (bool active); + void active_changed (bool active); protected: QTerminal* m_terminal; - MainWindow* m_mainWindow; + main_window* m_mainWindow; void closeEvent (QCloseEvent *event) { - emit activeChanged (false); + emit active_changed (false); QDockWidget::closeEvent (event); } protected slots: - void handleVisibilityChanged (bool visible) + void handle_visibility_changed (bool visible) { if (visible) - emit activeChanged (true); + emit active_changed (true); } };
--- a/gui/src/m-editor/file-editor-tab.cc +++ b/gui/src/m-editor/file-editor-tab.cc @@ -20,94 +20,94 @@ #include <QMessageBox> #include <QVBoxLayout> -FileEditorTab::FileEditorTab(FileEditor *fileEditor) +file_editor_tab::file_editor_tab(file_editor *fileEditor) : QWidget ((QWidget*)fileEditor) { - QSettings *settings = ResourceManager::instance ()->settings (); - m_fileEditor = fileEditor; - m_fileName = ""; - m_editArea = new QsciScintilla (this); - m_editArea->setLexer (fileEditor->lexer ()); + QSettings *settings = resource_manager::instance ()->settings (); + _file_editor = fileEditor; + _file_name = ""; + _edit_area = new QsciScintilla (this); + _edit_area->setLexer (fileEditor->lexer ()); // markers - m_editArea->setMarginType (1, QsciScintilla::SymbolMargin); - m_editArea->setMarginSensitivity (1, true); - m_editArea->markerDefine (QsciScintilla::RightTriangle, MARKER_BOOKMARK); - connect (m_editArea, SIGNAL (marginClicked (int, int, Qt::KeyboardModifiers)), - this, SLOT (handleMarginClicked (int, int, Qt::KeyboardModifiers))); + _edit_area->setMarginType (1, QsciScintilla::SymbolMargin); + _edit_area->setMarginSensitivity (1, true); + _edit_area->markerDefine (QsciScintilla::RightTriangle, MARKER_BOOKMARK); + connect (_edit_area, SIGNAL (marginClicked (int, int, Qt::KeyboardModifiers)), + this, SLOT (handle_margin_clicked (int, int, Qt::KeyboardModifiers))); // line numbers - m_editArea->setMarginsForegroundColor(QColor(96,96,96)); - m_editArea->setMarginsBackgroundColor(QColor(232,232,220)); + _edit_area->setMarginsForegroundColor(QColor(96,96,96)); + _edit_area->setMarginsBackgroundColor(QColor(232,232,220)); if (settings->value ("editor/showLineNumbers",true).toBool ()) { QFont marginFont( settings->value ("editor/fontName","Courier").toString () , settings->value ("editor/fontSize",10).toInt () ); - m_editArea->setMarginsFont( marginFont ); + _edit_area->setMarginsFont( marginFont ); QFontMetrics metrics(marginFont); - m_editArea->setMarginType (2, QsciScintilla::TextMargin); - m_editArea->setMarginWidth(2, metrics.width("99999")); - m_editArea->setMarginLineNumbers(2, true); + _edit_area->setMarginType (2, QsciScintilla::TextMargin); + _edit_area->setMarginWidth(2, metrics.width("99999")); + _edit_area->setMarginLineNumbers(2, true); } // code folding - m_editArea->setMarginType (3, QsciScintilla::SymbolMargin); - m_editArea->setFolding (QsciScintilla::BoxedTreeFoldStyle , 3); + _edit_area->setMarginType (3, QsciScintilla::SymbolMargin); + _edit_area->setFolding (QsciScintilla::BoxedTreeFoldStyle , 3); // other features if (settings->value ("editor/highlightCurrentLine",true).toBool ()) { - m_editArea->setCaretLineVisible(true); - m_editArea->setCaretLineBackgroundColor(QColor(245,245,245)); + _edit_area->setCaretLineVisible(true); + _edit_area->setCaretLineBackgroundColor(QColor(245,245,245)); } - m_editArea->setBraceMatching (QsciScintilla::StrictBraceMatch); - m_editArea->setAutoIndent (true); - m_editArea->setIndentationWidth (2); - m_editArea->setIndentationsUseTabs (false); + _edit_area->setBraceMatching (QsciScintilla::StrictBraceMatch); + _edit_area->setAutoIndent (true); + _edit_area->setIndentationWidth (2); + _edit_area->setIndentationsUseTabs (false); if (settings->value ("editor/codeCompletion",true).toBool ()) { - m_editArea->autoCompleteFromAll (); - m_editArea->setAutoCompletionSource(QsciScintilla::AcsAll); - m_editArea->setAutoCompletionThreshold (1); + _edit_area->autoCompleteFromAll (); + _edit_area->setAutoCompletionSource(QsciScintilla::AcsAll); + _edit_area->setAutoCompletionThreshold (1); } - m_editArea->setUtf8 (true); + _edit_area->setUtf8 (true); QVBoxLayout *layout = new QVBoxLayout (); - layout->addWidget (m_editArea); + layout->addWidget (_edit_area); layout->setMargin (0); setLayout (layout); // connect modified signal - connect (m_editArea, SIGNAL (modificationChanged (bool)), - this, SLOT (newTitle (bool))); - connect (m_editArea, SIGNAL (copyAvailable (bool)), - this, SLOT (handleCopyAvailable (bool))); - connect (&m_fileSystemWatcher, SIGNAL (fileChanged (QString)), - this, SLOT (fileHasChanged (QString))); + connect (_edit_area, SIGNAL (modificationChanged (bool)), + this, SLOT (new_title (bool))); + connect (_edit_area, SIGNAL (copyAvailable (bool)), + this, SLOT (handle_copy_available (bool))); + connect (&_file_system_watcher, SIGNAL (fileChanged (QString)), + this, SLOT (file_has_changed (QString))); - m_fileName = ""; - newTitle (false); + _file_name = ""; + new_title (false); } bool -FileEditorTab::copyAvailable () +file_editor_tab::copyAvailable () { - return m_copyAvailable; + return _copy_available; } void -FileEditorTab::closeEvent (QCloseEvent *event) +file_editor_tab::closeEvent (QCloseEvent *event) { - if (m_fileEditor->mainWindow ()->closing ()) + if (_file_editor->mainWindow ()->closing ()) { // close whole application: save file or not if modified - checkFileModified ("Closing Octave", 0); // no cancel possible + check_file_modified ("Closing Octave", 0); // no cancel possible event->accept (); } else { // ignore close event if file is not saved and user cancels closing this window - if (checkFileModified ("Close File", QMessageBox::Cancel) == QMessageBox::Cancel) + if (check_file_modified ("Close File", QMessageBox::Cancel) == QMessageBox::Cancel) { event->ignore (); } @@ -119,119 +119,119 @@ } void -FileEditorTab::setFileName (QString fileName) +file_editor_tab::set_file_name (QString fileName) { - m_fileName = fileName; - updateTrackedFile (); + _file_name = fileName; + update_tracked_file (); } void -FileEditorTab::handleMarginClicked(int margin, int line, Qt::KeyboardModifiers state) +file_editor_tab::handle_margin_clicked(int margin, int line, Qt::KeyboardModifiers state) { Q_UNUSED (state); if (margin == 1) // marker margin { - unsigned int mask = m_editArea->markersAtLine (line); + unsigned int mask = _edit_area->markersAtLine (line); if (mask && (1 << MARKER_BOOKMARK)) - m_editArea->markerDelete(line,MARKER_BOOKMARK); + _edit_area->markerDelete(line,MARKER_BOOKMARK); else - m_editArea->markerAdd(line,MARKER_BOOKMARK); + _edit_area->markerAdd(line,MARKER_BOOKMARK); } } void -FileEditorTab::commentSelectedText () +file_editor_tab::comment_selected_text () { - doCommentSelectedText (true); + do_comment_selected_text (true); } void -FileEditorTab::uncommentSelectedText () +file_editor_tab::uncomment_selected_text () { - doCommentSelectedText (false); + do_comment_selected_text (false); } void -FileEditorTab::doCommentSelectedText (bool comment) +file_editor_tab::do_comment_selected_text (bool comment) { - if ( m_editArea->hasSelectedText() ) + if ( _edit_area->hasSelectedText() ) { int lineFrom, lineTo, colFrom, colTo, i; - m_editArea->getSelection (&lineFrom,&colFrom,&lineTo,&colTo); + _edit_area->getSelection (&lineFrom,&colFrom,&lineTo,&colTo); if ( colTo == 0 ) // the beginning of last line is not selected lineTo--; // stop at line above - m_editArea->beginUndoAction (); + _edit_area->beginUndoAction (); for ( i=lineFrom; i<=lineTo; i++ ) { if ( comment ) - m_editArea->insertAt("%",i,0); + _edit_area->insertAt("%",i,0); else { - QString line(m_editArea->text(i)); + QString line(_edit_area->text(i)); if ( line.startsWith("%") ) { - m_editArea->setSelection(i,0,i,1); - m_editArea->removeSelectedText(); + _edit_area->setSelection(i,0,i,1); + _edit_area->removeSelectedText(); } } } - m_editArea->endUndoAction (); + _edit_area->endUndoAction (); } } void -FileEditorTab::newTitle(bool modified) +file_editor_tab::new_title(bool modified) { - QString title(m_fileName); - if ( !m_longTitle ) + QString title(_file_name); + if ( !_long_title ) { - QFileInfo file(m_fileName); + QFileInfo file(_file_name); title = file.fileName(); } if ( modified ) { - emit fileNameChanged (title.prepend("* ")); + emit file_name_changed (title.prepend("* ")); } else - emit fileNameChanged (title); + emit file_name_changed (title); } void -FileEditorTab::handleCopyAvailable(bool enableCopy) +file_editor_tab::handle_copy_available(bool enableCopy) { - m_copyAvailable = enableCopy; - emit editorStateChanged (); + _copy_available = enableCopy; + emit editor_state_changed (); } void -FileEditorTab::updateTrackedFile () +file_editor_tab::update_tracked_file () { - QStringList trackedFiles = m_fileSystemWatcher.files (); + QStringList trackedFiles = _file_system_watcher.files (); if (!trackedFiles.isEmpty ()) - m_fileSystemWatcher.removePaths (trackedFiles); + _file_system_watcher.removePaths (trackedFiles); - if (m_fileName != UNNAMED_FILE) - m_fileSystemWatcher.addPath (m_fileName); + if (_file_name != UNNAMED_FILE) + _file_system_watcher.addPath (_file_name); } int -FileEditorTab::checkFileModified (QString msg, int cancelButton) +file_editor_tab::check_file_modified (QString msg, int cancelButton) { int decision = QMessageBox::Yes; - if (m_editArea->isModified ()) + if (_edit_area->isModified ()) { // file is modified but not saved, aks user what to do decision = QMessageBox::warning (this, msg, tr ("The file %1\n" "has been modified. Do you want to save the changes?"). - arg (m_fileName), + arg (_file_name), QMessageBox::Save, QMessageBox::Discard, cancelButton ); if (decision == QMessageBox::Save) { - saveFile (); - if (m_editArea->isModified ()) + save_file (); + if (_edit_area->isModified ()) { // If the user attempted to save the file, but it's still // modified, then probably something went wrong, so return cancel @@ -240,7 +240,7 @@ if ( cancelButton ) return (QMessageBox::Cancel); else - saveFileAs (); + save_file_as (); } } } @@ -248,82 +248,82 @@ } void -FileEditorTab::removeBookmark () +file_editor_tab::remove_bookmark () { - m_editArea->markerDeleteAll(MARKER_BOOKMARK); + _edit_area->markerDeleteAll(MARKER_BOOKMARK); } void -FileEditorTab::toggleBookmark () +file_editor_tab::toggle_bookmark () { int line,cur; - m_editArea->getCursorPosition(&line,&cur); - if ( m_editArea->markersAtLine (line) && (1 << MARKER_BOOKMARK) ) - m_editArea->markerDelete(line,MARKER_BOOKMARK); + _edit_area->getCursorPosition(&line,&cur); + if ( _edit_area->markersAtLine (line) && (1 << MARKER_BOOKMARK) ) + _edit_area->markerDelete(line,MARKER_BOOKMARK); else - m_editArea->markerAdd(line,MARKER_BOOKMARK); + _edit_area->markerAdd(line,MARKER_BOOKMARK); } void -FileEditorTab::nextBookmark () +file_editor_tab::next_bookmark () { int line,cur,nextline; - m_editArea->getCursorPosition(&line,&cur); - if ( m_editArea->markersAtLine(line) && (1 << MARKER_BOOKMARK) ) + _edit_area->getCursorPosition(&line,&cur); + if ( _edit_area->markersAtLine(line) && (1 << MARKER_BOOKMARK) ) line++; // we have a bookmark here, so start search from next line - nextline = m_editArea->markerFindNext(line,(1 << MARKER_BOOKMARK)); - m_editArea->setCursorPosition(nextline,0); + nextline = _edit_area->markerFindNext(line,(1 << MARKER_BOOKMARK)); + _edit_area->setCursorPosition(nextline,0); } void -FileEditorTab::previousBookmark () +file_editor_tab::previous_bookmark () { int line,cur,prevline; - m_editArea->getCursorPosition(&line,&cur); - if ( m_editArea->markersAtLine(line) && (1 << MARKER_BOOKMARK) ) + _edit_area->getCursorPosition(&line,&cur); + if ( _edit_area->markersAtLine(line) && (1 << MARKER_BOOKMARK) ) line--; // we have a bookmark here, so start search from prev line - prevline = m_editArea->markerFindPrevious(line,(1 << MARKER_BOOKMARK)); - m_editArea->setCursorPosition(prevline,0); + prevline = _edit_area->markerFindPrevious(line,(1 << MARKER_BOOKMARK)); + _edit_area->setCursorPosition(prevline,0); } void -FileEditorTab::cut () +file_editor_tab::cut () { - m_editArea->cut (); + _edit_area->cut (); } void -FileEditorTab::copy () +file_editor_tab::copy () { - m_editArea->copy (); + _edit_area->copy (); } void -FileEditorTab::paste () +file_editor_tab::paste () { - m_editArea->paste (); + _edit_area->paste (); } void -FileEditorTab::undo () +file_editor_tab::undo () { - m_editArea->undo (); + _edit_area->undo (); } void -FileEditorTab::redo () +file_editor_tab::redo () { - m_editArea->redo (); + _edit_area->redo (); } void -FileEditorTab::setModified (bool modified) +file_editor_tab::set_modified (bool modified) { - m_editArea->setModified (modified); + _edit_area->setModified (modified); } bool -FileEditorTab::openFile () +file_editor_tab::open_file () { QString openFileName; QFileDialog fileDialog(this); @@ -336,7 +336,7 @@ if (openFileName.isEmpty ()) return false; - loadFile(openFileName); + load_file(openFileName); return true; } else @@ -346,11 +346,11 @@ } void -FileEditorTab::loadFile (QString fileName) +file_editor_tab::load_file (QString fileName) { - if (!m_fileEditor->isVisible ()) + if (!_file_editor->isVisible ()) { - m_fileEditor->show (); + _file_editor->show (); } QFile file (fileName); @@ -364,43 +364,43 @@ QTextStream in (&file); QApplication::setOverrideCursor (Qt::WaitCursor); - m_editArea->setText (in.readAll ()); + _edit_area->setText (in.readAll ()); QApplication::restoreOverrideCursor (); - setFileName (fileName); - updateTrackedFile (); + set_file_name (fileName); + update_tracked_file (); - newTitle (false); // window title (no modification) - m_editArea->setModified (false); // loaded file is not modified yet + new_title (false); // window title (no modification) + _edit_area->setModified (false); // loaded file is not modified yet } void -FileEditorTab::newFile () +file_editor_tab::new_file () { - if (!m_fileEditor->isVisible ()) + if (!_file_editor->isVisible ()) { - m_fileEditor->show (); + _file_editor->show (); } - setFileName (UNNAMED_FILE); - newTitle (false); // window title (no modification) - m_editArea->setText (""); - m_editArea->setModified (false); // new file is not modified yet + set_file_name (UNNAMED_FILE); + new_title (false); // window title (no modification) + _edit_area->setText (""); + _edit_area->setModified (false); // new file is not modified yet } -bool FileEditorTab::saveFile() +bool file_editor_tab::save_file() { - return saveFile (m_fileName); + return save_file (_file_name); } bool -FileEditorTab::saveFile (QString saveFileName) +file_editor_tab::save_file (QString saveFileName) { // it is a new file with the name "<unnamed>" -> call saveFielAs if (saveFileName == UNNAMED_FILE || saveFileName.isEmpty ()) { - return saveFileAs(); + return save_file_as(); } // open the file for writing @@ -416,18 +416,18 @@ // save the contents into the file QTextStream out (&file); QApplication::setOverrideCursor (Qt::WaitCursor); - out << m_editArea->text (); + out << _edit_area->text (); QApplication::restoreOverrideCursor (); - setFileName (saveFileName); // save file name for later use - newTitle (false); // set the window title to actual file name (not modified) - m_editArea->setModified (false); // files is save -> not modified + set_file_name (saveFileName); // save file name for later use + new_title (false); // set the window title to actual file name (not modified) + _edit_area->setModified (false); // files is save -> not modified return true; } bool -FileEditorTab::saveFileAs () +file_editor_tab::save_file_as () { - QString saveFileName(m_fileName); + QString saveFileName(_file_name); QFileDialog fileDialog(this); if (saveFileName == UNNAMED_FILE || saveFileName.isEmpty ()) { @@ -449,27 +449,27 @@ if (saveFileName.isEmpty ()) return false; - return saveFile (saveFileName); + return save_file (saveFileName); } return false; } void -FileEditorTab::runFile () +file_editor_tab::run_file () { - if (m_editArea->isModified ()) - saveFile(m_fileName); + if (_edit_area->isModified ()) + save_file(_file_name); - m_fileEditor->terminal ()->sendText (QString ("run \'%1\'\n").arg (m_fileName)); - m_fileEditor->terminal ()->setFocus (); + _file_editor->terminal ()->sendText (QString ("run \'%1\'\n").arg (_file_name)); + _file_editor->terminal ()->setFocus (); } void -FileEditorTab::fileHasChanged (QString fileName) +file_editor_tab::file_has_changed (QString fileName) { Q_UNUSED (fileName); - if (QFile::exists (m_fileName)) + if (QFile::exists (_file_name)) { // Prevent popping up multiple message boxes when the file has been changed multiple times. static bool alreadyAsking = false; @@ -480,11 +480,11 @@ int decision = QMessageBox::warning (this, tr ("Octave Editor"), tr ("It seems that \'%1\' has been modified by another application. Do you want to reload it?"). - arg (m_fileName), QMessageBox::Yes, QMessageBox::No); + arg (_file_name), QMessageBox::Yes, QMessageBox::No); if (decision == QMessageBox::Yes) { - loadFile (m_fileName); + load_file (_file_name); } alreadyAsking = false; @@ -495,20 +495,20 @@ int decision = QMessageBox::warning (this, tr ("Octave Editor"), tr ("It seems that \'%1\' has been deleted or renamed. Do you want to save it now?"). - arg (m_fileName), QMessageBox::Save, QMessageBox::Close); + arg (_file_name), QMessageBox::Save, QMessageBox::Close); if (decision == QMessageBox::Save) { - if (!saveFileAs ()) + if (!save_file_as ()) { - setFileName (UNNAMED_FILE); - newTitle (true); // window title (no modification) - setModified (true); - updateTrackedFile (); + set_file_name (UNNAMED_FILE); + new_title (true); // window title (no modification) + set_modified (true); + update_tracked_file (); } } else { - emit closeRequest (); + emit close_request (); } } }
--- a/gui/src/m-editor/file-editor-tab.h +++ b/gui/src/m-editor/file-editor-tab.h @@ -23,66 +23,66 @@ #include <QCloseEvent> #include <QFileSystemWatcher> -class FileEditor; -class FileEditorTab : public QWidget +class file_editor; +class file_editor_tab : public QWidget { Q_OBJECT public: - FileEditorTab (FileEditor *fileEditor); + file_editor_tab (file_editor *fileEditor); bool copyAvailable (); public slots: - void newTitle(bool modified); - void handleCopyAvailable(bool enableCopy); - void handleMarginClicked (int line, int margin, Qt::KeyboardModifiers state); - void commentSelectedText (); - void uncommentSelectedText (); - void removeBookmark (); - void toggleBookmark (); - void nextBookmark (); - void previousBookmark (); + void new_title(bool modified); + void handle_copy_available(bool enableCopy); + void handle_margin_clicked (int line, int margin, Qt::KeyboardModifiers state); + void comment_selected_text (); + void uncomment_selected_text (); + void remove_bookmark (); + void toggle_bookmark (); + void next_bookmark (); + void previous_bookmark (); void cut (); void copy (); void paste (); void undo (); void redo (); - void setModified (bool modified = true); + void set_modified (bool modified = true); - bool openFile(); - void loadFile (QString fileName); - void newFile (); - bool saveFile (); - bool saveFile(QString saveFileName); - bool saveFileAs(); - void runFile (); + bool open_file (); + void load_file (QString fileName); + void new_file (); + bool save_file (); + bool save_file(QString saveFileName); + bool save_file_as(); + void run_file (); - void fileHasChanged (QString fileName); + void file_has_changed (QString fileName); signals: - void fileNameChanged (QString fileName); - void editorStateChanged (); - void closeRequest (); + void file_name_changed (QString fileName); + void editor_state_changed (); + void close_request (); protected: void closeEvent (QCloseEvent *event); - void setFileName (QString fileName); + void set_file_name (QString fileName); private: - void updateTrackedFile (); - int checkFileModified (QString msg, int cancelButton); - void doCommentSelectedText (bool comment); + void update_tracked_file (); + int check_file_modified (QString msg, int cancelButton); + void do_comment_selected_text (bool comment); - FileEditor *m_fileEditor; - QsciScintilla *m_editArea; + file_editor * _file_editor; + QsciScintilla * _edit_area; - QString m_fileName; - QString m_fileNameShort; + QString _file_name; + QString _file_name_short; - bool m_longTitle; - bool m_copyAvailable; + bool _long_title; + bool _copy_available; - QFileSystemWatcher m_fileSystemWatcher; + QFileSystemWatcher _file_system_watcher; }; #endif // FILEEDITORTAB_H
--- a/gui/src/m-editor/file-editor.cc +++ b/gui/src/m-editor/file-editor.cc @@ -25,8 +25,8 @@ #include <QStyle> #include <QTextStream> -FileEditor::FileEditor (QTerminal *terminal, MainWindow *mainWindow) - : FileEditorInterface(terminal, mainWindow) +file_editor::file_editor (QTerminal *terminal, main_window *mainWindow) + : file_editor_interface(terminal, mainWindow) { construct (); @@ -35,47 +35,47 @@ setVisible (false); } -FileEditor::~FileEditor () +file_editor::~file_editor () { } -LexerOctaveGui * -FileEditor::lexer () +lexer_octave_gui * +file_editor::lexer () { return m_lexer; } QTerminal * -FileEditor::terminal () +file_editor::terminal () { return m_terminal; } -MainWindow * -FileEditor::mainWindow () +main_window * +file_editor::mainWindow () { return m_mainWindow; } void -FileEditor::requestNewFile () +file_editor::request_new_file () { - FileEditorTab *fileEditorTab = new FileEditorTab (this); + file_editor_tab *fileEditorTab = new file_editor_tab (this); if (fileEditorTab) { addFileEditorTab (fileEditorTab); - fileEditorTab->newFile (); + fileEditorTab->new_file (); } } void -FileEditor::requestOpenFile () +file_editor::request_open_file () { - FileEditorTab *fileEditorTab = new FileEditorTab (this); + file_editor_tab *fileEditorTab = new file_editor_tab (this); if (fileEditorTab) { addFileEditorTab (fileEditorTab); - if (!fileEditorTab->openFile ()) + if (!fileEditorTab->open_file ()) { // If no file was loaded, remove the tab again. m_tabWidget->removeTab (m_tabWidget->indexOf (fileEditorTab)); @@ -84,138 +84,138 @@ } void -FileEditor::requestOpenFile (QString fileName) +file_editor::request_open_file (QString fileName) { if (!isVisible ()) { show (); } - FileEditorTab *fileEditorTab = new FileEditorTab (this); + file_editor_tab *fileEditorTab = new file_editor_tab (this); if (fileEditorTab) { addFileEditorTab (fileEditorTab); - fileEditorTab->loadFile (fileName); + fileEditorTab->load_file (fileName); } } void -FileEditor::requestUndo () +file_editor::requestUndo () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) activeFileEditorTab->undo (); } void -FileEditor::requestRedo () +file_editor::requestRedo () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) activeFileEditorTab->redo (); } void -FileEditor::requestCopy () +file_editor::requestCopy () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) activeFileEditorTab->copy (); } void -FileEditor::requestCut () +file_editor::requestCut () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) activeFileEditorTab->cut (); } void -FileEditor::requestPaste () +file_editor::requestPaste () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) activeFileEditorTab->paste (); } void -FileEditor::requestSaveFile () +file_editor::requestSaveFile () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) - activeFileEditorTab->saveFile (); + activeFileEditorTab->save_file (); } void -FileEditor::requestSaveFileAs () +file_editor::requestSaveFileAs () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) - activeFileEditorTab->saveFileAs (); + activeFileEditorTab->save_file_as (); } void -FileEditor::requestRunFile () +file_editor::requestRunFile () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) - activeFileEditorTab->runFile (); + activeFileEditorTab->run_file (); } void -FileEditor::requestToggleBookmark () +file_editor::requestToggleBookmark () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) - activeFileEditorTab->toggleBookmark (); + activeFileEditorTab->toggle_bookmark (); } void -FileEditor::requestNextBookmark () +file_editor::requestNextBookmark () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) - activeFileEditorTab->nextBookmark (); + activeFileEditorTab->next_bookmark (); } void -FileEditor::requestPreviousBookmark () +file_editor::requestPreviousBookmark () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) - activeFileEditorTab->previousBookmark (); + activeFileEditorTab->previous_bookmark (); } void -FileEditor::requestRemoveBookmark () +file_editor::requestRemoveBookmark () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) - activeFileEditorTab->removeBookmark (); + activeFileEditorTab->remove_bookmark (); } void -FileEditor::requestCommentSelectedText () +file_editor::requestCommentSelectedText () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) - activeFileEditorTab->commentSelectedText (); + activeFileEditorTab->comment_selected_text (); } void -FileEditor::requestUncommentSelectedText () +file_editor::requestUncommentSelectedText () { - FileEditorTab *activeFileEditorTab = activeEditorTab (); + file_editor_tab *activeFileEditorTab = activeEditorTab (); if (activeFileEditorTab) - activeFileEditorTab->uncommentSelectedText (); + activeFileEditorTab->uncomment_selected_text (); } void -FileEditor::handleFileNameChanged (QString fileName) +file_editor::handleFileNameChanged (QString fileName) { QObject *senderObject = sender (); - FileEditorTab *fileEditorTab = dynamic_cast<FileEditorTab*> (senderObject); + file_editor_tab *fileEditorTab = dynamic_cast<file_editor_tab*> (senderObject); if (fileEditorTab) { for(int i = 0; i < m_tabWidget->count (); i++) @@ -229,9 +229,9 @@ } void -FileEditor::handleTabCloseRequest (int index) +file_editor::handleTabCloseRequest (int index) { - FileEditorTab *fileEditorTab = dynamic_cast <FileEditorTab*> (m_tabWidget->widget (index)); + file_editor_tab *fileEditorTab = dynamic_cast <file_editor_tab*> (m_tabWidget->widget (index)); if (fileEditorTab) if (fileEditorTab->close ()) { @@ -241,9 +241,9 @@ } void -FileEditor::handleTabCloseRequest () +file_editor::handleTabCloseRequest () { - FileEditorTab *fileEditorTab = dynamic_cast <FileEditorTab*> (sender ()); + file_editor_tab *fileEditorTab = dynamic_cast <file_editor_tab*> (sender ()); if (fileEditorTab) if (fileEditorTab->close ()) { @@ -253,16 +253,16 @@ } void -FileEditor::activeTabChanged (int index) +file_editor::activeTabChanged (int index) { Q_UNUSED (index); handleEditorStateChanged (); } void -FileEditor::handleEditorStateChanged () +file_editor::handleEditorStateChanged () { - FileEditorTab *fileEditorTab = activeEditorTab (); + file_editor_tab *fileEditorTab = activeEditorTab (); if (fileEditorTab) { bool copyAvailable = fileEditorTab->copyAvailable (); @@ -272,10 +272,10 @@ } void -FileEditor::construct () +file_editor::construct () { QWidget *widget = new QWidget (this); - QSettings *settings = ResourceManager::instance ()->settings (); + QSettings *settings = resource_manager::instance ()->settings (); QStyle *style = QApplication::style (); m_menuBar = new QMenuBar (widget); @@ -396,8 +396,8 @@ widget->setLayout (layout); setWidget (widget); - connect (newAction, SIGNAL (triggered ()), this, SLOT (requestNewFile ())); - connect (openAction, SIGNAL (triggered ()), this, SLOT (requestOpenFile ())); + connect (newAction, SIGNAL (triggered ()), this, SLOT (request_new_file ())); + connect (openAction, SIGNAL (triggered ()), this, SLOT (request_open_file ())); connect (undoAction, SIGNAL (triggered ()), this, SLOT (requestUndo ())); connect (redoAction, SIGNAL (triggered ()), this, SLOT (requestRedo ())); connect (m_copyAction, SIGNAL (triggered ()), this, SLOT (requestCopy ())); @@ -416,7 +416,7 @@ connect (m_tabWidget, SIGNAL (currentChanged(int)), this, SLOT (activeTabChanged (int))); // this has to be done only once, not for each editor - m_lexer = new LexerOctaveGui (); + m_lexer = new lexer_octave_gui (); // Editor font (default or from settings) m_lexer->setDefaultFont (QFont ( @@ -451,7 +451,7 @@ } void -FileEditor::addFileEditorTab (FileEditorTab *fileEditorTab) +file_editor::addFileEditorTab (file_editor_tab *fileEditorTab) { m_tabWidget->addTab (fileEditorTab, ""); connect (fileEditorTab, SIGNAL (fileNameChanged(QString)), @@ -463,8 +463,8 @@ m_tabWidget->setCurrentWidget (fileEditorTab); } -FileEditorTab * -FileEditor::activeEditorTab () +file_editor_tab * +file_editor::activeEditorTab () { - return dynamic_cast<FileEditorTab*> (m_tabWidget->currentWidget ()); + return dynamic_cast<file_editor_tab*> (m_tabWidget->currentWidget ()); }
--- a/gui/src/m-editor/file-editor.h +++ b/gui/src/m-editor/file-editor.h @@ -41,22 +41,22 @@ MARKER_BREAKPOINT }; -class FileEditor : public FileEditorInterface +class file_editor : public file_editor_interface { Q_OBJECT public: - FileEditor (QTerminal *terminal, MainWindow *mainWindow); - ~FileEditor (); + file_editor (QTerminal *terminal, main_window *mainWindow); + ~file_editor (); void loadFile (QString fileName); - LexerOctaveGui *lexer (); + lexer_octave_gui *lexer (); QTerminal *terminal (); - MainWindow *mainWindow (); + main_window *mainWindow (); public slots: - void requestNewFile (); - void requestOpenFile (); - void requestOpenFile (QString fileName); + void request_new_file (); + void request_open_file (); + void request_open_file (QString fileName); void requestUndo (); void requestRedo (); @@ -81,8 +81,8 @@ private: void construct (); - void addFileEditorTab(FileEditorTab *fileEditorTab); - FileEditorTab *activeEditorTab(); + void addFileEditorTab(file_editor_tab *fileEditorTab); + file_editor_tab *activeEditorTab(); QMenuBar *m_menuBar; QToolBar *m_toolBar; @@ -91,7 +91,7 @@ QTabWidget *m_tabWidget; int m_markerBookmark; - LexerOctaveGui *m_lexer; + lexer_octave_gui *m_lexer; QsciAPIs *m_lexerAPI; };
--- a/gui/src/m-editor/lexer-octave-gui.cc +++ b/gui/src/m-editor/lexer-octave-gui.cc @@ -22,21 +22,21 @@ // ----------------------------------------------------- // Some basic functions // ----------------------------------------------------- -LexerOctaveGui::LexerOctaveGui(QObject *parent) +lexer_octave_gui::lexer_octave_gui(QObject *parent) : QsciLexer(parent) // inherit from base lexer { } -LexerOctaveGui::~LexerOctaveGui() +lexer_octave_gui::~lexer_octave_gui() { } -const char *LexerOctaveGui::language() const +const char *lexer_octave_gui::language() const { return "Octave"; // return the name of the language } -const char *LexerOctaveGui::lexer() const +const char *lexer_octave_gui::lexer() const { return "octave"; // return the name of the lexer } @@ -44,7 +44,7 @@ // ----------------------------------------------------- // The colors for syntax highlighting // ----------------------------------------------------- -QColor LexerOctaveGui::defaultColor(int style) const +QColor lexer_octave_gui::defaultColor(int style) const { switch (style) { @@ -72,7 +72,7 @@ // ----------------------------------------------------- // The font decorations for highlighting // ----------------------------------------------------- -QFont LexerOctaveGui::defaultFont(int style) const +QFont lexer_octave_gui::defaultFont(int style) const { QFont f; @@ -99,7 +99,7 @@ // ----------------------------------------------------- // Style names // ----------------------------------------------------- -QString LexerOctaveGui::description(int style) const +QString lexer_octave_gui::description(int style) const { switch (style) { @@ -130,11 +130,11 @@ // The set of keywords for highlighting // TODO: How to define a second set? // ----------------------------------------------------- -const char *LexerOctaveGui::keywords(int set) const +const char *lexer_octave_gui::keywords(int set) const { if (set == 1) { - return ResourceManager::instance ()->octaveKeywords (); + return resource_manager::instance ()->octaveKeywords (); } return 0; }
--- a/gui/src/m-editor/lexer-octave-gui.h +++ b/gui/src/m-editor/lexer-octave-gui.h @@ -24,7 +24,7 @@ #include <Qsci/qscilexer.h> -class LexerOctaveGui : public QsciLexer +class lexer_octave_gui : public QsciLexer { Q_OBJECT @@ -43,8 +43,8 @@ DoubleQuotedString = 8 }; - LexerOctaveGui(QObject *parent = 0); - virtual ~LexerOctaveGui(); + lexer_octave_gui(QObject *parent = 0); + virtual ~lexer_octave_gui(); const char *language() const; const char *lexer() const; QColor defaultColor(int style) const; @@ -53,8 +53,8 @@ QString description(int style) const; private: - LexerOctaveGui(const LexerOctaveGui &); - LexerOctaveGui &operator=(const LexerOctaveGui &); + lexer_octave_gui(const lexer_octave_gui &); + lexer_octave_gui &operator=(const lexer_octave_gui &); }; #endif
--- a/gui/src/main-window.cc +++ b/gui/src/main-window.cc @@ -30,51 +30,51 @@ #include "file-editor.h" #include "settings-dialog.h" -MainWindow::MainWindow (QWidget * parent):QMainWindow (parent) +main_window::main_window (QWidget * parent):QMainWindow (parent) { // We have to set up all our windows, before we finally launch octave. construct (); - OctaveLink::instance ()->launchOctave(); + octave_link::instance ()->launchOctave(); } -MainWindow::~MainWindow () +main_window::~main_window () { } void -MainWindow::newFile () +main_window::newFile () { - m_fileEditor->requestNewFile (); + m_fileEditor->request_new_file (); } void -MainWindow::openFile () +main_window::openFile () { - m_fileEditor->requestOpenFile (); + m_fileEditor->request_open_file (); } void -MainWindow::reportStatusMessage (QString statusMessage) +main_window::reportStatusMessage (QString statusMessage) { m_statusBar->showMessage (statusMessage, 1000); } void -MainWindow::handleSaveWorkspaceRequest () +main_window::handleSaveWorkspaceRequest () { QString selectedFile = QFileDialog::getSaveFileName (this, tr ("Save Workspace"), - ResourceManager::instance ()->homePath ()); + resource_manager::instance ()->homePath ()); m_terminal->sendText (QString ("save \'%1\'\n").arg (selectedFile)); m_terminal->setFocus (); } void -MainWindow::handleLoadWorkspaceRequest () +main_window::handleLoadWorkspaceRequest () { QString selectedFile = QFileDialog::getOpenFileName (this, tr ("Load Workspace"), - ResourceManager::instance ()->homePath ()); + resource_manager::instance ()->homePath ()); if (!selectedFile.isEmpty ()) { m_terminal->sendText (QString ("load \'%1\'\n").arg (selectedFile)); @@ -83,53 +83,53 @@ } void -MainWindow::handleClearWorkspaceRequest () +main_window::handleClearWorkspaceRequest () { m_terminal->sendText ("clear\n"); m_terminal->setFocus (); } void -MainWindow::handleCommandDoubleClicked (QString command) +main_window::handleCommandDoubleClicked (QString command) { m_terminal->sendText(command); m_terminal->setFocus (); } void -MainWindow::openBugTrackerPage () +main_window::openBugTrackerPage () { QDesktopServices::openUrl (QUrl ("http://savannah.gnu.org/bugs/?group=octave")); } void -MainWindow::openAgoraPage () +main_window::openAgoraPage () { QDesktopServices::openUrl (QUrl ("http://agora.panocha.org.mx/")); } void -MainWindow::openOctaveForgePage () +main_window::openOctaveForgePage () { QDesktopServices::openUrl (QUrl ("http://octave.sourceforge.net/")); } void -MainWindow::processSettingsDialogRequest () +main_window::processSettingsDialogRequest () { - SettingsDialog *settingsDialog = new SettingsDialog (this); + settings_dialog *settingsDialog = new settings_dialog (this); settingsDialog->exec (); delete settingsDialog; emit settingsChanged (); - ResourceManager::instance ()->updateNetworkSettings (); + resource_manager::instance ()->updateNetworkSettings (); noticeSettings(); } void -MainWindow::noticeSettings () +main_window::noticeSettings () { // Set terminal font: - QSettings *settings = ResourceManager::instance ()->settings (); + QSettings *settings = resource_manager::instance ()->settings (); QFont font = QFont(); font.setFamily(settings->value("terminal/fontName").toString()); font.setPointSize(settings->value("terminal/fontSize").toInt ()); @@ -137,19 +137,19 @@ } void -MainWindow::prepareForQuit () +main_window::prepareForQuit () { writeSettings (); } void -MainWindow::resetWindows () +main_window::resetWindows () { // TODO: Implement. } void -MainWindow::updateCurrentWorkingDirectory (QString directory) +main_window::updateCurrentWorkingDirectory (QString directory) { if (m_currentDirectoryComboBox->count () > 31) { @@ -161,7 +161,7 @@ } void -MainWindow::changeCurrentWorkingDirectory () +main_window::changeCurrentWorkingDirectory () { QString selectedDirectory = QFileDialog::getExistingDirectory(this, tr ("Set working direcotry")); @@ -174,21 +174,21 @@ } void -MainWindow::changeCurrentWorkingDirectory (QString directory) +main_window::changeCurrentWorkingDirectory (QString directory) { m_terminal->sendText (QString ("cd \'%1\'\n").arg (directory)); m_terminal->setFocus (); } void -MainWindow::currentWorkingDirectoryUp () +main_window::currentWorkingDirectoryUp () { m_terminal->sendText ("cd ..\n"); m_terminal->setFocus (); } void -MainWindow::showAboutOctave () +main_window::showAboutOctave () { QString message = "GNU Octave\n" @@ -213,47 +213,47 @@ } void -MainWindow::closeEvent (QCloseEvent * closeEvent) +main_window::closeEvent (QCloseEvent * closeEvent) { reportStatusMessage (tr ("Saving data and shutting down.")); m_closing = true; // inform editor window that whole application is closed - OctaveLink::instance ()->terminateOctave (); + octave_link::instance ()->terminateOctave (); QMainWindow::closeEvent (closeEvent); } void -MainWindow::readSettings () +main_window::readSettings () { - QSettings *settings = ResourceManager::instance ()->settings (); + QSettings *settings = resource_manager::instance ()->settings (); restoreGeometry (settings->value ("MainWindow/geometry").toByteArray ()); restoreState (settings->value ("MainWindow/windowState").toByteArray ()); emit settingsChanged (); } void -MainWindow::writeSettings () +main_window::writeSettings () { - QSettings *settings = ResourceManager::instance ()->settings (); + QSettings *settings = resource_manager::instance ()->settings (); settings->setValue ("MainWindow/geometry", saveGeometry ()); settings->setValue ("MainWindow/windowState", saveState ()); settings->sync (); } void -MainWindow::construct () +main_window::construct () { QStyle *style = QApplication::style (); // TODO: Check this. m_closing = false; // flag for editor files when closed - setWindowIcon (ResourceManager::instance ()->icon (ResourceManager::Octave)); + setWindowIcon (resource_manager::instance ()->icon (resource_manager::Octave)); // Setup dockable widgets and the status bar. - m_workspaceView = new WorkspaceView (this); + m_workspaceView = new workspace_view (this); m_workspaceView->setStatusTip (tr ("View the variables in the active workspace.")); - m_historyDockWidget = new HistoryDockWidget (this); + m_historyDockWidget = new history_dock_widget (this); m_historyDockWidget->setStatusTip (tr ("Browse and search the command history.")); - m_filesDockWidget = new FilesDockWidget (this); + m_filesDockWidget = new files_dock_widget (this); m_filesDockWidget->setStatusTip (tr ("Browse your files.")); m_statusBar = new QStatusBar (this); @@ -272,7 +272,7 @@ // Octave Terminal subwindow. m_terminal = new QTerminal (this); m_terminal->setObjectName ("OctaveTerminal"); - m_terminalDockWidget = new TerminalDockWidget (m_terminal, this); + m_terminalDockWidget = new terminal_dock_widget (m_terminal, this); QWidget *dummyWidget = new QWidget (); dummyWidget->setObjectName ("CentralDummyWidget"); @@ -281,7 +281,7 @@ dummyWidget->hide (); setCentralWidget (dummyWidget); - m_fileEditor = new FileEditor (m_terminal, this); + m_fileEditor = new file_editor (m_terminal, this); QMenu *fileMenu = menuBar ()->addMenu (tr ("&File")); QAction *newFileAction @@ -411,7 +411,7 @@ connect (copyAction, SIGNAL (triggered()), m_terminal, SLOT(copyClipboard ())); connect (pasteAction, SIGNAL (triggered()), m_terminal, SLOT(pasteClipboard ())); - connect (OctaveLink::instance (), SIGNAL (workingDirectoryChanged (QString)), + connect (octave_link::instance (), SIGNAL (workingDirectoryChanged (QString)), this, SLOT (updateCurrentWorkingDirectory (QString))); connect (m_currentDirectoryComboBox, SIGNAL (activated (QString)), this, SLOT (changeCurrentWorkingDirectory (QString)));
--- a/gui/src/main-window.h +++ b/gui/src/main-window.h @@ -50,22 +50,22 @@ * * Represents the main window. */ -class MainWindow:public QMainWindow +class main_window:public QMainWindow { Q_OBJECT public: - MainWindow (QWidget * parent = 0); - ~MainWindow (); + main_window (QWidget * parent = 0); + ~main_window (); QTerminal *terminalView () { return m_terminal; } - HistoryDockWidget *historyDockWidget () + history_dock_widget *historyDockWidget () { return m_historyDockWidget; } - FilesDockWidget *filesDockWidget () + files_dock_widget *filesDockWidget () { return m_filesDockWidget; } @@ -108,13 +108,13 @@ void establishOctaveLink (); QTerminal *m_terminal; - FileEditorInterface *m_fileEditor; + file_editor_interface *m_fileEditor; // Dock widgets. - WorkspaceView *m_workspaceView; - HistoryDockWidget *m_historyDockWidget; - FilesDockWidget *m_filesDockWidget; - TerminalDockWidget *m_terminalDockWidget; + workspace_view *m_workspaceView; + history_dock_widget *m_historyDockWidget; + files_dock_widget *m_filesDockWidget; + terminal_dock_widget *m_terminalDockWidget; // Toolbars. QStatusBar *m_statusBar;
--- a/gui/src/octave-adapter/octave-link.cc +++ b/gui/src/octave-adapter/octave-link.cc @@ -23,24 +23,24 @@ int octave_readline_hook () { - OctaveLink::instance ()->triggerUpdateHistoryModel (); - OctaveLink::instance ()->buildSymbolInformation (); - OctaveLink::instance ()->updateCurrentWorkingDirectory (); + octave_link::instance ()->triggerUpdateHistoryModel (); + octave_link::instance ()->buildSymbolInformation (); + octave_link::instance ()->updateCurrentWorkingDirectory (); return 0; } void octave_exit_hook (int status) { Q_UNUSED (status); - OctaveLink::instance ()->terminateOctave (); + octave_link::instance ()->terminateOctave (); } -OctaveLink OctaveLink::m_singleton; +octave_link octave_link::m_singleton; -OctaveLink::OctaveLink ():QObject () +octave_link::octave_link ():QObject () { m_historyModel = new QStringListModel (this); - m_workspaceModel = new WorkspaceModel (this); + m_workspaceModel = new workspace_model (this); m_workspaceModel->insertTopLevelItem(0, new TreeItem ("Local")); m_workspaceModel->insertTopLevelItem(1, new TreeItem ("Global")); @@ -56,15 +56,15 @@ _currentWorkingDirectory = ""; } -OctaveLink::~OctaveLink () +octave_link::~octave_link () { } void -OctaveLink::launchOctave () +octave_link::launchOctave () { // Create both threads. - m_octaveMainThread = new OctaveMainThread (this); + m_octaveMainThread = new octave_main_thread (this); command_editor::add_event_hook (octave_readline_hook); octave_exit = octave_exit_hook; @@ -74,13 +74,13 @@ } void -OctaveLink::terminateOctave () +octave_link::terminateOctave () { qApp->quit (); } void -OctaveLink::triggerUpdateHistoryModel () +octave_link::triggerUpdateHistoryModel () { // Determine the client's (our) history length and the one of the server. int clientHistoryLength = m_historyModel->rowCount (); @@ -98,7 +98,7 @@ } void -OctaveLink::updateCurrentWorkingDirectory () +octave_link::updateCurrentWorkingDirectory () { QString _queriedWorkingDirectory = octave_env::get_current_directory ().c_str(); if (_currentWorkingDirectory != _queriedWorkingDirectory) @@ -110,19 +110,19 @@ } void -OctaveLink::acquireSymbolInformation () +octave_link::acquireSymbolInformation () { _symbolInformationSemaphore->acquire (1); } void -OctaveLink::releaseSymbolInformation () +octave_link::releaseSymbolInformation () { _symbolInformationSemaphore->release (1); } void -OctaveLink::buildSymbolInformation () +octave_link::buildSymbolInformation () { std::list < symbol_table::symbol_record > symbolTable = symbol_table::all_variables (); @@ -139,19 +139,19 @@ } const QList <SymbolInformation>& -OctaveLink::symbolInformation () const +octave_link::symbolInformation () const { return _symbolInformation; } QStringListModel * -OctaveLink::historyModel () +octave_link::historyModel () { return m_historyModel; } -WorkspaceModel * -OctaveLink::workspaceModel () +workspace_model * +octave_link::workspaceModel () { return m_workspaceModel; }
--- a/gui/src/octave-adapter/octave-link.h +++ b/gui/src/octave-adapter/octave-link.h @@ -81,11 +81,11 @@ * \class OctaveLink * Manages a link to an octave instance. */ -class OctaveLink:public QObject +class octave_link:public QObject { Q_OBJECT public: - static OctaveLink * + static octave_link * instance () { return &m_singleton; @@ -94,7 +94,7 @@ void launchOctave (); void terminateOctave (); QStringListModel *historyModel (); - WorkspaceModel *workspaceModel (); + workspace_model *workspaceModel (); void triggerUpdateHistoryModel (); void updateCurrentWorkingDirectory (); @@ -108,20 +108,20 @@ void workingDirectoryChanged (QString directory); private: - OctaveLink (); - ~OctaveLink (); + octave_link (); + ~octave_link (); QStringListModel *m_historyModel; - WorkspaceModel *m_workspaceModel; + workspace_model *m_workspaceModel; // Threads for running octave and managing the data interaction. - OctaveMainThread *m_octaveMainThread; + octave_main_thread *m_octaveMainThread; QTimer _updateWorkspaceModelTimer; QSemaphore *_symbolInformationSemaphore; QList <SymbolInformation> _symbolInformation; QString _currentWorkingDirectory; - static OctaveLink m_singleton; + static octave_link m_singleton; }; #endif // OCTAVELINK_H
--- a/gui/src/octave-adapter/octave-main-thread.cc +++ b/gui/src/octave-adapter/octave-main-thread.cc @@ -18,12 +18,12 @@ #include "octave-main-thread.h" #include "octave-link.h" -OctaveMainThread::OctaveMainThread (QObject * parent):QThread (parent) +octave_main_thread::octave_main_thread (QObject * parent):QThread (parent) { } void -OctaveMainThread::run () +octave_main_thread::run () { setlocale(LC_ALL, "en_US.UTF-8"); int argc = 1;
--- a/gui/src/octave-adapter/octave-main-thread.h +++ b/gui/src/octave-adapter/octave-main-thread.h @@ -19,11 +19,11 @@ #define OCTAVEMAINTHREAD_H #include <QThread> -class OctaveMainThread:public QThread +class octave_main_thread:public QThread { Q_OBJECT public: - OctaveMainThread (QObject * parent); + octave_main_thread (QObject * parent); signals: void ready();
--- a/gui/src/octave-gui.cc +++ b/gui/src/octave-gui.cc @@ -28,12 +28,12 @@ QApplication application (argc, argv); while (true) { - if (ResourceManager::instance ()->isFirstRun ()) + if (resource_manager::instance ()->isFirstRun ()) { - WelcomeWizard welcomeWizard; + welcome_wizard welcomeWizard; int returnCode = welcomeWizard.exec (); - QSettings *settings = ResourceManager::instance ()->settings (); + QSettings *settings = resource_manager::instance ()->settings (); settings->setValue ("connectOnStartup", true); settings->setValue ("showMessageOfTheDay", true); settings->setValue ("showTopic", true); @@ -60,7 +60,7 @@ settings->setValue ("proxyUserName", ""); settings->setValue ("proxyPassword", ""); settings->sync (); - ResourceManager::instance ()->reloadSettings (); + resource_manager::instance ()->reloadSettings (); application.quit (); // We are in an infinite loop, so everything else than a return @@ -70,18 +70,18 @@ } else { - QSettings *settings = ResourceManager::instance ()->settings (); + QSettings *settings = resource_manager::instance ()->settings (); QString language = settings->value ("language").toString (); - QString translatorFile = ResourceManager::instance ()->findTranslatorFile (language); + QString translatorFile = resource_manager::instance ()->findTranslatorFile (language); QTranslator translator; translator.load (translatorFile); application.installTranslator (&translator); - ResourceManager::instance ()->updateNetworkSettings (); - ResourceManager::instance ()->loadIcons (); + resource_manager::instance ()->updateNetworkSettings (); + resource_manager::instance ()->loadIcons (); - MainWindow w; + main_window w; w.show (); //w.activateWindow(); return application.exec ();
--- a/gui/src/resource-manager.cc +++ b/gui/src/resource-manager.cc @@ -19,33 +19,33 @@ #include <QFile> #include <QNetworkProxy> -ResourceManager ResourceManager::m_singleton; +resource_manager resource_manager::m_singleton; -ResourceManager::ResourceManager () +resource_manager::resource_manager () { m_settings = 0; reloadSettings (); } -ResourceManager::~ResourceManager () +resource_manager::~resource_manager () { delete m_settings; } QSettings * -ResourceManager::settings () +resource_manager::settings () { return m_settings; } QString -ResourceManager::homePath () +resource_manager::homePath () { return m_homePath; } void -ResourceManager::reloadSettings () +resource_manager::reloadSettings () { QDesktopServices desktopServices; m_homePath = desktopServices.storageLocation (QDesktopServices::HomeLocation); @@ -53,7 +53,7 @@ } void -ResourceManager::setSettings (QString file) +resource_manager::setSettings (QString file) { delete m_settings; @@ -68,14 +68,14 @@ } QString -ResourceManager::findTranslatorFile (QString language) +resource_manager::findTranslatorFile (QString language) { // TODO: Quick hack to be able to test language files. return QString("../languages/%1.qm").arg(language); } QIcon -ResourceManager::icon (Icon icon) +resource_manager::icon (Icon icon) { if (m_icons.contains (icon)) { @@ -85,13 +85,13 @@ } bool -ResourceManager::isFirstRun () +resource_manager::isFirstRun () { return m_firstRun; } void -ResourceManager::updateNetworkSettings () +resource_manager::updateNetworkSettings () { QNetworkProxy::ProxyType proxyType = QNetworkProxy::NoProxy; if (m_settings->value ("useProxyServer").toBool ()) @@ -117,17 +117,17 @@ } void -ResourceManager::loadIcons () +resource_manager::loadIcons () { - m_icons [ResourceManager::Octave] = QIcon ("../media/logo.png"); - m_icons [ResourceManager::Terminal] = QIcon ("../media/terminal.png"); - m_icons [ResourceManager::Documentation] = QIcon ("../media/help_index.png"); - m_icons [ResourceManager::Chat] = QIcon ("../media/chat.png"); - m_icons [ResourceManager::ChatNewMessage] = QIcon ("../media/jabber_protocol.png"); + m_icons [resource_manager::Octave] = QIcon ("../media/logo.png"); + m_icons [resource_manager::Terminal] = QIcon ("../media/terminal.png"); + m_icons [resource_manager::Documentation] = QIcon ("../media/help_index.png"); + m_icons [resource_manager::Chat] = QIcon ("../media/chat.png"); + m_icons [resource_manager::ChatNewMessage] = QIcon ("../media/jabber_protocol.png"); } const char* -ResourceManager::octaveKeywords () +resource_manager::octaveKeywords () { return ".nargin. "
--- a/gui/src/resource-manager.h +++ b/gui/src/resource-manager.h @@ -23,7 +23,7 @@ #include <QMap> #include <QIcon> -class ResourceManager +class resource_manager { public: enum Icon @@ -35,9 +35,9 @@ ChatNewMessage }; - ~ResourceManager (); + ~resource_manager (); - static ResourceManager * + static resource_manager * instance () { return &m_singleton; @@ -55,12 +55,12 @@ const char *octaveKeywords (); private: - ResourceManager (); + resource_manager (); QSettings *m_settings; QString m_homePath; QMap <Icon, QIcon> m_icons; - static ResourceManager m_singleton; + static resource_manager m_singleton; bool m_firstRun; };
--- a/gui/src/settings-dialog.cc +++ b/gui/src/settings-dialog.cc @@ -20,12 +20,12 @@ #include "ui_settings-dialog.h" #include <QSettings> -SettingsDialog::SettingsDialog (QWidget * parent): -QDialog (parent), ui (new Ui::SettingsDialog) +settings_dialog::settings_dialog (QWidget * parent): +QDialog (parent), ui (new user_interface::settings_dialog) { ui->setupUi (this); - QSettings *settings = ResourceManager::instance ()->settings (); + QSettings *settings = resource_manager::instance ()->settings (); ui->useCustomFileEditor->setChecked (settings->value ("useCustomFileEditor").toBool ()); ui->customFileEditor->setText (settings->value ("customFileEditor").toString ()); ui->editor_showLineNumbers->setChecked (settings->value ("editor/showLineNumbers",true).toBool () ); @@ -58,9 +58,9 @@ ui->proxyPassword->setText (settings->value ("proxyPassword").toString ()); } -SettingsDialog::~SettingsDialog () +settings_dialog::~settings_dialog () { - QSettings *settings = ResourceManager::instance ()->settings (); + QSettings *settings = resource_manager::instance ()->settings (); settings->setValue ("useCustomFileEditor", ui->useCustomFileEditor->isChecked ()); settings->setValue ("customFileEditor", ui->customFileEditor->text ()); settings->setValue ("editor/showLineNumbers", ui->editor_showLineNumbers->isChecked ());
--- a/gui/src/settings-dialog.h +++ b/gui/src/settings-dialog.h @@ -21,19 +21,19 @@ #include <QDialog> -namespace Ui +namespace user_interface { - class SettingsDialog; + class settings_dialog; } -class SettingsDialog:public QDialog +class settings_dialog:public QDialog { Q_OBJECT public: - explicit SettingsDialog (QWidget * parent); - ~SettingsDialog (); + explicit settings_dialog (QWidget * parent); + ~settings_dialog (); private: - Ui::SettingsDialog * ui; + user_interface::settings_dialog * ui; }; #endif // SETTINGSDIALOG_H
--- a/gui/src/settings-dialog.ui +++ b/gui/src/settings-dialog.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>SettingsDialog</class> - <widget class="QDialog" name="SettingsDialog"> + <class>settings_dialog</class> + <widget class="QDialog" name="settings_dialog"> <property name="windowModality"> <enum>Qt::ApplicationModal</enum> </property>
--- a/gui/src/terminal-dockwidget.cc +++ b/gui/src/terminal-dockwidget.cc @@ -17,7 +17,7 @@ #include "terminal-dockwidget.h" -TerminalDockWidget::TerminalDockWidget (QTerminal *terminal, QWidget *parent) +terminal_dock_widget::terminal_dock_widget (QTerminal *terminal, QWidget *parent) : QDockWidget (parent) { setObjectName ("TerminalDockWidget");
--- a/gui/src/terminal-dockwidget.h +++ b/gui/src/terminal-dockwidget.h @@ -21,11 +21,11 @@ #include <QDockWidget> #include "QTerminal.h" -class TerminalDockWidget : public QDockWidget +class terminal_dock_widget : public QDockWidget { Q_OBJECT public: - TerminalDockWidget (QTerminal *terminal, QWidget *parent = 0); + terminal_dock_widget (QTerminal *terminal, QWidget *parent = 0); signals: void activeChanged (bool active);
--- a/gui/src/welcome-wizard.cc +++ b/gui/src/welcome-wizard.cc @@ -18,9 +18,9 @@ #include "welcome-wizard.h" #include "ui_welcome-wizard.h" -WelcomeWizard::WelcomeWizard (QWidget *parent) : +welcome_wizard::welcome_wizard (QWidget *parent) : QDialog (parent), - ui (new Ui::WelcomeWizard) + ui (new user_interface::welcome_wizard) { ui->setupUi (this); connect (ui->nextButton1, SIGNAL (clicked ()), this, SLOT (next ())); @@ -34,19 +34,19 @@ connect (ui->previousButton5, SIGNAL (clicked ()), this, SLOT (previous ())); } -WelcomeWizard::~WelcomeWizard() +welcome_wizard::~welcome_wizard() { delete ui; } void -WelcomeWizard::next () +welcome_wizard::next () { ui->stackedWidget->setCurrentIndex (ui->stackedWidget->currentIndex () + 1); } void -WelcomeWizard::previous () +welcome_wizard::previous () { ui->stackedWidget->setCurrentIndex (ui->stackedWidget->currentIndex () - 1); }
--- a/gui/src/welcome-wizard.h +++ b/gui/src/welcome-wizard.h @@ -20,24 +20,24 @@ #include <QDialog> -namespace Ui { -class WelcomeWizard; +namespace user_interface { + class welcome_wizard; } -class WelcomeWizard : public QDialog +class welcome_wizard : public QDialog { Q_OBJECT public: - explicit WelcomeWizard(QWidget *parent = 0); - ~WelcomeWizard(); + explicit welcome_wizard(QWidget *parent = 0); + ~welcome_wizard(); public slots: void next (); void previous (); private: - Ui::WelcomeWizard *ui; + user_interface::welcome_wizard *ui; }; #endif // WELCOMEWIZARD_H
--- a/gui/src/welcome-wizard.ui +++ b/gui/src/welcome-wizard.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>WelcomeWizard</class> - <widget class="QDialog" name="WelcomeWizard"> + <class>welcome_wizard</class> + <widget class="QDialog" name="welcome_wizard"> <property name="geometry"> <rect> <x>0</x> @@ -337,7 +337,7 @@ <connection> <sender>finishButton</sender> <signal>clicked()</signal> - <receiver>WelcomeWizard</receiver> + <receiver>welcome_wizard</receiver> <slot>accept()</slot> <hints> <hint type="sourcelabel">
--- a/gui/src/workspace-model.cc +++ b/gui/src/workspace-model.cc @@ -20,7 +20,7 @@ #include <QTime> #include "octave-link.h" -WorkspaceModel::WorkspaceModel(QObject *parent) +workspace_model::workspace_model(QObject *parent) : QAbstractItemModel(parent) { QList<QVariant> rootData; @@ -28,13 +28,13 @@ _rootItem = new TreeItem(rootData); } -WorkspaceModel::~WorkspaceModel() +workspace_model::~workspace_model() { delete _rootItem; } QModelIndex -WorkspaceModel::index(int row, int column, const QModelIndex &parent) const +workspace_model::index(int row, int column, const QModelIndex &parent) const { if (!hasIndex(row, column, parent)) return QModelIndex(); @@ -54,7 +54,7 @@ } QModelIndex -WorkspaceModel::parent(const QModelIndex &index) const +workspace_model::parent(const QModelIndex &index) const { if (!index.isValid()) return QModelIndex(); @@ -69,7 +69,7 @@ } int -WorkspaceModel::rowCount(const QModelIndex &parent) const +workspace_model::rowCount(const QModelIndex &parent) const { TreeItem *parentItem; if (parent.column() > 0) @@ -84,7 +84,7 @@ } int -WorkspaceModel::columnCount(const QModelIndex &parent) const +workspace_model::columnCount(const QModelIndex &parent) const { if (parent.isValid()) return static_cast<TreeItem*>(parent.internalPointer())->columnCount(); @@ -93,19 +93,19 @@ } void -WorkspaceModel::insertTopLevelItem(int at, TreeItem *treeItem) +workspace_model::insertTopLevelItem(int at, TreeItem *treeItem) { _rootItem->insertChildItem(at, treeItem); } TreeItem * -WorkspaceModel::topLevelItem (int at) +workspace_model::topLevelItem (int at) { return _rootItem->child(at); } Qt::ItemFlags -WorkspaceModel::flags(const QModelIndex &index) const +workspace_model::flags(const QModelIndex &index) const { if (!index.isValid()) return 0; @@ -114,7 +114,7 @@ } QVariant -WorkspaceModel::headerData(int section, Qt::Orientation orientation, int role) const +workspace_model::headerData(int section, Qt::Orientation orientation, int role) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) return _rootItem->data(section); @@ -123,7 +123,7 @@ } QVariant -WorkspaceModel::data(const QModelIndex &index, int role) const +workspace_model::data(const QModelIndex &index, int role) const { if (!index.isValid()) return QVariant(); @@ -138,15 +138,15 @@ void -WorkspaceModel::updateFromSymbolTable () +workspace_model::updateFromSymbolTable () { topLevelItem (0)->deleteChildItems (); topLevelItem (1)->deleteChildItems (); topLevelItem (2)->deleteChildItems (); topLevelItem (3)->deleteChildItems (); - OctaveLink::instance ()-> acquireSymbolInformation(); - const QList <SymbolInformation>& symbolInformation = OctaveLink::instance() ->symbolInformation (); + octave_link::instance ()-> acquireSymbolInformation(); + const QList <SymbolInformation>& symbolInformation = octave_link::instance() ->symbolInformation (); foreach (const SymbolInformation& s, symbolInformation) { @@ -165,7 +165,7 @@ } } - OctaveLink::instance ()-> releaseSymbolInformation(); + octave_link::instance ()-> releaseSymbolInformation(); reset(); emit expandRequest();
--- a/gui/src/workspace-model.h +++ b/gui/src/workspace-model.h @@ -102,13 +102,13 @@ TreeItem *_parentItem; }; -class WorkspaceModel : public QAbstractItemModel +class workspace_model : public QAbstractItemModel { Q_OBJECT public: - WorkspaceModel(QObject *parent = 0); - ~WorkspaceModel(); + workspace_model(QObject *parent = 0); + ~workspace_model(); QVariant data(const QModelIndex &index, int role) const; Qt::ItemFlags flags(const QModelIndex &index) const;
--- a/gui/src/workspace-view.cc +++ b/gui/src/workspace-view.cc @@ -20,7 +20,7 @@ #include <QVBoxLayout> #include <QPushButton> -WorkspaceView::WorkspaceView (QWidget * parent) : QDockWidget +workspace_view::workspace_view (QWidget * parent) : QDockWidget (parent) { setObjectName ("WorkspaceView"); @@ -30,7 +30,7 @@ m_workspaceTreeView->setHeaderHidden (false); m_workspaceTreeView->setAlternatingRowColors (true); m_workspaceTreeView->setAnimated (true); - m_workspaceTreeView->setModel(OctaveLink::instance()->workspaceModel()); + m_workspaceTreeView->setModel(octave_link::instance()->workspaceModel()); setWidget (new QWidget (this)); QVBoxLayout *layout = new QVBoxLayout (); @@ -41,19 +41,19 @@ connect (this, SIGNAL (visibilityChanged (bool)), this, SLOT(handleVisibilityChanged (bool))); - connect (OctaveLink::instance()->workspaceModel(), SIGNAL(expandRequest()), + connect (octave_link::instance()->workspaceModel(), SIGNAL(expandRequest()), m_workspaceTreeView, SLOT(expandAll())); } void -WorkspaceView::handleVisibilityChanged (bool visible) +workspace_view::handleVisibilityChanged (bool visible) { if (visible) emit activeChanged (true); } void -WorkspaceView::closeEvent (QCloseEvent *event) +workspace_view::closeEvent (QCloseEvent *event) { emit activeChanged (false); QDockWidget::closeEvent (event);
--- a/gui/src/workspace-view.h +++ b/gui/src/workspace-view.h @@ -23,11 +23,11 @@ #include <QSemaphore> #include "octave-link.h" -class WorkspaceView:public QDockWidget +class workspace_view:public QDockWidget { Q_OBJECT public: - WorkspaceView (QWidget * parent = 0); + workspace_view (QWidget * parent = 0); public slots: void handleVisibilityChanged (bool visible);