Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QtGui>
- #include <QDebug>
- #include "CModEditor.h"
- CModEditor::CModEditor(QWidget *parent)
- : QWidget(parent)
- , mainWnd( (QMainWindow*)parent )
- {
- createActions();
- createToolBars();
- interCom();
- }
- void CModEditor::cut()
- {
- qDebug() << "cut";
- }
- void CModEditor::createActions()
- {
- cutAct = new QAction(tr("Cu&t"), this);
- cutAct->setShortcuts(QKeySequence::Cut);
- cutAct->setStatusTip(tr("Cut the current selection's contents to the clipboard"));
- }
- void CModEditor::createToolBars()
- {
- editToolBar = mainWnd->addToolBar(tr("Edit"));
- editToolBar->addAction(cutAct);
- editToolBar->setIconSize(QSize(16, 16));
- }
- void CModEditor::interCom()
- {
- connect(cutAct, SIGNAL(triggered()), this, SLOT(cut()));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement