diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-06-30 22:30:22 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-06-30 22:30:22 (GMT) |
commit | 03ba01bd50e10da24cf54102528715c15d959526 (patch) | |
tree | f55178cd351f601733accf8b28e5ff2f1add4395 | |
parent | ed6224024ee603ae5cd7ba910691858549d38388 (diff) |
Clifford Wolf:
Added edit menu
git-svn-id: http://svn.clifford.at/openscad/trunk@41 b57f626f-c46c-0410-a088-ec61d464b74c
-rw-r--r-- | mainwin.cc | 47 | ||||
-rw-r--r-- | openscad.h | 6 |
2 files changed, 47 insertions, 6 deletions
@@ -48,6 +48,12 @@ MainWindow::MainWindow(const char *filename) root_N = NULL; #endif + s1 = new QSplitter(Qt::Horizontal, this); + editor = new QTextEdit(s1); + s2 = new QSplitter(Qt::Vertical, s1); + screen = new GLView(s2); + console = new QTextEdit(s2); + { QMenu *menu = menuBar()->addMenu("&File"); menu->addAction("&New", this, SLOT(actionNew())); @@ -59,6 +65,25 @@ MainWindow::MainWindow(const char *filename) } { + QMenu *menu = menuBar()->addMenu("&Edit"); + menu->addAction("&Undo", editor, SLOT(undo()), QKeySequence(Qt::CTRL + Qt::Key_Z)); + menu->addAction("&Redo", editor, SLOT(redo()), QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Z)); + menu->addSeparator(); + menu->addAction("Cu&t", editor, SLOT(cut()), QKeySequence(Qt::CTRL + Qt::Key_X)); + menu->addAction("&Copy", editor, SLOT(copy()), QKeySequence(Qt::CTRL + Qt::Key_C)); + menu->addAction("&Paste", editor, SLOT(paste()), QKeySequence(Qt::CTRL + Qt::Key_V)); + menu->addSeparator(); + menu->addAction("&Indent", this, SLOT(editIndent()), QKeySequence(Qt::CTRL + Qt::Key_I)); + menu->addAction("&Unindent", this, SLOT(editUnindent()), QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_I)); + menu->addSeparator(); + menu->addAction("C&omment", this, SLOT(editComment()), QKeySequence(Qt::CTRL + Qt::Key_D)); + menu->addAction("&Uncomment", this, SLOT(editUncomment()), QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D)); + menu->addSeparator(); + menu->addAction("Zoom In", editor, SLOT(zoomIn()), QKeySequence(Qt::CTRL + Qt::Key_Plus)); + menu->addAction("Zoom Out", editor, SLOT(zoomOut()), QKeySequence(Qt::CTRL + Qt::Key_Minus)); + } + + { QMenu *menu = menuBar()->addMenu("&Design"); menu->addAction("&Reload and Compile", this, SLOT(actionReloadCompile()), QKeySequence(Qt::Key_F4)); menu->addAction("&Compile", this, SLOT(actionCompile()), QKeySequence(Qt::Key_F5)); @@ -107,12 +132,6 @@ MainWindow::MainWindow(const char *filename) menu->addAction("Orthogonal"); } - s1 = new QSplitter(Qt::Horizontal, this); - editor = new QTextEdit(s1); - s2 = new QSplitter(Qt::Vertical, s1); - screen = new GLView(s2); - console = new QTextEdit(s2); - console->setReadOnly(true); current_win = this; @@ -330,6 +349,22 @@ void MainWindow::actionReload() current_win = NULL; } +void MainWindow::editIndent() +{ +} + +void MainWindow::editUnindent() +{ +} + +void MainWindow::editComment() +{ +} + +void MainWindow::editUncomment() +{ +} + void MainWindow::actionReloadCompile() { current_win = this; @@ -490,6 +490,12 @@ private slots: void actionReload(); private slots: + void editIndent(); + void editUnindent(); + void editComment(); + void editUncomment(); + +private slots: void actionReloadCompile(); void actionCompile(); #ifdef ENABLE_CGAL |