Skip to content

Commit

Permalink
modify include, change function call to slot
Browse files Browse the repository at this point in the history
  • Loading branch information
yodalee authored and andresmmera committed Sep 9, 2016
1 parent 22ce541 commit b5aceda
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
19 changes: 11 additions & 8 deletions qucs/qucs/dialogs/qucsshortcutdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* *
***************************************************************************/

#include <QtGui>

#include "qucsshortcutdialog.h"
#include "keysequenceedit.h"
#include "main.h"
Expand All @@ -25,14 +23,19 @@
#include <QHBoxLayout>
#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QTableWidget>
#include <QListWidget>
#include <QFileDialog>
#include <QMessageBox>
#include <QHeaderView>

#include <QDebug>

QucsShortcutDialog::QucsShortcutDialog(QucsApp *parent, const char *name)
: QDialog(parent, name)
QucsShortcutDialog::QucsShortcutDialog(QWidget *parent)
: QDialog(parent)
{
qDebug() << "open shortcut dialog";
App = parent;
setWindowTitle(tr("Edit Qucs Shortcuts"));
invalidKeys << "Esc";

Expand Down Expand Up @@ -99,8 +102,9 @@ QucsShortcutDialog::QucsShortcutDialog(QucsApp *parent, const char *name)

this->setLayout(all);

connect(menuList, SIGNAL(itemClicked(QListWidgetItem*))
, this, SLOT(slotChooseMenu()));
connect(menuList, SIGNAL(itemClicked(QListWidgetItem*)),
this, SLOT(slotChooseMenu()));
connect(this, SIGNAL(accepted()), parent, SLOT(slotSetAllShortcut()));

//fill initial value
fillMenu();
Expand Down Expand Up @@ -191,7 +195,6 @@ QucsShortcutDialog::slotDefaultShortcut()
void
QucsShortcutDialog::slotOK()
{
App->setAllShortcut();
accept();
}

Expand Down
6 changes: 1 addition & 5 deletions qucs/qucs/dialogs/qucsshortcutdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

#include <QDialog>

#include "qucs.h"

class QListWidget;
class QTableWidget;
class QLabel;
Expand All @@ -32,7 +30,7 @@ class QucsShortcutDialog : public QDialog
{
Q_OBJECT
public:
QucsShortcutDialog(QucsApp *parent = 0, const char *name = 0);
QucsShortcutDialog(QWidget *parent = 0);
virtual ~QucsShortcutDialog ();
private slots:
void slotChooseMenu();
Expand All @@ -59,8 +57,6 @@ private slots:
QString conflictKey;
QStringList invalidKeys;

QucsApp *App;

QListWidget *menuList;
QTableWidget *actionList;
QLabel *messageLabel;
Expand Down
2 changes: 1 addition & 1 deletion qucs/qucs/qucs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ QucsApp::QucsApp()

initView();
initActions();
setAllShortcut();
slotSetAllShortcut();
initMenuBar();
initToolBar();
initStatusBar();
Expand Down
2 changes: 1 addition & 1 deletion qucs/qucs/qucs.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,14 @@ private slots:
void updatePathList(QStringList);
void updateSchNameHash(void); // maps all schematic files in the path list
void updateSpiceNameHash(void); // maps all spice files in the path list
void setAllShortcut();

/* **************************************************
***** The following methods are located in *****
***** "qucs_init.cpp". *****
************************************************** */

public slots:
void slotSetAllShortcut();
void slotShowWarnings();
void slotResetWarnings();
void printCursorPosition(int, int);
Expand Down
2 changes: 1 addition & 1 deletion qucs/qucs/qucs_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ clearShortcutMap()

// set Shortcut value to each action
void
QucsApp::setAllShortcut()
QucsApp::slotSetAllShortcut()
{
QVector<QPair<QString, QMap<QString, QString>* > >* vec = &QucsSettings.Shortcut;
QMap<QString, QString> *map = NULL;
Expand Down

0 comments on commit b5aceda

Please sign in to comment.