2006-03-28 06:10:52 +00:00
|
|
|
/***************************************************************************
|
|
|
|
qucs_init.cpp
|
|
|
|
---------------
|
|
|
|
begin : Sat May 1 2004
|
|
|
|
copyright : (C) 2004 by Michael Margraf
|
|
|
|
email : michael.margraf@alumni.tu-berlin.de
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
2013-03-15 18:43:02 +01:00
|
|
|
|
2006-03-28 06:10:52 +00:00
|
|
|
#include "main.h"
|
|
|
|
#include "qucs.h"
|
2011-03-03 18:09:11 +00:00
|
|
|
#include "octave_window.h"
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2014-11-04 12:48:23 +08:00
|
|
|
#include <QAction>
|
|
|
|
#include <QShortcut>
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QMenuBar>
|
|
|
|
#include <QToolBar>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QStatusBar>
|
|
|
|
#include <QDockWidget>
|
|
|
|
#include <QMessageBox>
|
2015-01-10 23:17:26 +08:00
|
|
|
#include <QApplication>
|
2012-10-31 09:15:06 +01:00
|
|
|
|
2014-08-03 01:35:18 +02:00
|
|
|
/**
|
|
|
|
* @brief QucsApp::initActions Initializes all QActions of the application
|
|
|
|
*/
|
2006-03-28 06:10:52 +00:00
|
|
|
void QucsApp::initActions()
|
|
|
|
{
|
|
|
|
activeAction = 0; // no active action
|
|
|
|
|
2006-05-16 11:04:27 +00:00
|
|
|
// note: first argument of QAction() for backward compatibility Qt < 3.2
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
fileNew = new QAction(QIcon((":/bitmaps/filenew.png")), tr("&New"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
fileNew->setShortcut(Qt::CTRL+Qt::Key_N);
|
2006-03-28 06:10:52 +00:00
|
|
|
fileNew->setStatusTip(tr("Creates a new document"));
|
|
|
|
fileNew->setWhatsThis(
|
|
|
|
tr("New\n\nCreates a new schematic or data display document"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(fileNew, SIGNAL(triggered()), SLOT(slotFileNew()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
textNew = new QAction(QIcon((":/bitmaps/textnew.png")), tr("New &Text"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
textNew->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_V);
|
2006-03-28 06:10:52 +00:00
|
|
|
textNew->setStatusTip(tr("Creates a new text document"));
|
|
|
|
textNew->setWhatsThis(tr("New Text\n\nCreates a new text document"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(textNew, SIGNAL(triggered()), SLOT(slotTextNew()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
fileOpen = new QAction(QIcon((":/bitmaps/fileopen.png")), tr("&Open..."), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
fileOpen->setShortcut(Qt::CTRL+Qt::Key_O);
|
2006-03-28 06:10:52 +00:00
|
|
|
fileOpen->setStatusTip(tr("Opens an existing document"));
|
|
|
|
fileOpen->setWhatsThis(tr("Open File\n\nOpens an existing document"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(fileOpen, SIGNAL(triggered()), SLOT(slotFileOpen()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
fileSave = new QAction(QIcon((":/bitmaps/filesave.png")), tr("&Save"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
fileSave->setShortcut(Qt::CTRL+Qt::Key_S);
|
2006-03-28 06:10:52 +00:00
|
|
|
fileSave->setStatusTip(tr("Saves the current document"));
|
|
|
|
fileSave->setWhatsThis(tr("Save File\n\nSaves the current document"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(fileSave, SIGNAL(triggered()), SLOT(slotFileSave()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
fileSaveAs = new QAction(tr("Save as..."), this);
|
|
|
|
fileSaveAs->setShortcut(Qt::CTRL+Qt::Key_Minus);
|
2006-03-28 06:10:52 +00:00
|
|
|
fileSaveAs->setStatusTip(
|
|
|
|
tr("Saves the current document under a new filename"));
|
|
|
|
fileSaveAs->setWhatsThis(
|
|
|
|
tr("Save As\n\nSaves the current document under a new filename"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(fileSaveAs, SIGNAL(triggered()), SLOT(slotFileSaveAs()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
fileSaveAll = new QAction(QIcon((":/bitmaps/filesaveall.png")), tr("Save &All"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
fileSaveAll->setShortcut(Qt::CTRL+Qt::Key_Plus);
|
2006-03-28 06:10:52 +00:00
|
|
|
fileSaveAll->setStatusTip(tr("Saves all open documents"));
|
2007-03-12 17:10:14 +00:00
|
|
|
fileSaveAll->setWhatsThis(tr("Save All Files\n\nSaves all open documents"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(fileSaveAll, SIGNAL(triggered()), SLOT(slotFileSaveAll()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
fileClose = new QAction(QIcon((":/bitmaps/fileclose.png")), tr("&Close"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
fileClose->setShortcut(Qt::CTRL+Qt::Key_W);
|
2006-03-28 06:10:52 +00:00
|
|
|
fileClose->setStatusTip(tr("Closes the current document"));
|
2007-03-12 17:10:14 +00:00
|
|
|
fileClose->setWhatsThis(tr("Close File\n\nCloses the current document"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(fileClose, SIGNAL(triggered()), SLOT(slotFileClose()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2015-01-11 21:52:03 +08:00
|
|
|
for (int i = 0; i < MaxRecentFiles; ++i) {
|
|
|
|
fileRecentAction[i] = new QAction(this);
|
|
|
|
fileRecentAction[i]->setVisible(false);
|
2015-01-11 22:36:06 +08:00
|
|
|
connect(fileRecentAction[i], SIGNAL(triggered()), SLOT(slotOpenRecent()));
|
2015-01-11 21:52:03 +08:00
|
|
|
}
|
|
|
|
|
2015-01-11 22:35:21 +08:00
|
|
|
fileClearRecent = new QAction(tr("Clear Recent"), this);
|
|
|
|
connect(fileClearRecent, SIGNAL(triggered()), SLOT(slotClearRecentFiles()));
|
|
|
|
|
2013-05-21 16:39:04 +02:00
|
|
|
fileExamples = new QAction(tr("&Examples"), this);
|
|
|
|
fileExamples->setStatusTip(tr("Opens a file explorer with example documents"));
|
|
|
|
fileExamples->setWhatsThis(
|
|
|
|
tr("Examples\n\nOpens a file explorer with example documents"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(fileExamples, SIGNAL(triggered()), SLOT(slotFileExamples()));
|
2013-05-21 16:39:04 +02:00
|
|
|
|
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
symEdit = new QAction(tr("&Edit Circuit Symbol"), this);
|
|
|
|
symEdit->setShortcut(Qt::Key_F9);
|
2006-03-28 06:10:52 +00:00
|
|
|
symEdit->setStatusTip(tr("Edits the symbol for this schematic"));
|
|
|
|
symEdit->setWhatsThis(
|
|
|
|
tr("Edit Circuit Symbol\n\nEdits the symbol for this schematic"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(symEdit, SIGNAL(triggered()), SLOT(slotSymbolEdit()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
fileSettings = new QAction(tr("&Document Settings..."), this);
|
|
|
|
fileSettings->setShortcut(Qt::CTRL+Qt::Key_Period);
|
2007-03-12 17:10:14 +00:00
|
|
|
fileSettings->setStatusTip(tr("Document Settings"));
|
|
|
|
fileSettings->setWhatsThis(tr("Settings\n\nSets properties of the file"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(fileSettings, SIGNAL(triggered()), SLOT(slotFileSettings()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
filePrint = new QAction(QIcon((":/bitmaps/fileprint.png")), tr("&Print..."), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
filePrint->setShortcut(Qt::CTRL+Qt::Key_P);
|
2006-03-28 06:10:52 +00:00
|
|
|
filePrint->setStatusTip(tr("Prints the current document"));
|
2007-03-12 17:10:14 +00:00
|
|
|
filePrint->setWhatsThis(tr("Print File\n\nPrints the current document"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(filePrint, SIGNAL(triggered()), SLOT(slotFilePrint()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
filePrintFit = new QAction(tr("Print Fit to Page..."), this);
|
|
|
|
filePrintFit->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_P);
|
2007-03-12 17:10:14 +00:00
|
|
|
filePrintFit->setStatusTip(tr("Print Fit to Page"));
|
2006-07-03 06:02:08 +00:00
|
|
|
filePrintFit->setWhatsThis(
|
|
|
|
tr("Print Fit to Page\n\n"
|
|
|
|
"Print and fit content to the page size"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(filePrintFit, SIGNAL(triggered()), SLOT(slotFilePrintFit()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
fileQuit = new QAction(tr("E&xit"), this);
|
|
|
|
fileQuit->setShortcut(Qt::CTRL+Qt::Key_Q);
|
2006-03-28 06:10:52 +00:00
|
|
|
fileQuit->setStatusTip(tr("Quits the application"));
|
|
|
|
fileQuit->setWhatsThis(tr("Exit\n\nQuits the application"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(fileQuit, SIGNAL(triggered()), SLOT(slotFileQuit()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
applSettings = new QAction(tr("Application Settings..."), this);
|
|
|
|
applSettings->setShortcut(Qt::CTRL+Qt::Key_Comma);
|
2007-03-12 17:10:14 +00:00
|
|
|
applSettings->setStatusTip(tr("Application Settings"));
|
2006-03-28 06:10:52 +00:00
|
|
|
applSettings->setWhatsThis(
|
|
|
|
tr("Qucs Settings\n\nSets properties of the application"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(applSettings, SIGNAL(triggered()), SLOT(slotApplSettings()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2014-01-10 12:22:21 +00:00
|
|
|
refreshSchPath = new QAction(tr("Refresh Search Path..."), this);
|
2013-09-08 03:01:59 +01:00
|
|
|
//refreshSchPath->setShortcut(Qt::CTRL+Qt::Key_Comma);
|
2014-01-10 12:22:21 +00:00
|
|
|
refreshSchPath->setStatusTip(tr("Refresh Search Path"));
|
2013-09-08 03:01:59 +01:00
|
|
|
refreshSchPath->setWhatsThis(
|
2014-01-10 12:22:21 +00:00
|
|
|
tr("Refresh Path\n\nRechecks the list of paths for subcircuit files."));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(refreshSchPath, SIGNAL(triggered()), SLOT(slotRefreshSchPath()));
|
2013-09-08 03:01:59 +01:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
alignTop = new QAction(tr("Align top"), this);
|
|
|
|
alignTop->setShortcut(Qt::CTRL+Qt::Key_T);
|
2006-03-28 06:10:52 +00:00
|
|
|
alignTop->setStatusTip(tr("Align top selected elements"));
|
|
|
|
alignTop->setWhatsThis(
|
|
|
|
tr("Align top\n\nAlign selected elements to their upper edge"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(alignTop, SIGNAL(triggered()), SLOT(slotAlignTop()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
alignBottom = new QAction(tr("Align bottom"), this);
|
2006-03-28 06:10:52 +00:00
|
|
|
alignBottom->setStatusTip(tr("Align bottom selected elements"));
|
|
|
|
alignBottom->setWhatsThis(
|
|
|
|
tr("Align bottom\n\nAlign selected elements to their lower edge"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(alignBottom, SIGNAL(triggered()), SLOT(slotAlignBottom()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
alignLeft = new QAction(tr("Align left"), this);
|
2006-03-28 06:10:52 +00:00
|
|
|
alignLeft->setStatusTip(tr("Align left selected elements"));
|
|
|
|
alignLeft->setWhatsThis(
|
|
|
|
tr("Align left\n\nAlign selected elements to their left edge"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(alignLeft, SIGNAL(triggered()), SLOT(slotAlignLeft()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
alignRight = new QAction(tr("Align right"), this);
|
2006-03-28 06:10:52 +00:00
|
|
|
alignRight->setStatusTip(tr("Align right selected elements"));
|
|
|
|
alignRight->setWhatsThis(
|
|
|
|
tr("Align right\n\nAlign selected elements to their right edge"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(alignRight, SIGNAL(triggered()), SLOT(slotAlignRight()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
distrHor = new QAction(tr("Distribute horizontally"), this);
|
2006-03-28 06:10:52 +00:00
|
|
|
distrHor->setStatusTip(tr("Distribute equally horizontally"));
|
|
|
|
distrHor->setWhatsThis(
|
|
|
|
tr("Distribute horizontally\n\n"
|
|
|
|
"Distribute horizontally selected elements"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(distrHor, SIGNAL(triggered()), SLOT(slotDistribHoriz()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
distrVert = new QAction(tr("Distribute vertically"), this);
|
2006-03-28 06:10:52 +00:00
|
|
|
distrVert->setStatusTip(tr("Distribute equally vertically"));
|
|
|
|
distrVert->setWhatsThis(
|
|
|
|
tr("Distribute vertically\n\n"
|
|
|
|
"Distribute vertically selected elements"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(distrVert, SIGNAL(triggered()), SLOT(slotDistribVert()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
centerHor = new QAction(tr("Center horizontally"), this);
|
2006-11-06 06:58:05 +00:00
|
|
|
centerHor->setStatusTip(tr("Center horizontally selected elements"));
|
|
|
|
centerHor->setWhatsThis(
|
|
|
|
tr("Center horizontally\n\nCenter horizontally selected elements"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(centerHor, SIGNAL(triggered()), SLOT(slotCenterHorizontal()));
|
2006-11-06 06:58:05 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
centerVert = new QAction(tr("Center vertically"), this);
|
2006-11-06 06:58:05 +00:00
|
|
|
centerVert->setStatusTip(tr("Center vertically selected elements"));
|
|
|
|
centerVert->setWhatsThis(
|
|
|
|
tr("Center vertically\n\nCenter vertically selected elements"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(centerVert, SIGNAL(triggered()), SLOT(slotCenterVertical()));
|
2006-11-06 06:58:05 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
onGrid = new QAction(tr("Set on Grid"), this);
|
|
|
|
onGrid->setShortcut(Qt::CTRL+Qt::Key_U);
|
2007-03-12 17:10:14 +00:00
|
|
|
onGrid->setStatusTip(tr("Sets selected elements on grid"));
|
2006-03-28 06:10:52 +00:00
|
|
|
onGrid->setWhatsThis(
|
|
|
|
tr("Set on Grid\n\nSets selected elements on grid"));
|
2014-11-23 12:24:05 +01:00
|
|
|
onGrid->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(onGrid, SIGNAL(toggled(bool)), SLOT(slotOnGrid(bool)));
|
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
moveText = new QAction(tr("Move Component Text"), this);
|
|
|
|
moveText->setShortcut(Qt::CTRL+Qt::Key_K);
|
2007-03-12 17:10:14 +00:00
|
|
|
moveText->setStatusTip(tr("Moves the property text of components"));
|
2006-03-28 06:10:52 +00:00
|
|
|
moveText->setWhatsThis(
|
|
|
|
tr("Move Component Text\n\nMoves the property text of components"));
|
2014-11-23 12:24:05 +01:00
|
|
|
moveText->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(moveText, SIGNAL(toggled(bool)), SLOT(slotMoveText(bool)));
|
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
changeProps = new QAction(tr("Replace..."), this);
|
|
|
|
changeProps->setShortcut(Qt::Key_F7);
|
2007-03-12 17:10:14 +00:00
|
|
|
changeProps->setStatusTip(tr("Replace component properties or VHDL code"));
|
2006-03-28 06:10:52 +00:00
|
|
|
changeProps->setWhatsThis(
|
2006-05-05 06:00:05 +00:00
|
|
|
tr("Replace\n\nChange component properties\nor\ntext in VHDL code"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(changeProps, SIGNAL(triggered()), SLOT(slotChangeProps()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
editCut = new QAction(QIcon((":/bitmaps/editcut.png")), tr("Cu&t"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
editCut->setShortcut(Qt::CTRL+Qt::Key_X);
|
2006-03-28 06:10:52 +00:00
|
|
|
editCut->setStatusTip(
|
2006-04-18 06:03:52 +00:00
|
|
|
tr("Cuts out the selection and puts it into the clipboard"));
|
2006-03-28 06:10:52 +00:00
|
|
|
editCut->setWhatsThis(
|
2006-04-18 06:03:52 +00:00
|
|
|
tr("Cut\n\nCuts out the selection and puts it into the clipboard"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(editCut, SIGNAL(triggered()), SLOT(slotEditCut()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
editCopy = new QAction(QIcon((":/bitmaps/editcopy.png")), tr("&Copy"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
editCopy->setShortcut(Qt::CTRL+Qt::Key_C);
|
2006-03-28 06:10:52 +00:00
|
|
|
editCopy->setStatusTip(
|
2006-04-18 06:03:52 +00:00
|
|
|
tr("Copies the selection into the clipboard"));
|
2006-03-28 06:10:52 +00:00
|
|
|
editCopy->setWhatsThis(
|
2006-04-18 06:03:52 +00:00
|
|
|
tr("Copy\n\nCopies the selection into the clipboard"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(editCopy, SIGNAL(triggered()), SLOT(slotEditCopy()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
editPaste = new QAction(QIcon((":/bitmaps/editpaste.png")), tr("&Paste"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
editPaste->setShortcut(Qt::CTRL+Qt::Key_V);
|
2006-03-28 06:10:52 +00:00
|
|
|
editPaste->setStatusTip(
|
|
|
|
tr("Pastes the clipboard contents to the cursor position"));
|
|
|
|
editPaste->setWhatsThis(
|
|
|
|
tr("Paste\n\nPastes the clipboard contents to the cursor position"));
|
2014-11-23 12:24:05 +01:00
|
|
|
editPaste->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(editPaste, SIGNAL(toggled(bool)), SLOT(slotEditPaste(bool)));
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
editDelete = new QAction(QIcon((":/bitmaps/editdelete.png")), tr("&Delete"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
editDelete->setShortcut(Qt::Key_Delete);
|
2006-03-28 06:10:52 +00:00
|
|
|
editDelete->setStatusTip(tr("Deletes the selected components"));
|
2007-03-12 17:10:14 +00:00
|
|
|
editDelete->setWhatsThis(tr("Delete\n\nDeletes the selected components"));
|
2014-11-23 12:24:05 +01:00
|
|
|
editDelete->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(editDelete, SIGNAL(toggled(bool)), SLOT(slotEditDelete(bool)));
|
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
editFind = new QAction(tr("Find..."), this);
|
|
|
|
editFind->setShortcut(Qt::CTRL+Qt::Key_F);
|
2006-04-10 06:12:35 +00:00
|
|
|
editFind->setStatusTip(tr("Find a piece of text"));
|
|
|
|
editFind->setWhatsThis(tr("Find\n\nSearches for a piece of text"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(editFind, SIGNAL(triggered()), SLOT(slotEditFind()));
|
2006-04-10 06:12:35 +00:00
|
|
|
|
2006-03-28 06:10:52 +00:00
|
|
|
// to ease usage with notebooks, backspace can also be used to delete
|
2013-03-15 17:57:32 +01:00
|
|
|
// currently not supported
|
|
|
|
//mainAccel->connectItem(mainAccel->insertItem(Qt::Key_Backspace),
|
|
|
|
// editDelete, SLOT(toggle()) );
|
|
|
|
|
2013-12-08 16:41:59 +04:00
|
|
|
exportAsImage = new QAction(tr("Export as image"),this);
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(exportAsImage,SIGNAL(triggered()),SLOT(slotSaveSchematicToGraphicsFile()));
|
2013-12-08 16:41:59 +04:00
|
|
|
|
2013-03-15 17:57:32 +01:00
|
|
|
// cursor left/right/up/down to move marker on a graph
|
|
|
|
cursorLeft = new QShortcut(QKeySequence(Qt::Key_Left), this);
|
|
|
|
connect(cursorLeft, SIGNAL(activated()), SLOT(slotCursorLeft()));
|
|
|
|
|
|
|
|
cursorRight = new QShortcut(QKeySequence(Qt::Key_Right), this);
|
|
|
|
connect(cursorRight, SIGNAL(activated()), SLOT(slotCursorRight()));
|
|
|
|
|
|
|
|
cursorUp = new QShortcut(QKeySequence(Qt::Key_Up), this);
|
|
|
|
connect(cursorUp, SIGNAL(activated()), SLOT(slotCursorUp()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-15 17:57:32 +01:00
|
|
|
cursorDown = new QShortcut(QKeySequence(Qt::Key_Down), this);
|
|
|
|
connect(cursorDown, SIGNAL(activated()), SLOT(slotCursorDown()));
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
undo = new QAction(QIcon((":/bitmaps/undo.png")), tr("&Undo"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
undo->setShortcut(Qt::CTRL+Qt::Key_Z);
|
2006-03-28 06:10:52 +00:00
|
|
|
undo->setStatusTip(tr("Undoes the last command"));
|
|
|
|
undo->setWhatsThis(tr("Undo\n\nMakes the last action undone"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(undo, SIGNAL(triggered()), SLOT(slotEditUndo()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
redo = new QAction(QIcon((":/bitmaps/redo.png")), tr("&Redo"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
redo->setShortcut(Qt::CTRL+Qt::Key_Y);
|
2006-03-28 06:10:52 +00:00
|
|
|
redo->setStatusTip(tr("Redoes the last command"));
|
|
|
|
redo->setWhatsThis(tr("Redo\n\nRepeats the last action once more"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(redo, SIGNAL(triggered()), SLOT(slotEditRedo()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
projNew = new QAction(tr("&New Project..."), this);
|
|
|
|
projNew->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_N);
|
2006-03-28 06:10:52 +00:00
|
|
|
projNew->setStatusTip(tr("Creates a new project"));
|
|
|
|
projNew->setWhatsThis(tr("New Project\n\nCreates a new project"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(projNew, SIGNAL(triggered()), SLOT(slotButtonProjNew()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
projOpen = new QAction(tr("&Open Project..."), this);
|
|
|
|
projOpen->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_O);
|
2007-03-12 17:10:14 +00:00
|
|
|
projOpen->setStatusTip(tr("Opens an existing project"));
|
|
|
|
projOpen->setWhatsThis(tr("Open Project\n\nOpens an existing project"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(projOpen, SIGNAL(triggered()), SLOT(slotMenuProjOpen()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
projDel = new QAction(tr("&Delete Project..."), this);
|
|
|
|
projDel->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_D);
|
2007-03-12 17:10:14 +00:00
|
|
|
projDel->setStatusTip(tr("Deletes an existing project"));
|
|
|
|
projDel->setWhatsThis(tr("Delete Project\n\nDeletes an existing project"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(projDel, SIGNAL(triggered()), SLOT(slotMenuProjDel()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
projClose = new QAction(tr("&Close Project"), this);
|
|
|
|
projClose->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_W);
|
2007-03-12 17:10:14 +00:00
|
|
|
projClose->setStatusTip(tr("Closes the current project"));
|
|
|
|
projClose->setWhatsThis(tr("Close Project\n\nCloses the current project"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(projClose, SIGNAL(triggered()), SLOT(slotMenuProjClose()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
addToProj = new QAction(tr("&Add Files to Project..."), this);
|
|
|
|
addToProj->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_A);
|
2006-03-28 06:10:52 +00:00
|
|
|
addToProj->setStatusTip(tr("Copies files to project directory"));
|
|
|
|
addToProj->setWhatsThis(
|
|
|
|
tr("Add Files to Project\n\nCopies files to project directory"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(addToProj, SIGNAL(triggered()), SLOT(slotAddToProject()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
createLib = new QAction(tr("Create &Library..."), this);
|
|
|
|
createLib->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_L);
|
2006-06-06 06:14:17 +00:00
|
|
|
createLib->setStatusTip(tr("Create Library from Subcircuits"));
|
|
|
|
createLib->setWhatsThis(
|
|
|
|
tr("Create Library\n\nCreate Library from Subcircuits"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(createLib, SIGNAL(triggered()), SLOT(slotCreateLib()));
|
2006-06-06 06:14:17 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
createPkg = new QAction(tr("Create &Package..."), this);
|
|
|
|
createPkg->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_Z);
|
2006-07-03 06:02:08 +00:00
|
|
|
createPkg->setStatusTip(tr("Create compressed Package from Projects"));
|
|
|
|
createPkg->setWhatsThis(
|
2007-03-12 17:10:14 +00:00
|
|
|
tr("Create Package\n\nCreate compressed Package from complete Projects"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(createPkg, SIGNAL(triggered()), SLOT(slotCreatePackage()));
|
2006-07-03 06:02:08 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
extractPkg = new QAction(tr("E&xtract Package..."), this);
|
|
|
|
extractPkg->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_X);
|
2006-07-03 06:02:08 +00:00
|
|
|
extractPkg->setStatusTip(tr("Install Content of a Package"));
|
|
|
|
extractPkg->setWhatsThis(
|
|
|
|
tr("Extract Package\n\nInstall Content of a Package"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(extractPkg, SIGNAL(triggered()), SLOT(slotExtractPackage()));
|
2006-07-03 06:02:08 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
importData = new QAction(tr("&Import/Export Data..."), this);
|
|
|
|
importData->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_I);
|
2009-03-17 19:33:22 +00:00
|
|
|
importData->setStatusTip(tr("Convert data file"));
|
2006-07-03 06:02:08 +00:00
|
|
|
importData->setWhatsThis(
|
2009-03-17 19:33:22 +00:00
|
|
|
tr("Import/Export Data\n\nConvert data file to various file formats"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(importData, SIGNAL(triggered()), SLOT(slotImportData()));
|
2006-07-03 06:02:08 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
graph2csv = new QAction(tr("Export to &CSV..."), this);
|
|
|
|
graph2csv->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_C);
|
2006-07-03 06:02:08 +00:00
|
|
|
graph2csv->setStatusTip(tr("Convert graph data to CSV file"));
|
|
|
|
graph2csv->setWhatsThis(
|
|
|
|
tr("Export to CSV\n\nConvert graph data to CSV file"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(graph2csv, SIGNAL(triggered()), SLOT(slotExportGraphAsCsv()));
|
2006-07-03 06:02:08 +00:00
|
|
|
|
2014-02-26 21:55:31 +01:00
|
|
|
buildModule = new QAction(tr("Build Verilog-A module..."), this);
|
2014-03-16 14:42:54 +01:00
|
|
|
buildModule->setStatusTip(tr("Run admsXml and C++ compiler"));
|
|
|
|
buildModule->setWhatsThis(tr("Build Verilog-A module\nRuns amdsXml and C++ compiler"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(buildModule, SIGNAL(triggered()), SLOT(slotBuildModule()));
|
2014-02-26 21:40:00 +01:00
|
|
|
|
2014-02-26 21:55:31 +01:00
|
|
|
loadModule = new QAction(tr("Load Verilog-A module..."), this);
|
2014-03-16 14:42:54 +01:00
|
|
|
loadModule->setStatusTip(tr("Select Verilog-A symbols to be loaded"));
|
|
|
|
loadModule->setWhatsThis(tr("Load Verilog-A module\nLet the user select and load symbols"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(loadModule, SIGNAL(triggered()), SLOT(slotLoadModule()));
|
2014-02-19 21:47:28 +01:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
magAll = new QAction(QIcon((":/bitmaps/viewmagfit.png")), tr("View All"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
magAll->setShortcut(Qt::Key_0);
|
2006-04-18 06:03:52 +00:00
|
|
|
magAll->setStatusTip(tr("Show the whole page"));
|
2006-03-28 06:10:52 +00:00
|
|
|
magAll->setWhatsThis(tr("View All\n\nShows the whole page content"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(magAll, SIGNAL(triggered()), SLOT(slotShowAll()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
magOne = new QAction(QIcon((":/bitmaps/viewmag1.png")), tr("View 1:1"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
magOne->setShortcut(Qt::Key_1);
|
2006-03-28 06:10:52 +00:00
|
|
|
magOne->setStatusTip(tr("Views without magnification"));
|
2013-04-06 19:06:49 +02:00
|
|
|
magOne->setWhatsThis(tr("View 1:1\n\nShows the page content without magnification"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(magOne, SIGNAL(triggered()), SLOT(slotShowOne()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
magPlus = new QAction(QIcon((":/bitmaps/viewmag+.png")), tr("Zoom in"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
magPlus->setShortcut(Qt::Key_Plus);
|
2006-03-28 06:10:52 +00:00
|
|
|
magPlus->setStatusTip(tr("Zooms into the current view"));
|
|
|
|
magPlus->setWhatsThis(tr("Zoom in\n\nZooms the current view"));
|
2014-11-23 12:24:05 +01:00
|
|
|
magPlus->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(magPlus, SIGNAL(toggled(bool)), SLOT(slotZoomIn(bool)));
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
magMinus = new QAction(QIcon((":/bitmaps/viewmag-.png")), tr("Zoom out"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
magMinus->setShortcut(Qt::Key_Minus);
|
2006-03-28 06:10:52 +00:00
|
|
|
magMinus->setStatusTip(tr("Zooms out the current view"));
|
|
|
|
magMinus->setWhatsThis(tr("Zoom out\n\nZooms out the current view"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(magMinus, SIGNAL(triggered()), SLOT(slotZoomOut()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-07-02 23:15:40 +02:00
|
|
|
QAction *escape = new QAction(this);
|
|
|
|
escape->setShortcut(Qt::Key_Escape);
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(escape, SIGNAL(triggered()), SLOT(slotEscape()));
|
2013-07-02 23:15:40 +02:00
|
|
|
this->addAction(escape);
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
select = new QAction(QIcon((":/bitmaps/pointer.png")), tr("Select"), this);
|
2006-04-18 06:03:52 +00:00
|
|
|
select->setStatusTip(tr("Activate select mode"));
|
|
|
|
select->setWhatsThis(tr("Select\n\nActivates select mode"));
|
2014-11-23 12:24:05 +01:00
|
|
|
select->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(select, SIGNAL(toggled(bool)), SLOT(slotSelect(bool)));
|
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
selectAll = new QAction(tr("Select All"), this);
|
|
|
|
selectAll->setShortcut(Qt::CTRL+Qt::Key_A);
|
2006-03-28 06:10:52 +00:00
|
|
|
selectAll->setStatusTip(tr("Selects all elements"));
|
|
|
|
selectAll->setWhatsThis(
|
|
|
|
tr("Select All\n\nSelects all elements of the document"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(selectAll, SIGNAL(triggered()), SLOT(slotSelectAll()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
selectMarker = new QAction(tr("Select Markers"), this);
|
|
|
|
selectMarker->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_M);
|
2006-05-22 06:01:55 +00:00
|
|
|
selectMarker->setStatusTip(tr("Selects all markers"));
|
|
|
|
selectMarker->setWhatsThis(
|
|
|
|
tr("Select Markers\n\nSelects all diagram markers of the document"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(selectMarker, SIGNAL(triggered()), SLOT(slotSelectMarker()));
|
2006-05-22 06:01:55 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
editRotate = new QAction(QIcon((":/bitmaps/rotate_ccw.png")), tr("Rotate"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
editRotate->setShortcut(Qt::CTRL+Qt::Key_R);
|
2013-06-02 22:33:20 +02:00
|
|
|
editRotate->setStatusTip(tr("Rotates the selected component by 90\x00B0"));
|
2006-03-28 06:10:52 +00:00
|
|
|
editRotate->setWhatsThis(
|
2013-06-02 22:33:20 +02:00
|
|
|
tr("Rotate\n\nRotates the selected component by 90\x00B0 counter-clockwise"));
|
2014-11-23 12:24:05 +01:00
|
|
|
editRotate->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(editRotate, SIGNAL(toggled(bool)), SLOT(slotEditRotate(bool)));
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
editMirror = new QAction(QIcon((":/bitmaps/mirror.png")), tr("Mirror about X Axis"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
editMirror->setShortcut(Qt::CTRL+Qt::Key_J);
|
2007-03-12 17:10:14 +00:00
|
|
|
editMirror->setStatusTip(tr("Mirrors the selected item about X Axis"));
|
2006-03-28 06:10:52 +00:00
|
|
|
editMirror->setWhatsThis(
|
|
|
|
tr("Mirror about X Axis\n\nMirrors the selected item about X Axis"));
|
2014-11-23 12:24:05 +01:00
|
|
|
editMirror->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(editMirror, SIGNAL(toggled(bool)), SLOT(slotEditMirrorX(bool)));
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
editMirrorY = new QAction(QIcon((":/bitmaps/mirrory.png")), tr("Mirror about Y Axis"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
editMirrorY->setShortcut(Qt::CTRL+Qt::Key_M);
|
2007-03-12 17:10:14 +00:00
|
|
|
editMirrorY->setStatusTip(tr("Mirrors the selected item about Y Axis"));
|
2006-03-28 06:10:52 +00:00
|
|
|
editMirrorY->setWhatsThis(
|
|
|
|
tr("Mirror about Y Axis\n\nMirrors the selected item about Y Axis"));
|
2014-11-23 12:24:05 +01:00
|
|
|
editMirrorY->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(editMirrorY, SIGNAL(toggled(bool)), SLOT(slotEditMirrorY(bool)));
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
intoH = new QAction(QIcon((":/bitmaps/bottom.png")), tr("Go into Subcircuit"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
intoH->setShortcut(Qt::CTRL+Qt::Key_I);
|
2007-03-12 17:10:14 +00:00
|
|
|
intoH->setStatusTip(tr("Goes inside the selected subcircuit"));
|
2006-03-28 06:10:52 +00:00
|
|
|
intoH->setWhatsThis(
|
|
|
|
tr("Go into Subcircuit\n\nGoes inside the selected subcircuit"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(intoH, SIGNAL(triggered()), SLOT(slotIntoHierarchy()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
popH = new QAction(QIcon((":/bitmaps/top.png")), tr("Pop out"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
popH->setShortcut(Qt::CTRL+Qt::Key_H);
|
2006-03-28 06:10:52 +00:00
|
|
|
popH->setStatusTip(tr("Pop outside subcircuit"));
|
|
|
|
popH->setWhatsThis(
|
|
|
|
tr("Pop out\n\nGoes up one hierarchy level, i.e. leaves subcircuit"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(popH, SIGNAL(triggered()), SLOT(slotPopHierarchy()));
|
2006-03-28 06:10:52 +00:00
|
|
|
popH->setEnabled(false); // only enabled if useful !!!!
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
editActivate = new QAction(QIcon((":/bitmaps/deactiv.png")), tr("Deactivate/Activate"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
editActivate->setShortcut(Qt::CTRL+Qt::Key_D);
|
2007-03-12 17:10:14 +00:00
|
|
|
editActivate->setStatusTip(tr("Deactivate/Activate selected components"));
|
2006-03-28 06:10:52 +00:00
|
|
|
editActivate->setWhatsThis(
|
2006-05-05 06:00:05 +00:00
|
|
|
tr("Deactivate/Activate\n\nDeactivate/Activate the selected components"));
|
2014-11-23 12:24:05 +01:00
|
|
|
editActivate->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(editActivate, SIGNAL(toggled(bool)), SLOT(slotEditActivate(bool)));
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
insEquation = new QAction(QIcon((":/bitmaps/equation.png")), tr("Insert Equation"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
insEquation->setShortcut(Qt::CTRL+Qt::Key_Less);
|
2007-03-12 17:10:14 +00:00
|
|
|
insEquation->setStatusTip(tr("Inserts an equation"));
|
2006-03-28 06:10:52 +00:00
|
|
|
insEquation->setWhatsThis(
|
|
|
|
tr("Insert Equation\n\nInserts a user defined equation"));
|
2014-11-23 12:24:05 +01:00
|
|
|
insEquation->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(insEquation, SIGNAL(toggled(bool)), SLOT(slotInsertEquation(bool)));
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
insGround = new QAction(QIcon((":/bitmaps/ground.png")), tr("Insert Ground"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
insGround->setShortcut(Qt::CTRL+Qt::Key_G);
|
2007-03-12 17:10:14 +00:00
|
|
|
insGround->setStatusTip(tr("Inserts a ground symbol"));
|
|
|
|
insGround->setWhatsThis(tr("Insert Ground\n\nInserts a ground symbol"));
|
2014-11-23 12:24:05 +01:00
|
|
|
insGround->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(insGround, SIGNAL(toggled(bool)), SLOT(slotInsertGround(bool)));
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
insPort = new QAction(QIcon((":/bitmaps/port.png")), tr("Insert Port"), this);
|
2007-03-12 17:10:14 +00:00
|
|
|
insPort->setStatusTip(tr("Inserts a port symbol"));
|
2006-03-28 06:10:52 +00:00
|
|
|
insPort->setWhatsThis(tr("Insert Port\n\nInserts a port symbol"));
|
2014-11-23 12:24:05 +01:00
|
|
|
insPort->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(insPort, SIGNAL(toggled(bool)), SLOT(slotInsertPort(bool)));
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
insWire = new QAction(QIcon((":/bitmaps/wire.png")), tr("Wire"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
insWire->setShortcut(Qt::CTRL+Qt::Key_E);
|
2007-03-12 17:10:14 +00:00
|
|
|
insWire->setStatusTip(tr("Inserts a wire"));
|
2006-03-28 06:10:52 +00:00
|
|
|
insWire->setWhatsThis(tr("Wire\n\nInserts a wire"));
|
2014-11-23 12:24:05 +01:00
|
|
|
insWire->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(insWire, SIGNAL(toggled(bool)), SLOT(slotSetWire(bool)));
|
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
insLabel = new QAction(QIcon((":/bitmaps/nodename.png")), tr("Wire Label"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
insLabel->setShortcut(Qt::CTRL+Qt::Key_L);
|
2006-03-28 06:10:52 +00:00
|
|
|
insLabel->setStatusTip(tr("Inserts a wire or pin label"));
|
2007-03-12 17:10:14 +00:00
|
|
|
insLabel->setWhatsThis(tr("Wire Label\n\nInserts a wire or pin label"));
|
2014-11-23 12:24:05 +01:00
|
|
|
insLabel->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(insLabel, SIGNAL(toggled(bool)), SLOT(slotInsertLabel(bool)));
|
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
insEntity = new QAction(tr("VHDL entity"), this);
|
|
|
|
insEntity->setShortcut(Qt::CTRL+Qt::Key_Space);
|
2006-04-21 07:54:02 +00:00
|
|
|
insEntity->setStatusTip(tr("Inserts skeleton of VHDL entity"));
|
2006-04-18 06:03:52 +00:00
|
|
|
insEntity->setWhatsThis(
|
2006-04-21 07:54:02 +00:00
|
|
|
tr("VHDL entity\n\nInserts the skeleton of a VHDL entity"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(insEntity, SIGNAL(triggered()), SLOT(slotInsertEntity()));
|
2006-04-18 06:03:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
callEditor = new QAction(tr("Text Editor"), this);
|
|
|
|
callEditor->setShortcut(Qt::CTRL+Qt::Key_1);
|
2006-03-28 06:10:52 +00:00
|
|
|
callEditor->setStatusTip(tr("Starts the Qucs text editor"));
|
2007-03-12 17:10:14 +00:00
|
|
|
callEditor->setWhatsThis(tr("Text editor\n\nStarts the Qucs text editor"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(callEditor, SIGNAL(triggered()), SLOT(slotCallEditor()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
callFilter = new QAction(tr("Filter synthesis"), this);
|
|
|
|
callFilter->setShortcut(Qt::CTRL+Qt::Key_2);
|
2006-03-28 06:10:52 +00:00
|
|
|
callFilter->setStatusTip(tr("Starts QucsFilter"));
|
2007-03-12 17:10:14 +00:00
|
|
|
callFilter->setWhatsThis(tr("Filter synthesis\n\nStarts QucsFilter"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(callFilter, SIGNAL(triggered()), SLOT(slotCallFilter()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2014-07-10 16:07:46 +04:00
|
|
|
callActiveFilter = new QAction(tr("Active filter synthesis"),this);
|
|
|
|
callActiveFilter->setShortcut(Qt::CTRL+Qt::Key_3);
|
|
|
|
callActiveFilter->setStatusTip(tr("Starts QucsActiveFilter"));
|
|
|
|
callActiveFilter->setWhatsThis(tr("Active filter synthesis\n\nStarts QucsActiveFilter"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(callActiveFilter, SIGNAL(triggered()), SLOT(slotCallActiveFilter()));
|
2014-07-10 16:07:46 +04:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
callLine = new QAction(tr("Line calculation"), this);
|
2014-07-10 16:07:46 +04:00
|
|
|
callLine->setShortcut(Qt::CTRL+Qt::Key_4);
|
2006-03-28 06:10:52 +00:00
|
|
|
callLine->setStatusTip(tr("Starts QucsTrans"));
|
|
|
|
callLine->setWhatsThis(
|
|
|
|
tr("Line calculation\n\nStarts transmission line calculator"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(callLine, SIGNAL(triggered()), SLOT(slotCallLine()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
callLib = new QAction(tr("Component Library"), this);
|
2014-07-10 16:07:46 +04:00
|
|
|
callLib->setShortcut(Qt::CTRL+Qt::Key_5);
|
2006-03-28 06:10:52 +00:00
|
|
|
callLib->setStatusTip(tr("Starts QucsLib"));
|
|
|
|
callLib->setWhatsThis(
|
|
|
|
tr("Component Library\n\nStarts component library program"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(callLib, SIGNAL(triggered()), SLOT(slotCallLibrary()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
callMatch = new QAction(tr("Matching Circuit"), this);
|
2014-07-10 16:07:46 +04:00
|
|
|
callMatch->setShortcut(Qt::CTRL+Qt::Key_6);
|
2006-03-28 06:10:52 +00:00
|
|
|
callMatch->setStatusTip(tr("Creates Matching Circuit"));
|
|
|
|
callMatch->setWhatsThis(
|
2007-03-12 17:10:14 +00:00
|
|
|
tr("Matching Circuit\n\nDialog for Creating Matching Circuit"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(callMatch, SIGNAL(triggered()), SLOT(slotCallMatch()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
callAtt = new QAction(tr("Attenuator synthesis"), this);
|
2014-07-10 16:07:46 +04:00
|
|
|
callAtt->setShortcut(Qt::CTRL+Qt::Key_7);
|
2006-07-24 06:12:23 +00:00
|
|
|
callAtt->setStatusTip(tr("Starts QucsAttenuator"));
|
|
|
|
callAtt->setWhatsThis(
|
2007-03-12 17:10:14 +00:00
|
|
|
tr("Attenuator synthesis\n\nStarts attenuator calculation program"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(callAtt, SIGNAL(triggered()), SLOT(slotCallAtt()));
|
2006-07-24 06:12:23 +00:00
|
|
|
|
2014-08-23 15:23:23 +02:00
|
|
|
callRes = new QAction(tr("Resistor color codes"), this);
|
2014-10-05 10:10:26 +04:00
|
|
|
callRes->setShortcut(Qt::CTRL+Qt::Key_8);
|
2014-08-23 15:23:23 +02:00
|
|
|
callRes->setStatusTip(tr("Starts Qucs resistor color codes"));
|
|
|
|
callRes->setWhatsThis(
|
|
|
|
tr("Resistor color codes\n\nStarts standard resistor color code computation program"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(callRes, SIGNAL(triggered()), SLOT(slotCallRes()));
|
2014-08-23 15:23:23 +02:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
simulate = new QAction(QIcon((":/bitmaps/gear.png")), tr("Simulate"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
simulate->setShortcut(Qt::Key_F2);
|
2006-03-28 06:10:52 +00:00
|
|
|
simulate->setStatusTip(tr("Simulates the current schematic"));
|
2007-03-12 17:10:14 +00:00
|
|
|
simulate->setWhatsThis(tr("Simulate\n\nSimulates the current schematic"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(simulate, SIGNAL(triggered()), SLOT(slotSimulate()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
dpl_sch = new QAction(QIcon((":/bitmaps/rebuild.png")), tr("View Data Display/Schematic"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
dpl_sch->setShortcut(Qt::Key_F4);
|
2006-03-28 06:10:52 +00:00
|
|
|
dpl_sch->setStatusTip(tr("Changes to data display or schematic page"));
|
|
|
|
dpl_sch->setWhatsThis(
|
|
|
|
tr("View Data Display/Schematic\n\n")+
|
|
|
|
tr("Changes to data display or schematic page"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(dpl_sch, SIGNAL(triggered()), SLOT(slotToPage()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
dcbias = new QAction(tr("Calculate DC bias"), this);
|
|
|
|
dcbias->setShortcut(Qt::Key_F8);
|
2006-03-28 06:10:52 +00:00
|
|
|
dcbias->setStatusTip(tr("Calculates DC bias and shows it"));
|
|
|
|
dcbias->setWhatsThis(
|
|
|
|
tr("Calculate DC bias\n\nCalculates DC bias and shows it"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(dcbias, SIGNAL(triggered()), SLOT(slotDCbias()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-08-07 17:29:34 +02:00
|
|
|
setMarker = new QAction(QIcon((":/bitmaps/marker.png")), tr("Set Marker on Graph"), this);
|
2013-03-03 20:07:27 +01:00
|
|
|
setMarker->setShortcut(Qt::CTRL+Qt::Key_B);
|
2006-03-28 06:10:52 +00:00
|
|
|
setMarker->setStatusTip(tr("Sets a marker on a diagram's graph"));
|
|
|
|
setMarker->setWhatsThis(
|
|
|
|
tr("Set Marker\n\nSets a marker on a diagram's graph"));
|
2014-11-23 12:24:05 +01:00
|
|
|
setMarker->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
connect(setMarker, SIGNAL(toggled(bool)), SLOT(slotSetMarker(bool)));
|
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
showMsg = new QAction(tr("Show Last Messages"), this);
|
|
|
|
showMsg->setShortcut(Qt::Key_F5);
|
2006-03-28 06:10:52 +00:00
|
|
|
showMsg->setStatusTip(tr("Shows last simulation messages"));
|
|
|
|
showMsg->setWhatsThis(
|
2007-03-12 17:10:14 +00:00
|
|
|
tr("Show Last Messages\n\nShows the messages of the last simulation"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(showMsg, SIGNAL(triggered()), SLOT(slotShowLastMsg()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
showNet = new QAction(tr("Show Last Netlist"), this);
|
|
|
|
showNet->setShortcut(Qt::Key_F6);
|
2006-03-28 06:10:52 +00:00
|
|
|
showNet->setStatusTip(tr("Shows last simulation netlist"));
|
|
|
|
showNet->setWhatsThis(
|
|
|
|
tr("Show Last Netlist\n\nShows the netlist of the last simulation"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(showNet, SIGNAL(triggered()), SLOT(slotShowLastNetlist()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
viewToolBar = new QAction(tr("Tool&bar"), this);
|
2014-11-23 12:24:05 +01:00
|
|
|
viewToolBar->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
viewToolBar->setStatusTip(tr("Enables/disables the toolbar"));
|
|
|
|
viewToolBar->setWhatsThis(tr("Toolbar\n\nEnables/disables the toolbar"));
|
2006-07-17 06:02:57 +00:00
|
|
|
connect(viewToolBar, SIGNAL(toggled(bool)), SLOT(slotViewToolBar(bool)));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
viewStatusBar = new QAction(tr("&Statusbar"), this);
|
2014-11-23 12:24:05 +01:00
|
|
|
viewStatusBar->setCheckable(true);
|
2006-03-28 06:10:52 +00:00
|
|
|
viewStatusBar->setStatusTip(tr("Enables/disables the statusbar"));
|
|
|
|
viewStatusBar->setWhatsThis(
|
|
|
|
tr("Statusbar\n\nEnables/disables the statusbar"));
|
2006-07-17 06:02:57 +00:00
|
|
|
connect(viewStatusBar, SIGNAL(toggled(bool)), SLOT(slotViewStatusBar(bool)));
|
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
viewBrowseDock = new QAction(tr("&Dock Window"), this);
|
2014-11-23 12:24:05 +01:00
|
|
|
viewBrowseDock->setCheckable(true);
|
2006-07-17 06:02:57 +00:00
|
|
|
viewBrowseDock->setStatusTip(tr("Enables/disables the browse dock window"));
|
2007-03-12 17:10:14 +00:00
|
|
|
viewBrowseDock->setWhatsThis(
|
|
|
|
tr("Browse Window\n\nEnables/disables the browse dock window"));
|
2006-07-17 06:02:57 +00:00
|
|
|
connect(viewBrowseDock, SIGNAL(toggled(bool)), SLOT(slotViewBrowseDock(bool)));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
viewOctaveDock = new QAction(tr("&Octave Window"), this);
|
2014-11-23 12:24:05 +01:00
|
|
|
viewOctaveDock->setCheckable(true);
|
2011-03-03 18:09:11 +00:00
|
|
|
viewOctaveDock->setStatusTip(tr("Shows/hides the Octave dock window"));
|
|
|
|
viewOctaveDock->setWhatsThis(
|
|
|
|
tr("Octave Window\n\nShows/hides the Octave dock window"));
|
|
|
|
connect(viewOctaveDock, SIGNAL(toggled(bool)), SLOT(slotViewOctaveDock(bool)));
|
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
helpIndex = new QAction(tr("Help Index..."), this);
|
|
|
|
helpIndex->setShortcut(Qt::Key_F1);
|
2006-03-28 06:10:52 +00:00
|
|
|
helpIndex->setStatusTip(tr("Index of Qucs Help"));
|
|
|
|
helpIndex->setWhatsThis(tr("Help Index\n\nIndex of intern Qucs help"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(helpIndex, SIGNAL(triggered()), SLOT(slotHelpIndex()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
helpGetStart = new QAction(tr("Getting Started..."), this);
|
2006-03-28 06:10:52 +00:00
|
|
|
helpGetStart->setStatusTip(tr("Getting Started with Qucs"));
|
|
|
|
helpGetStart->setWhatsThis(
|
|
|
|
tr("Getting Started\n\nShort introduction into Qucs"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(helpGetStart, SIGNAL(triggered()), SLOT(slotGettingStarted()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
helpAboutApp = new QAction(tr("&About Qucs..."), this);
|
2007-03-12 17:10:14 +00:00
|
|
|
helpAboutApp->setStatusTip(tr("About the application"));
|
2006-03-28 06:10:52 +00:00
|
|
|
helpAboutApp->setWhatsThis(tr("About\n\nAbout the application"));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(helpAboutApp, SIGNAL(triggered()), SLOT(slotHelpAbout()));
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
helpAboutQt = new QAction(tr("About Qt..."), this);
|
2007-03-12 17:10:14 +00:00
|
|
|
helpAboutQt->setStatusTip(tr("About Qt"));
|
2006-03-28 06:10:52 +00:00
|
|
|
helpAboutQt->setWhatsThis(tr("About Qt\n\nAbout Qt by Trolltech"));
|
2015-01-10 23:17:26 +08:00
|
|
|
connect(helpAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
2006-03-28 06:10:52 +00:00
|
|
|
}
|
2013-05-21 21:25:08 +02:00
|
|
|
|
2006-04-10 06:12:35 +00:00
|
|
|
// ----------------------------------------------------------
|
2006-03-28 06:10:52 +00:00
|
|
|
void QucsApp::initMenuBar()
|
|
|
|
{
|
2013-03-03 20:07:27 +01:00
|
|
|
fileMenu = new QMenu(tr("&File")); // menuBar entry fileMenu
|
|
|
|
fileMenu->addAction(fileNew);
|
|
|
|
fileMenu->addAction(textNew);
|
|
|
|
fileMenu->addAction(fileOpen);
|
|
|
|
fileMenu->addAction(fileClose);
|
2013-11-10 14:45:04 +04:00
|
|
|
|
2015-01-11 22:35:21 +08:00
|
|
|
recentFilesMenu = new QMenu(tr("Open Recent"),fileMenu);
|
|
|
|
fileMenu->addMenu(recentFilesMenu);
|
2015-01-11 21:52:03 +08:00
|
|
|
for (int i = 0; i < MaxRecentFiles; ++i) {
|
2015-01-11 22:35:21 +08:00
|
|
|
recentFilesMenu->addAction(fileRecentAction[i]);
|
2015-01-11 21:52:03 +08:00
|
|
|
}
|
2015-01-11 22:35:21 +08:00
|
|
|
recentFilesMenu->insertSeparator();
|
|
|
|
recentFilesMenu->addAction(fileClearRecent);
|
2013-11-10 14:45:04 +04:00
|
|
|
|
2006-03-28 06:10:52 +00:00
|
|
|
fileMenu->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
fileMenu->addAction(fileSave);
|
|
|
|
fileMenu->addAction(fileSaveAll);
|
|
|
|
fileMenu->addAction(fileSaveAs);
|
2013-12-08 16:41:59 +04:00
|
|
|
fileMenu->addAction(exportAsImage);
|
2013-03-03 20:07:27 +01:00
|
|
|
fileMenu->addAction(filePrint);
|
|
|
|
fileMenu->addAction(filePrintFit);
|
2006-03-28 06:10:52 +00:00
|
|
|
fileMenu->insertSeparator();
|
2013-05-21 16:39:04 +02:00
|
|
|
fileMenu->addAction(fileExamples);
|
|
|
|
fileMenu->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
fileMenu->addAction(fileSettings);
|
|
|
|
fileMenu->addAction(symEdit);
|
2006-03-28 06:10:52 +00:00
|
|
|
fileMenu->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
fileMenu->addAction(applSettings);
|
2013-09-08 03:01:59 +01:00
|
|
|
fileMenu->addAction(refreshSchPath);
|
2006-03-28 06:10:52 +00:00
|
|
|
fileMenu->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
fileMenu->addAction(fileQuit);
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
editMenu = new QMenu(tr("&Edit")); // menuBar entry editMenu
|
|
|
|
editMenu->addAction(undo);
|
|
|
|
editMenu->addAction(redo);
|
2006-03-28 06:10:52 +00:00
|
|
|
editMenu->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
editMenu->addAction(editCut);
|
|
|
|
editMenu->addAction(editCopy);
|
|
|
|
editMenu->addAction(editPaste);
|
|
|
|
editMenu->addAction(editDelete);
|
2006-03-28 06:10:52 +00:00
|
|
|
editMenu->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
editMenu->addAction(select);
|
|
|
|
editMenu->addAction(selectAll);
|
|
|
|
editMenu->addAction(selectMarker);
|
|
|
|
editMenu->addAction(editFind);
|
|
|
|
editMenu->addAction(changeProps);
|
|
|
|
editMenu->addAction(editRotate);
|
|
|
|
editMenu->addAction(editMirror);
|
|
|
|
editMenu->addAction(editMirrorY);
|
|
|
|
editMenu->addAction(editActivate);
|
2006-03-28 06:10:52 +00:00
|
|
|
editMenu->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
editMenu->addAction(intoH);
|
|
|
|
editMenu->addAction(popH);
|
|
|
|
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
|
|
|
|
alignMenu = new QMenu(tr("P&ositioning")); // menuBar entry alignMenu
|
|
|
|
alignMenu->addAction(moveText);
|
|
|
|
alignMenu->addAction(onGrid);
|
2006-11-06 06:58:05 +00:00
|
|
|
alignMenu->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
alignMenu->addAction(centerHor);
|
|
|
|
alignMenu->addAction(centerVert);
|
2006-11-06 06:58:05 +00:00
|
|
|
alignMenu->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
alignMenu->addAction(alignTop);
|
|
|
|
alignMenu->addAction(alignBottom);
|
|
|
|
alignMenu->addAction(alignLeft);
|
|
|
|
alignMenu->addAction(alignRight);
|
2006-11-06 06:58:05 +00:00
|
|
|
alignMenu->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
alignMenu->addAction(distrHor);
|
|
|
|
alignMenu->addAction(distrVert);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
insMenu = new QMenu(tr("&Insert")); // menuBar entry insMenu
|
|
|
|
insMenu->addAction(insWire);
|
|
|
|
insMenu->addAction(insLabel);
|
|
|
|
insMenu->addAction(insEquation);
|
|
|
|
insMenu->addAction(insGround);
|
|
|
|
insMenu->addAction(insPort);
|
|
|
|
insMenu->addAction(setMarker);
|
|
|
|
insMenu->addAction(insEntity);
|
|
|
|
|
|
|
|
|
|
|
|
projMenu = new QMenu(tr("&Project")); // menuBar entry projMenu
|
2014-06-24 01:05:20 +08:00
|
|
|
projMenu->addAction(projNew);
|
|
|
|
projMenu->addAction(projOpen);
|
|
|
|
projMenu->addAction(addToProj);
|
|
|
|
projMenu->addAction(projClose);
|
|
|
|
projMenu->addAction(projDel);
|
2006-06-06 06:14:17 +00:00
|
|
|
projMenu->insertSeparator();
|
2014-06-24 01:05:20 +08:00
|
|
|
projMenu->addAction(createLib);
|
|
|
|
projMenu->addAction(createPkg);
|
|
|
|
projMenu->addAction(extractPkg);
|
2006-07-31 06:04:54 +00:00
|
|
|
projMenu->insertSeparator();
|
2014-06-24 01:05:20 +08:00
|
|
|
projMenu->addAction(importData);
|
|
|
|
projMenu->addAction(graph2csv);
|
2014-02-19 21:47:28 +01:00
|
|
|
projMenu->insertSeparator();
|
2014-02-26 21:40:00 +01:00
|
|
|
// TODO only enable if document is VA file
|
2014-06-24 01:05:20 +08:00
|
|
|
projMenu->addAction(buildModule);
|
|
|
|
projMenu->addAction(loadModule);
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
toolMenu = new QMenu(tr("&Tools")); // menuBar entry toolMenu
|
|
|
|
toolMenu->addAction(callEditor);
|
|
|
|
toolMenu->addAction(callFilter);
|
2014-07-10 16:07:46 +04:00
|
|
|
toolMenu->addAction(callActiveFilter);
|
2013-03-03 20:07:27 +01:00
|
|
|
toolMenu->addAction(callLine);
|
|
|
|
toolMenu->addAction(callLib);
|
|
|
|
toolMenu->addAction(callMatch);
|
|
|
|
toolMenu->addAction(callAtt);
|
2014-08-23 15:23:23 +02:00
|
|
|
toolMenu->addAction(callRes);
|
2013-03-03 20:07:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
simMenu = new QMenu(tr("&Simulation")); // menuBar entry simMenu
|
|
|
|
simMenu->addAction(simulate);
|
|
|
|
simMenu->addAction(dpl_sch);
|
|
|
|
simMenu->addAction(dcbias);
|
|
|
|
simMenu->addAction(showMsg);
|
|
|
|
simMenu->addAction(showNet);
|
|
|
|
|
|
|
|
|
|
|
|
viewMenu = new QMenu(tr("&View")); // menuBar entry viewMenu
|
|
|
|
viewMenu->addAction(magAll);
|
|
|
|
viewMenu->addAction(magOne);
|
|
|
|
viewMenu->addAction(magPlus);
|
|
|
|
viewMenu->addAction(magMinus);
|
2006-03-28 06:10:52 +00:00
|
|
|
viewMenu->insertSeparator();
|
|
|
|
viewMenu->setCheckable(true);
|
2013-03-03 20:07:27 +01:00
|
|
|
viewMenu->addAction(viewToolBar);
|
|
|
|
viewMenu->addAction(viewStatusBar);
|
|
|
|
viewMenu->addAction(viewBrowseDock);
|
|
|
|
viewMenu->addAction(viewOctaveDock);
|
|
|
|
|
|
|
|
|
|
|
|
helpMenu = new QMenu(tr("&Help")); // menuBar entry helpMenu
|
|
|
|
helpMenu->addAction(helpIndex);
|
|
|
|
helpMenu->addAction(helpGetStart);
|
2006-03-28 06:10:52 +00:00
|
|
|
helpMenu->insertSeparator();
|
2013-05-21 16:39:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Fill submenu's with filenames of PDF documents
|
2013-05-22 11:39:26 +02:00
|
|
|
QDir TechnicalDir = QDir(QucsSettings.DocDir.replace('\\','/'));
|
2013-05-23 09:55:11 +02:00
|
|
|
|
2013-05-21 16:39:04 +02:00
|
|
|
if(TechnicalDir.cd("technical"))
|
|
|
|
{
|
|
|
|
helpTechnical = new QMenu(tr("&Technical Papers"));
|
|
|
|
helpMenu->addMenu(helpTechnical);
|
|
|
|
TechnicalDir.setFilter(QDir::Files);
|
|
|
|
QStringList entries = TechnicalDir.entryList();
|
|
|
|
for(int i=0;i<entries.size();i++)
|
|
|
|
{
|
|
|
|
QAction* helpTechnicalActions = new QAction(entries[i], this);
|
2013-05-21 21:25:08 +02:00
|
|
|
helpTechnicalActions->setObjectName ( entries[i] );
|
2013-05-21 16:39:04 +02:00
|
|
|
helpTechnicalActions->setStatusTip(tr("Open ")+entries[i]);
|
|
|
|
helpTechnicalActions->setWhatsThis(tr(entries[i]+"\n\nOpen "+entries[i]));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(helpTechnicalActions, SIGNAL(triggered()), SLOT(slotHelpTechnical()));
|
2013-05-21 16:39:04 +02:00
|
|
|
helpTechnical->addAction(helpTechnicalActions);
|
|
|
|
}
|
2013-05-21 21:25:08 +02:00
|
|
|
|
2013-05-21 16:39:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//Fill submenu's with filenames of PDF documents
|
2013-05-22 11:39:26 +02:00
|
|
|
QDir ReportDir = QDir(QucsSettings.DocDir.replace('\\','/'));
|
2013-05-21 16:39:04 +02:00
|
|
|
if(ReportDir.cd("report"))
|
|
|
|
{
|
|
|
|
helpReport = new QMenu(tr("Technical &Reports"));
|
|
|
|
helpMenu->addMenu(helpReport);
|
|
|
|
ReportDir.setFilter(QDir::Files);
|
|
|
|
QStringList entries = ReportDir.entryList();
|
|
|
|
for(int i=0;i<entries.size();i++)
|
|
|
|
{
|
|
|
|
QAction* helpReportActions = new QAction(entries[i], this);
|
2013-05-21 21:25:08 +02:00
|
|
|
helpReportActions->setObjectName ( entries[i] );
|
2013-05-21 16:39:04 +02:00
|
|
|
helpReportActions->setStatusTip(tr("Open ")+entries[i]);
|
|
|
|
helpReportActions->setWhatsThis(tr(entries[i]+"\n\nOpen "+entries[i]));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(helpReportActions, SIGNAL(triggered()), SLOT(slotHelpReport()));
|
2013-05-21 16:39:04 +02:00
|
|
|
helpReport->addAction(helpReportActions);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//Fill submenu's with filenames of PDF documents
|
2013-05-22 11:39:26 +02:00
|
|
|
QDir TutorialDir = QDir(QucsSettings.DocDir.replace('\\','/'));
|
2013-05-21 16:39:04 +02:00
|
|
|
if(TutorialDir.cd("tutorial"))
|
|
|
|
{
|
|
|
|
helpTutorial = new QMenu(tr("T&utorials"));
|
|
|
|
helpMenu->addMenu(helpTutorial);
|
|
|
|
TutorialDir.setFilter(QDir::Files);
|
|
|
|
QStringList entries = TutorialDir.entryList();
|
|
|
|
for(int i=0;i<entries.size();i++)
|
|
|
|
{
|
|
|
|
QAction* helpTutorialActions = new QAction(entries[i], this);
|
2013-05-21 21:25:08 +02:00
|
|
|
helpTutorialActions->setObjectName ( entries[i] );
|
2013-05-21 16:39:04 +02:00
|
|
|
helpTutorialActions->setStatusTip(tr("Open ")+entries[i]);
|
|
|
|
helpTutorialActions->setWhatsThis(tr(entries[i]+"\n\nOpen "+entries[i]));
|
2015-01-10 23:15:41 +08:00
|
|
|
connect(helpTutorialActions, SIGNAL(triggered()), SLOT(slotHelpTutorial()));
|
2013-05-21 16:39:04 +02:00
|
|
|
helpTutorial->addAction(helpTutorialActions);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
helpMenu->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
helpMenu->addAction(helpAboutApp);
|
|
|
|
helpMenu->addAction(helpAboutQt);
|
2013-05-21 16:39:04 +02:00
|
|
|
|
2013-03-03 20:07:27 +01:00
|
|
|
|
|
|
|
menuBar()->addMenu(fileMenu);
|
|
|
|
menuBar()->addMenu(editMenu);
|
|
|
|
menuBar()->addMenu(alignMenu);
|
|
|
|
menuBar()->addMenu(insMenu);
|
|
|
|
menuBar()->addMenu(projMenu);
|
|
|
|
menuBar()->addMenu(toolMenu);
|
|
|
|
menuBar()->addMenu(simMenu);
|
|
|
|
menuBar()->addMenu(viewMenu);
|
2006-03-28 06:10:52 +00:00
|
|
|
menuBar()->insertSeparator();
|
2013-03-03 20:07:27 +01:00
|
|
|
menuBar()->addMenu(helpMenu);
|
2006-03-28 06:10:52 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2006-04-10 06:12:35 +00:00
|
|
|
// ----------------------------------------------------------
|
2006-03-28 06:10:52 +00:00
|
|
|
void QucsApp::initToolBar()
|
|
|
|
{
|
2013-03-03 20:07:27 +01:00
|
|
|
fileToolbar = new QToolBar(tr("File"));
|
|
|
|
this->addToolBar(fileToolbar);
|
|
|
|
fileToolbar->addAction(fileNew);
|
|
|
|
fileToolbar->addAction(textNew);
|
|
|
|
fileToolbar->addAction(fileOpen);
|
|
|
|
fileToolbar->addAction(fileSave);
|
|
|
|
fileToolbar->addAction(fileSaveAll);
|
|
|
|
fileToolbar->addAction(fileClose);
|
|
|
|
fileToolbar->addAction(filePrint);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
editToolbar = new QToolBar(tr("Edit"));
|
|
|
|
this->addToolBar(editToolbar);
|
|
|
|
editToolbar->addAction(editCut);
|
|
|
|
editToolbar->addAction(editCopy);
|
|
|
|
editToolbar->addAction(editPaste);
|
|
|
|
editToolbar->addAction(editDelete);
|
|
|
|
editToolbar->addAction(undo);
|
|
|
|
editToolbar->addAction(redo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
viewToolbar = new QToolBar(tr("View"));
|
|
|
|
this->addToolBar(viewToolbar);
|
|
|
|
viewToolbar->addAction(magAll);
|
|
|
|
viewToolbar->addAction(magOne);
|
|
|
|
viewToolbar->addAction(magPlus);
|
|
|
|
viewToolbar->addAction(magMinus);
|
|
|
|
|
|
|
|
|
|
|
|
workToolbar = new QToolBar(tr("Work"));
|
|
|
|
this->addToolBar(workToolbar);
|
|
|
|
workToolbar->addAction(select);
|
|
|
|
workToolbar->addAction(editActivate);
|
|
|
|
workToolbar->addAction(editMirror);
|
|
|
|
workToolbar->addAction(editMirrorY);
|
|
|
|
workToolbar->addAction(editRotate);
|
|
|
|
workToolbar->addAction(intoH);
|
|
|
|
workToolbar->addAction(popH);
|
|
|
|
workToolbar->addAction(insWire);
|
|
|
|
workToolbar->addAction(insLabel);
|
|
|
|
workToolbar->addAction(insEquation);
|
|
|
|
workToolbar->addAction(insGround);
|
|
|
|
workToolbar->addAction(insPort);
|
|
|
|
workToolbar->addAction(simulate);
|
|
|
|
workToolbar->addAction(dpl_sch);
|
|
|
|
workToolbar->addAction(setMarker);
|
2006-03-28 06:10:52 +00:00
|
|
|
workToolbar->addSeparator(); // <<<=======================
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2006-04-10 06:12:35 +00:00
|
|
|
// ----------------------------------------------------------
|
2006-03-28 06:10:52 +00:00
|
|
|
void QucsApp::initStatusBar()
|
|
|
|
{
|
|
|
|
// To reserve enough space, insert the longest text and rewrite it afterwards.
|
2006-04-10 06:12:35 +00:00
|
|
|
WarningLabel = new QLabel(tr("no warnings"), statusBar());
|
2006-03-28 06:10:52 +00:00
|
|
|
statusBar()->addWidget(WarningLabel, 0, true);
|
2006-04-10 06:12:35 +00:00
|
|
|
|
|
|
|
PositionLabel = new QLabel("0 : 0", statusBar());
|
|
|
|
PositionLabel->setAlignment(Qt::AlignRight);
|
|
|
|
statusBar()->addWidget(PositionLabel, 0, true);
|
|
|
|
|
2006-03-28 06:10:52 +00:00
|
|
|
statusBar()->message(tr("Ready."), 2000);
|
|
|
|
}
|
|
|
|
|
2006-04-10 06:12:35 +00:00
|
|
|
// ----------------------------------------------------------
|
2006-03-28 06:10:52 +00:00
|
|
|
void QucsApp::slotShowWarnings()
|
|
|
|
{
|
|
|
|
static int ResultState = 0;
|
|
|
|
|
|
|
|
if(ResultState == 0) {
|
|
|
|
QFont f = WarningLabel->font();
|
|
|
|
f.setWeight(QFont::DemiBold);
|
|
|
|
WarningLabel->setFont(f);
|
|
|
|
WarningLabel->setText(tr("Warnings in last simulation! Press F5"));
|
|
|
|
}
|
|
|
|
|
|
|
|
ResultState++;
|
|
|
|
if(ResultState & 1)
|
|
|
|
WarningLabel->setPaletteForegroundColor(Qt::red);
|
|
|
|
else
|
|
|
|
WarningLabel->setPaletteForegroundColor(Qt::black);
|
|
|
|
|
|
|
|
if(ResultState < 9)
|
|
|
|
QTimer::singleShot(500, this, SLOT(slotShowWarnings()));
|
2014-01-10 12:22:21 +00:00
|
|
|
else
|
2006-03-28 06:10:52 +00:00
|
|
|
ResultState = 0;
|
|
|
|
}
|
|
|
|
|
2006-04-10 06:12:35 +00:00
|
|
|
// ----------------------------------------------------------
|
2006-03-28 06:10:52 +00:00
|
|
|
void QucsApp::slotResetWarnings()
|
|
|
|
{
|
|
|
|
QFont f = WarningLabel->font(); // reset warning label
|
|
|
|
f.setWeight(QFont::Normal);
|
|
|
|
WarningLabel->setFont(f);
|
|
|
|
WarningLabel->setPaletteForegroundColor(Qt::black);
|
|
|
|
WarningLabel->setText(tr("no warnings"));
|
|
|
|
}
|
|
|
|
|
2006-04-10 06:12:35 +00:00
|
|
|
// ----------------------------------------------------------
|
2006-04-18 06:03:52 +00:00
|
|
|
void QucsApp::printCursorPosition(int x, int y)
|
2006-04-10 06:12:35 +00:00
|
|
|
{
|
|
|
|
PositionLabel->setText(QString::number(x)+" : "+QString::number(y));
|
|
|
|
PositionLabel->setMinimumWidth(PositionLabel->width());
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------
|
2006-03-28 06:10:52 +00:00
|
|
|
// turn Toolbar on or off
|
|
|
|
void QucsApp::slotViewToolBar(bool toggle)
|
|
|
|
{
|
|
|
|
if (toggle== false) {
|
|
|
|
fileToolbar->hide();
|
|
|
|
editToolbar->hide();
|
|
|
|
viewToolbar->hide();
|
|
|
|
workToolbar->hide();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
fileToolbar->show();
|
|
|
|
editToolbar->show();
|
|
|
|
viewToolbar->show();
|
|
|
|
workToolbar->show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-04-10 06:12:35 +00:00
|
|
|
// ----------------------------------------------------------
|
2006-03-28 06:10:52 +00:00
|
|
|
// turn Statusbar on or off
|
|
|
|
void QucsApp::slotViewStatusBar(bool toggle)
|
|
|
|
{
|
2006-07-17 06:02:57 +00:00
|
|
|
if (toggle == false)
|
|
|
|
statusBar()->hide();
|
|
|
|
else
|
|
|
|
statusBar()->show();
|
|
|
|
}
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2006-07-17 06:02:57 +00:00
|
|
|
// ----------------------------------------------------------
|
|
|
|
// turn Brwose Dock Window on or off
|
|
|
|
void QucsApp::slotViewBrowseDock(bool toggle)
|
|
|
|
{
|
|
|
|
if (toggle == false)
|
|
|
|
dock->hide();
|
|
|
|
else
|
|
|
|
dock->show();
|
|
|
|
}
|
2006-03-28 06:10:52 +00:00
|
|
|
|
2006-07-17 06:02:57 +00:00
|
|
|
// ----------------------------------------------------------
|
|
|
|
void QucsApp::slotToggleDock(bool on)
|
|
|
|
{
|
|
|
|
viewBrowseDock->blockSignals(true);
|
2014-11-23 12:24:05 +01:00
|
|
|
viewBrowseDock->setChecked(on);
|
2006-07-17 06:02:57 +00:00
|
|
|
viewBrowseDock->blockSignals(false);
|
2006-03-28 06:10:52 +00:00
|
|
|
}
|
|
|
|
|
2006-04-10 06:12:35 +00:00
|
|
|
// ----------------------------------------------------------
|
2011-03-03 18:09:11 +00:00
|
|
|
// turn Octave Dock Window on or off
|
|
|
|
void QucsApp::slotViewOctaveDock(bool toggle)
|
|
|
|
{
|
|
|
|
if(toggle) {
|
|
|
|
octDock->show();
|
|
|
|
octave->startOctave();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
octDock->hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------
|
|
|
|
void QucsApp::slotToggleOctave(bool on)
|
|
|
|
{
|
|
|
|
viewOctaveDock->blockSignals(true);
|
2014-11-23 12:24:05 +01:00
|
|
|
viewOctaveDock->setChecked(on);
|
2011-03-03 18:09:11 +00:00
|
|
|
viewOctaveDock->blockSignals(false);
|
|
|
|
}
|
|
|
|
|
2006-04-10 06:12:36 +00:00
|
|
|
// ----------------------------------------------------------
|
2006-03-28 06:10:52 +00:00
|
|
|
void QucsApp::slotHelpAbout()
|
|
|
|
{
|
|
|
|
QMessageBox::about(this, tr("About..."),
|
2014-09-02 11:59:14 +02:00
|
|
|
tr("Qucs Version")+" "+PACKAGE_VERSION+
|
|
|
|
#ifdef GIT
|
|
|
|
" ("+GIT+") " +
|
|
|
|
#endif
|
|
|
|
"\n"+
|
2006-03-28 06:10:52 +00:00
|
|
|
tr("Quite Universal Circuit Simulator")+"\n"+
|
2009-03-03 18:32:14 +00:00
|
|
|
tr("Copyright (C)")+" 2003-2009 "+
|
2006-03-28 06:10:52 +00:00
|
|
|
tr("by Michael Margraf")+"\n"+
|
2014-08-03 01:35:18 +02:00
|
|
|
tr("Copyright (C)")+" 2011-2014 "+
|
|
|
|
tr("Qucs Team")+"\n"+
|
2006-03-28 06:10:52 +00:00
|
|
|
"\nThis is free software; see the source for copying conditions."
|
|
|
|
"\nThere is NO warranty; not even for MERCHANTABILITY or "
|
|
|
|
"\nFITNESS FOR A PARTICULAR PURPOSE.\n\n"+
|
|
|
|
tr("Simulator by Stefan Jahn")+"\n"+
|
|
|
|
tr("VHDL simulator 'FreeHDL' by Edwin Naroska and Marius Vollmer")+"\n"+
|
|
|
|
tr("Special thanks to Jens Flucke and Raimund Jacob")+"\n"+
|
2006-08-21 12:49:34 +00:00
|
|
|
tr("Many thanks to Mike Brinson for correcting the VHDL output")+"\n"+
|
2006-11-02 21:45:54 +00:00
|
|
|
tr("GUI improvements by Gopala Krishna A")+"\n"+
|
2014-08-03 01:35:18 +02:00
|
|
|
tr("Verilog-AMS interface by Helene Parruitte")+"\n"+
|
|
|
|
tr("Verilog-AMS dynamic loader by Guilherme Brondani Torri")+"\n\n"+
|
2006-03-28 06:10:52 +00:00
|
|
|
tr("Translations:")+"\n"+
|
|
|
|
tr("German by Stefan Jahn")+"\n"+
|
|
|
|
tr("Polish by Dariusz Pienkowski")+"\n"+
|
|
|
|
tr("Romanian by Radu Circa")+"\n"+
|
|
|
|
tr("French by Vincent Habchi, F5RCS")+"\n"+
|
2014-08-03 01:35:18 +02:00
|
|
|
tr("Portuguese by Luciano Franca, Helio de Sousa, Guilherme Brondani Torri")+"\n"+
|
2006-03-28 06:10:52 +00:00
|
|
|
tr("Spanish by Jose L. Redrejo Rodriguez")+"\n"+
|
|
|
|
tr("Japanese by Toyoyuki Ishikawa")+"\n"+
|
|
|
|
tr("Italian by Giorgio Luparia and Claudio Girardi")+"\n"+
|
|
|
|
tr("Hebrew by Dotan Nahum")+"\n"+
|
|
|
|
tr("Swedish by Peter Landgren")+"\n"+
|
|
|
|
tr("Turkish by Onur and Ozgur Cobanoglu")+"\n"+
|
2006-04-19 06:56:21 +00:00
|
|
|
tr("Hungarian by Jozsef Bus")+"\n"+
|
2006-09-05 07:28:48 +00:00
|
|
|
tr("Russian by Igor Gorbounov")+"\n"+
|
2006-10-20 09:22:56 +00:00
|
|
|
tr("Czech by Marek Straka")+"\n"+
|
2009-04-07 20:49:30 +00:00
|
|
|
tr("Catalan by Antoni Subirats")+"\n"+
|
2009-05-17 18:12:43 +00:00
|
|
|
tr("Arabic by Chabane Noureddine")+"\n"+
|
|
|
|
tr("Kazakh by Erbol Keshubaev"));
|
2006-03-28 06:10:52 +00:00
|
|
|
}
|