aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--debugger/QT/SkCanvasWidget.cpp16
-rw-r--r--debugger/QT/SkCanvasWidget.h6
-rw-r--r--debugger/QT/SkDebuggerGUI.cpp245
-rw-r--r--debugger/QT/SkDebuggerGUI.h18
-rw-r--r--debugger/QT/SkSettingsWidget.cpp165
-rw-r--r--debugger/QT/SkSettingsWidget.h49
-rw-r--r--debugger/QT/moc_SkCanvasWidget.cpp36
-rw-r--r--debugger/QT/moc_SkDebuggerGUI.cpp107
-rw-r--r--debugger/QT/moc_SkInspectorWidget.cpp2
-rw-r--r--debugger/QT/moc_SkSettingsWidget.cpp51
10 files changed, 445 insertions, 250 deletions
diff --git a/debugger/QT/SkCanvasWidget.cpp b/debugger/QT/SkCanvasWidget.cpp
index c38fdbb810..fe8db94dbd 100644
--- a/debugger/QT/SkCanvasWidget.cpp
+++ b/debugger/QT/SkCanvasWidget.cpp
@@ -31,7 +31,7 @@ SkCanvasWidget::SkCanvasWidget(QWidget *parent) :
fCanvas = new SkCanvas(fDevice);
fDebugCanvas = new SkDebugCanvas();
- fScaleFactor = 1;
+ fScaleFactor = 1.0;
fIndex = 0;
fPreviousPoint.set(0,0);
fTransform.set(0,0);
@@ -55,7 +55,7 @@ void SkCanvasWidget::resizeEvent(QResizeEvent* event) {
fDevice = new SkDevice(fBitmap);
fCanvas = new SkCanvas(fDevice);
- fDebugCanvas->drawTo(fCanvas, fIndex);
+ drawTo(fIndex);
this->update();
}
@@ -70,6 +70,7 @@ void SkCanvasWidget::drawTo(int fIndex) {
fCanvas->scale(fScaleFactor, fScaleFactor);
}
+ emit commandChanged(fIndex);
fDebugCanvas->drawTo(fCanvas, fIndex+1);
this->update();
this->fIndex = fIndex;
@@ -119,7 +120,7 @@ void SkCanvasWidget::mouseMoveEvent(QMouseEvent* event) {
fPreviousPoint = eventPoint;
// TODO(chudy): Fix and remove +1 from drawTo calls.
- drawTo(fIndex+1);
+ drawTo(fIndex);
this->update();
}
@@ -129,8 +130,9 @@ void SkCanvasWidget::mousePressEvent(QMouseEvent* event) {
void SkCanvasWidget::mouseDoubleClickEvent(QMouseEvent* event) {
fTransform.set(0,0);
- fScaleFactor = 0;
- drawTo(fIndex+1);
+ fScaleFactor = 1.0;
+ emit scaleFactorChanged(fScaleFactor);
+ drawTo(fIndex);
this->update();
}
@@ -160,7 +162,9 @@ void SkCanvasWidget::wheelEvent(QWheelEvent* event) {
fScaleFactor += (event->delta()/120) * 2;
}
+ emit scaleFactorChanged(fScaleFactor);
+
// TODO(chudy): Fix and remove +1 from drawTo calls.
- drawTo(fIndex+1);
+ drawTo(fIndex);
this->update();
}
diff --git a/debugger/QT/SkCanvasWidget.h b/debugger/QT/SkCanvasWidget.h
index bfe517e798..3f18749786 100644
--- a/debugger/QT/SkCanvasWidget.h
+++ b/debugger/QT/SkCanvasWidget.h
@@ -129,6 +129,10 @@ public:
void wheelEvent(QWheelEvent* event);
+signals:
+ void scaleFactorChanged(float newScaleFactor);
+ void commandChanged(int newCommand);
+
protected:
/**
Draws the current state of the widget.
@@ -146,7 +150,7 @@ private:
SkIPoint fTransform;
int fIndex;
- int fScaleFactor;
+ float fScaleFactor;
};
#endif
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 4c00f0ed60..0729ac9b29 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2012 Google Inc.
*
@@ -11,42 +10,57 @@
#include <QListWidgetItem>
SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) :
- QMainWindow(parent) {
+ QMainWindow(parent) {
setupUi(this);
connect(fListWidget, SIGNAL(currentItemChanged(QListWidgetItem*,
- QListWidgetItem*)), this, SLOT(registerListClick(QListWidgetItem *)));
+ QListWidgetItem*)), this,
+ SLOT(registerListClick(QListWidgetItem *)));
connect(fActionOpen, SIGNAL(triggered()), this, SLOT(openFile()));
- connect(fActionDirectory, SIGNAL(triggered()), this, SLOT(toggleDirectory()));
+ connect(fActionDirectory, SIGNAL(triggered()), this,
+ SLOT(toggleDirectory()));
connect(fDirectoryWidget, SIGNAL(currentItemChanged(QListWidgetItem*,
- QListWidgetItem*)), this, SLOT(loadFile(QListWidgetItem *)));
+ QListWidgetItem*)), this,
+ SLOT(loadFile(QListWidgetItem *)));
connect(fActionDelete, SIGNAL(triggered()), this, SLOT(actionDelete()));
connect(fActionReload, SIGNAL(triggered()), this, SLOT(actionReload()));
- connect(fListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(toggleBreakpoint()));
+ connect(fListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this,
+ SLOT(toggleBreakpoint()));
connect(fActionRewind, SIGNAL(triggered()), this, SLOT(actionRewind()));
connect(fActionPlay, SIGNAL(triggered()), this, SLOT(actionPlay()));
connect(fActionStepBack, SIGNAL(triggered()), this, SLOT(actionStepBack()));
- connect(fActionStepForward, SIGNAL(triggered()), this, SLOT(actionStepForward()));
- connect(fActionBreakpoint, SIGNAL(triggered()), this, SLOT(actionBreakpoints()));
- connect(fActionInspector, SIGNAL(triggered()), this, SLOT(actionInspector()));
- connect(fFilter, SIGNAL(activated(QString)), this, SLOT(toggleFilter(QString)));
+ connect(fActionStepForward, SIGNAL(triggered()), this,
+ SLOT(actionStepForward()));
+ connect(fActionBreakpoint, SIGNAL(triggered()), this,
+ SLOT(actionBreakpoints()));
+ connect(fActionInspector, SIGNAL(triggered()), this,
+ SLOT(actionInspector()));
+ connect(fFilter, SIGNAL(activated(QString)), this,
+ SLOT(toggleFilter(QString)));
connect(fActionCancel, SIGNAL(triggered()), this, SLOT(actionCancel()));
connect(fActionClose, SIGNAL(triggered()), this, SLOT(actionClose()));
connect(fActionSettings, SIGNAL(triggered()), this, SLOT(actionSettings()));
- connect(fActionToggleCurrentCommand, SIGNAL(triggered()), this, SLOT(actionCommandFilter()));
+ connect(fSettingsWidget->getVisibilityButton(), SIGNAL(toggled(bool)), this,
+ SLOT(actionCommandFilter()));
+ connect(fCanvasWidget, SIGNAL(scaleFactorChanged(float)), this,
+ SLOT(actionScale(float)));
+ connect(fSettingsWidget->getCommandCheckBox(), SIGNAL(stateChanged(int)),
+ this, SLOT(pauseDrawing(int)));
+ connect(fCanvasWidget, SIGNAL(commandChanged(int)), fSettingsWidget,
+ SLOT(updateCommand(int)));
}
SkDebuggerGUI::~SkDebuggerGUI() {
}
void SkDebuggerGUI::actionBreakpoints() {
- if(!fBreakpointsActivated) {
+ if (!fBreakpointsActivated) {
fBreakpointsActivated = true;
} else {
fBreakpointsActivated = false;
}
- for(int row=0; row<fListWidget->count(); row++) {
+ for (int row = 0; row < fListWidget->count(); row++) {
QListWidgetItem *item = fListWidget->item(row);
if (item->checkState() == Qt::Unchecked && fBreakpointsActivated) {
@@ -58,22 +72,14 @@ void SkDebuggerGUI::actionBreakpoints() {
}
void SkDebuggerGUI::actionCancel() {
- for(int row=0; row<fListWidget->count(); row++) {
+ for (int row = 0; row < fListWidget->count(); row++) {
fListWidget->item(row)->setHidden(false);
}
}
void SkDebuggerGUI::actionCommandFilter() {
- if (fActionToggleCurrentCommand->text() == "Show Filter") {
- fCanvasWidget->toggleCurrentCommandFilter(true);
- fActionToggleCurrentCommand->setText("Hide Filter");
- } else {
- fActionToggleCurrentCommand->setText("Show Filter");
- fCanvasWidget->toggleCurrentCommandFilter(false);
- }
-
+ fCanvasWidget->toggleCurrentCommandFilter(fSettingsWidget->getVisibilityButton()->isChecked());
fCanvasWidget->drawTo(fListWidget->currentRow());
-
}
void SkDebuggerGUI::actionClose() {
@@ -82,26 +88,20 @@ void SkDebuggerGUI::actionClose() {
void SkDebuggerGUI::actionDelete() {
QListWidgetItem* item = fListWidget->currentItem();
-
- if(item->data(Qt::UserRole + 2) == true) {
+ if (item->data(Qt::UserRole + 2) == true) {
item->setData(Qt::UserRole + 2, false);
- item->setData(Qt::DecorationRole,
- QPixmap(":/images/Icons/delete.png"));
-
+ item->setData(Qt::DecorationRole, QPixmap(":/images/Icons/delete.png"));
} else {
item->setData(Qt::UserRole + 2, true);
- if(item->checkState() == Qt::Unchecked) {
+ if (item->checkState() == Qt::Unchecked) {
item->setData(Qt::DecorationRole,
QPixmap(":/images/Icons/blank.png"));
} else {
item->setData(Qt::DecorationRole,
QPixmap(":/images/Icons/breakpoint_16x16.png"));
}
-
}
-
int currentRow = fListWidget->currentRow();
-
// NOTE(chudy): Forces a redraw up to current selected command.
if (fCanvasWidget) {
fCanvasWidget->toggleCommand(currentRow);
@@ -118,26 +118,24 @@ void SkDebuggerGUI::actionInspector() {
}
void SkDebuggerGUI::actionPlay() {
- for(int row=fListWidget->currentRow()+1; row<fListWidget->count(); row++) {
+ for (int row = fListWidget->currentRow() + 1; row < fListWidget->count();
+ row++) {
QListWidgetItem *item = fListWidget->item(row);
if (item->checkState() == Qt::Checked) {
fListWidget->setCurrentItem(item);
return;
}
}
-
fListWidget->setCurrentRow(fListWidget->count() - 1);
}
void SkDebuggerGUI::actionReload() {
- for(int row=0; row<fListWidget->count(); row++) {
+ for (int row = 0; row < fListWidget->count(); row++) {
QListWidgetItem* item = fListWidget->item(row);
item->setData(Qt::UserRole + 2, true);
- item->setData(Qt::DecorationRole,
- QPixmap(":/images/Icons/blank.png"));
+ item->setData(Qt::DecorationRole, QPixmap(":/images/Icons/blank.png"));
fCanvasWidget->toggleCommand(row, true);
}
-
fCanvasWidget->drawTo(fListWidget->currentRow());
}
@@ -147,6 +145,10 @@ void SkDebuggerGUI::actionRewind() {
fListWidget->setCurrentRow(2);
}
+void SkDebuggerGUI::actionScale(float scaleFactor) {
+ fSettingsWidget->setZoomText(scaleFactor);
+}
+
void SkDebuggerGUI::actionSettings() {
if (fSettingsWidget->isHidden()) {
fSettingsWidget->setHidden(false);
@@ -164,11 +166,8 @@ void SkDebuggerGUI::actionStepBack() {
void SkDebuggerGUI::actionStepForward() {
int currentRow = fListWidget->currentRow();
-
QString curRow = QString::number(currentRow);
QString curCount = QString::number(fListWidget->count());
-
-
if (currentRow < fListWidget->count() - 1) {
fListWidget->setCurrentRow(currentRow + 1);
}
@@ -185,9 +184,8 @@ void SkDebuggerGUI::loadFile(QListWidgetItem *item) {
}
void SkDebuggerGUI::openFile() {
- QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
- "",
- tr("Files (*.*)"));
+ QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), "",
+ tr("Files (*.*)"));
fDirectoryWidgetActive = false;
if (!fileName.isNull()) {
QFileInfo pathInfo(fileName);
@@ -195,39 +193,42 @@ void SkDebuggerGUI::openFile() {
loadPicture(fileName);
setupDirectoryWidget();
}
- /* TODO(chudy): Need something here that sets the active directory
- * widget selection to what was opened. OR we can just add a new function
- * to change the directory (would be much easier).
- */
fDirectoryWidgetActive = true;
}
+void SkDebuggerGUI::pauseDrawing(int state) {
+ // Qt uses 0 for unchecked, 1 for partially enabled and 2 for checked.
+ if (state == 2) {
+ fPause = true;
+ } else {
+ fPause = false;
+ fCanvasWidget->drawTo(fListWidget->currentRow());
+ }
+}
+
void SkDebuggerGUI::registerListClick(QListWidgetItem *item) {
int currentRow = fListWidget->currentRow();
-
- // NOTE(chudy): Prevents initialization errors.
- if (fCanvasWidget) {
+ if (!fPause) {
fCanvasWidget->drawTo(currentRow);
- std::vector<std::string> *v =
- fCanvasWidget->getCurrentCommandInfo(currentRow);
-
-
- /* TODO(chudy): Add command type before parameters. Rename v
- * to something more informative. */
- if (v) {
- std::vector<std::string>::iterator it;
-
- QString info;
- info.append("<b>Parameters: </b><br/>");
- for (it = v->begin(); it != v->end(); ++it) {
- info.append(QString((*it).c_str()));
- info.append("<br/>");
- }
- fInspectorWidget->setDetailText(info);
- fInspectorWidget->setDisabled(false);
- fInspectorWidget->setMatrix(fCanvasWidget->getCurrentMatrix());
- fInspectorWidget->setClip(fCanvasWidget->getCurrentClip());
+ }
+ std::vector<std::string> *v = fCanvasWidget->getCurrentCommandInfo(
+ currentRow);
+
+ /* TODO(chudy): Add command type before parameters. Rename v
+ * to something more informative. */
+ if (v) {
+ std::vector<std::string>::iterator it;
+
+ QString info;
+ info.append("<b>Parameters: </b><br/>");
+ for (it = v->begin(); it != v->end(); ++it) {
+ info.append(QString((*it).c_str()));
+ info.append("<br/>");
}
+ fInspectorWidget->setDetailText(info);
+ fInspectorWidget->setDisabled(false);
+ fInspectorWidget->setMatrix(fCanvasWidget->getCurrentMatrix());
+ fInspectorWidget->setClip(fCanvasWidget->getCurrentClip());
}
}
@@ -236,18 +237,16 @@ void SkDebuggerGUI::toggleBreakpoint() {
if (item->checkState() == Qt::Unchecked) {
item->setCheckState(Qt::Checked);
-
/* NOTE(chudy): If the command is toggled as hidden that takes
* precendence over the breakpoint icon.
*/
- if(item->data(Qt::UserRole + 2) == false) {
+ if (item->data(Qt::UserRole + 2) == false) {
item->setData(Qt::DecorationRole,
QPixmap(":/images/Icons/delete.png"));
} else {
item->setData(Qt::DecorationRole,
QPixmap(":/images/Icons/breakpoint_16x16.png"));
}
-
} else {
/* NOTE(chudy): When untoggling as a breakpoint if the command
@@ -255,14 +254,13 @@ void SkDebuggerGUI::toggleBreakpoint() {
*/
item->setCheckState(Qt::Unchecked);
- if(item->data(Qt::UserRole + 2) == false) {
+ if (item->data(Qt::UserRole + 2) == false) {
item->setData(Qt::DecorationRole,
QPixmap(":/images/Icons/delete.png"));
} else {
item->setData(Qt::DecorationRole,
QPixmap(":/images/Icons/blank.png"));
}
-
}
}
@@ -275,7 +273,7 @@ void SkDebuggerGUI::toggleDirectory() {
}
void SkDebuggerGUI::toggleFilter(QString string) {
- for(int row=0; row<fListWidget->count(); row++) {
+ for (int row = 0; row < fListWidget->count(); row++) {
QListWidgetItem *item = fListWidget->item(row);
if (item->text() == string) {
item->setHidden(false);
@@ -287,89 +285,102 @@ void SkDebuggerGUI::toggleFilter(QString string) {
void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) {
QIcon windowIcon;
- windowIcon.addFile(QString::fromUtf8(":/images/Icons/skia.png"), QSize(), QIcon::Normal, QIcon::Off);
+ windowIcon.addFile(QString::fromUtf8(":/images/Icons/skia.png"), QSize(),
+ QIcon::Normal, QIcon::Off);
SkDebuggerGUI->setObjectName(QString::fromUtf8("SkDebuggerGUI"));
SkDebuggerGUI->resize(1200, 1000);
SkDebuggerGUI->setWindowIcon(windowIcon);
QIcon open;
- open.addFile(QString::fromUtf8(":/images/Icons/package-br32.png"), QSize(), QIcon::Normal, QIcon::Off);
+ open.addFile(QString::fromUtf8(":/images/Icons/package-br32.png"), QSize(),
+ QIcon::Normal, QIcon::Off);
fActionOpen = new QAction(SkDebuggerGUI);
fActionOpen->setObjectName(QString::fromUtf8("actionOpen"));
fActionOpen->setIcon(open);
QIcon directory;
- directory.addFile(QString::fromUtf8(":/images/Icons/drawer-open-icon.png"), QSize(), QIcon::Normal, QIcon::Off);
+ directory.addFile(QString::fromUtf8(":/images/Icons/drawer-open-icon.png"),
+ QSize(), QIcon::Normal, QIcon::Off);
fActionDirectory = new QAction(SkDebuggerGUI);
fActionDirectory->setObjectName(QString::fromUtf8("actionDirectory"));
fActionDirectory->setIcon(directory);
fActionDirectory->setText("Toggle Directory");
QIcon rewind;
- rewind.addFile(QString::fromUtf8(":/images/Icons/rewind.png"), QSize(), QIcon::Normal, QIcon::Off);
+ rewind.addFile(QString::fromUtf8(":/images/Icons/rewind.png"), QSize(),
+ QIcon::Normal, QIcon::Off);
fActionRewind = new QAction(SkDebuggerGUI);
fActionRewind->setObjectName(QString::fromUtf8("actionRewind"));
fActionRewind->setIcon(rewind);
fActionRewind->setText("Rewind");
QIcon stepBack;
- stepBack.addFile(QString::fromUtf8(":/images/Icons/back.png"), QSize(), QIcon::Normal, QIcon::Off);
+ stepBack.addFile(QString::fromUtf8(":/images/Icons/back.png"), QSize(),
+ QIcon::Normal, QIcon::Off);
fActionStepBack = new QAction(SkDebuggerGUI);
fActionStepBack->setObjectName(QString::fromUtf8("actionStepBack"));
fActionStepBack->setIcon(stepBack);
fActionStepBack->setText("Step Back");
QIcon stepForward;
- stepForward.addFile(QString::fromUtf8(":/images/Icons/go-next.png"), QSize(), QIcon::Normal, QIcon::Off);
+ stepForward.addFile(QString::fromUtf8(":/images/Icons/go-next.png"),
+ QSize(), QIcon::Normal, QIcon::Off);
fActionStepForward = new QAction(SkDebuggerGUI);
fActionStepForward->setObjectName(QString::fromUtf8("actionStepBack"));
fActionStepForward->setIcon(stepForward);
fActionStepForward->setText("Step Forward");
QIcon play;
- play.addFile(QString::fromUtf8(":/images/Icons/play.png"), QSize(), QIcon::Normal, QIcon::Off);
+ play.addFile(QString::fromUtf8(":/images/Icons/play.png"), QSize(),
+ QIcon::Normal, QIcon::Off);
fActionPlay = new QAction(SkDebuggerGUI);
fActionPlay->setObjectName(QString::fromUtf8("actionPlay"));
fActionPlay->setIcon(play);
fActionPlay->setText("Play");
QIcon breakpoint;
- breakpoint.addFile(QString::fromUtf8(":/images/Icons/breakpoint.png"), QSize(), QIcon::Normal, QIcon::Off);
+ breakpoint.addFile(QString::fromUtf8(":/images/Icons/breakpoint.png"),
+ QSize(), QIcon::Normal, QIcon::Off);
fActionBreakpoint = new QAction(SkDebuggerGUI);
fActionBreakpoint->setObjectName(QString::fromUtf8("actionBreakpoint"));
fActionBreakpoint->setIcon(breakpoint);
fActionBreakpoint->setText("Show Breakpoints");
QIcon inspector;
- inspector.addFile(QString::fromUtf8(":/images/Icons/inspector.png"), QSize(), QIcon::Normal, QIcon::Off);
+ inspector.addFile(QString::fromUtf8(":/images/Icons/inspector.png"),
+ QSize(), QIcon::Normal, QIcon::Off);
fActionInspector = new QAction(SkDebuggerGUI);
fActionInspector->setObjectName(QString::fromUtf8("actionInspector"));
fActionInspector->setIcon(inspector);
fActionInspector->setText("Inspector");
QIcon deleteIcon;
- deleteIcon.addFile(QString::fromUtf8(":/images/Icons/delete.png"), QSize(), QIcon::Normal, QIcon::Off);
+ deleteIcon.addFile(QString::fromUtf8(":/images/Icons/delete.png"), QSize(),
+ QIcon::Normal, QIcon::Off);
fActionDelete = new QAction(SkDebuggerGUI);
fActionDelete->setObjectName(QString::fromUtf8("actionDelete"));
fActionDelete->setIcon(deleteIcon);
fActionDelete->setText("Delete Command");
QIcon reload;
- reload.addFile(QString::fromUtf8(":/images/Icons/reload.png"), QSize(), QIcon::Normal, QIcon::Off);
+ reload.addFile(QString::fromUtf8(":/images/Icons/reload.png"), QSize(),
+ QIcon::Normal, QIcon::Off);
fActionReload = new QAction(SkDebuggerGUI);
fActionReload->setObjectName(QString::fromUtf8("actionReload"));
fActionReload->setIcon(reload);
fActionReload->setText("Reset Picture");
QIcon settings;
- settings.addFile(QString::fromUtf8(":/images/Icons/settings.png"), QSize(), QIcon::Normal, QIcon::Off);
+ settings.addFile(QString::fromUtf8(":/images/Icons/settings.png"), QSize(),
+ QIcon::Normal, QIcon::Off);
fActionSettings = new QAction(SkDebuggerGUI);
fActionSettings->setObjectName(QString::fromUtf8("actionSettings"));
fActionSettings->setIcon(settings);
fActionSettings->setText("Settings");
QIcon cancel;
- cancel.addFile(QString::fromUtf8(":/images/Icons/reset.png"), QSize(), QIcon::Normal, QIcon::Off);
+ cancel.addFile(QString::fromUtf8(":/images/Icons/reset.png"), QSize(),
+ QIcon::Normal, QIcon::Off);
fActionCancel = new QAction(SkDebuggerGUI);
fActionCancel->setObjectName(QString::fromUtf8("actionCancel"));
fActionCancel->setIcon(cancel);
@@ -398,7 +409,8 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) {
fInspectorWidget = new SkInspectorWidget();
fInspectorWidget->setObjectName(QString::fromUtf8("inspectorWidget"));
- fInspectorWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ fInspectorWidget->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Expanding);
fInspectorWidget->setMaximumHeight(300);
fFilter = new QComboBox(fCentralWidget);
@@ -414,10 +426,12 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) {
fVerticalLayout_2->addWidget(fDirectoryWidget);
fCanvasWidget = new SkCanvasWidget(fCentralWidget);
- fCanvasWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ fCanvasWidget->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Expanding);
fSettingsWidget = new SkSettingsWidget(fCentralWidget);
- fSettingsWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ fSettingsWidget->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Expanding);
fSettingsWidget->setMaximumWidth(250);
fSettingsWidget->setHidden(true);
@@ -468,7 +482,7 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) {
// TODO(chudy): Remove static call.
fDirectoryWidgetActive = false;
- fPath= "/usr/local/google/home/chudy/trunk-linux/debugger/skp";
+ fPath = "/usr/local/google/home/chudy/trunk-linux/debugger/skp";
setupDirectoryWidget();
fDirectoryWidgetActive = true;
@@ -484,15 +498,6 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) {
fMenuFile->addAction(fActionOpen);
fMenuFile->addAction(fActionClose);
- // View
- fMenuView = new QMenu(SkDebuggerGUI);
- fMenuView->setTitle("View");
-
- fActionToggleCurrentCommand = new QAction(SkDebuggerGUI);
- fActionToggleCurrentCommand->setText("Show Filter");
-
- fMenuView->addAction(fActionToggleCurrentCommand);
-
// Navigate
fMenuNavigate = new QMenu(SkDebuggerGUI);
fMenuNavigate->setTitle("Navigate");
@@ -505,9 +510,10 @@ void SkDebuggerGUI::setupUi(QMainWindow *SkDebuggerGUI) {
// Menu Bar
fMenuBar->addAction(fMenuFile->menuAction());
- fMenuBar->addAction(fMenuView->menuAction());
fMenuBar->addAction(fMenuNavigate->menuAction());
+ fPause = false;
+
SkDebuggerGUI->setMenuBar(fMenuBar);
retranslateUi(SkDebuggerGUI);
@@ -520,20 +526,36 @@ void SkDebuggerGUI::setupDirectoryWidget() {
fDirectoryWidget->clear();
const QStringList files = fDir->entryList();
foreach (QString f, files) {
- if (f.contains(r)) fDirectoryWidget->addItem(f);
+ if (f.contains(r))
+ fDirectoryWidget->addItem(f);
}
}
// TODO(chudy): Is this necessary?
void SkDebuggerGUI::retranslateUi(QMainWindow *SkDebuggerGUI) {
- SkDebuggerGUI->setWindowTitle(QApplication::translate("SkDebuggerGUI", "SkDebuggerGUI", 0, QApplication::UnicodeUTF8));
- fActionOpen->setText(QApplication::translate("SkDebuggerGUI", "Open", 0, QApplication::UnicodeUTF8));
- fToolBar->setWindowTitle(QApplication::translate("SkDebuggerGUI", "toolBar", 0, QApplication::UnicodeUTF8));
+ SkDebuggerGUI->setWindowTitle(
+ QApplication::translate("SkDebuggerGUI", "SkDebuggerGUI", 0,
+ QApplication::UnicodeUTF8));
+ fActionOpen->setText(
+ QApplication::translate("SkDebuggerGUI", "Open", 0,
+ QApplication::UnicodeUTF8));
+ fToolBar->setWindowTitle(
+ QApplication::translate("SkDebuggerGUI", "toolBar", 0,
+ QApplication::UnicodeUTF8));
}
void SkDebuggerGUI::loadPicture(QString fileName) {
fCanvasWidget->loadPicture(fileName);
std::vector<std::string> *cv = fCanvasWidget->getDrawCommands();
+ /* fDebugCanvas is reinitialized every load picture. Need it to retain value
+ * of the visibility filter. */
+ actionCommandFilter();
+
+ fCanvasWidget->toggleCurrentCommandFilter(fSettingsWidget->getVisibilityButton()->isChecked());
+
+
+
+
setupListWidget(cv);
setupComboBox(cv);
}
@@ -561,12 +583,13 @@ void SkDebuggerGUI::setupComboBox(std::vector<std::string>* cv) {
QString overview;
int counter;
- for(std::map<std::string, int>::iterator it = map.begin(); it != map.end(); ++it) {
+ for (std::map<std::string, int>::iterator it = map.begin(); it != map.end();
+ ++it) {
overview.append((it->first).c_str());
overview.append(": ");
overview.append(QString::number(it->second));
overview.append("<br/>");
- counter+=it->second;
+ counter += it->second;
fFilter->addItem((it->first).c_str());
}
QString total;
@@ -586,8 +609,8 @@ void SkDebuggerGUI::setupComboBox(std::vector<std::string>* cv) {
fInspectorWidget->setOverviewText(overview);
// NOTE(chudy): Makes first item unselectable.
- QStandardItemModel* model =
- qobject_cast<QStandardItemModel*>(fFilter->model());
+ QStandardItemModel* model = qobject_cast<QStandardItemModel*>(
+ fFilter->model());
QModelIndex firstIndex = model->index(0, fFilter->modelColumn(),
fFilter->rootModelIndex());
QStandardItem* firstItem = model->itemFromIndex(firstIndex);
diff --git a/debugger/QT/SkDebuggerGUI.h b/debugger/QT/SkDebuggerGUI.h
index 520aaa84e3..4b8a151d3e 100644
--- a/debugger/QT/SkDebuggerGUI.h
+++ b/debugger/QT/SkDebuggerGUI.h
@@ -49,6 +49,9 @@ public:
~SkDebuggerGUI();
+signals:
+ void commandChanged(int command);
+
private slots:
/**
Toggles breakpoint view in the list widget.
@@ -97,6 +100,11 @@ private slots:
void actionRewind();
/**
+ Sends the scale factor information to the settings widget.
+ */
+ void actionScale(float scaleFactor);
+
+ /**
Toggles the settings widget visibility.
*/
void actionSettings();
@@ -123,6 +131,12 @@ private slots:
void openFile();
/**
+ Toggles whether drawing to a new command requires a double click
+ or simple focus.
+ */
+ void pauseDrawing(int state);
+
+ /**
Executes draw commands up to the selected command
*/
void registerListClick(QListWidgetItem *item);
@@ -184,13 +198,11 @@ private:
QAction* fActionQuit;
QAction* fActionTemp;
- QMenu* fMenuView;
- QAction* fActionToggleCurrentCommand;
-
QMenu* fMenuNavigate;
QAction *fActionGoToLine;
bool fBreakpointsActivated;
+ bool fPause;
/**
Creates the entire UI.
diff --git a/debugger/QT/SkSettingsWidget.cpp b/debugger/QT/SkSettingsWidget.cpp
index 0c94b3dc25..117e7bf71e 100644
--- a/debugger/QT/SkSettingsWidget.cpp
+++ b/debugger/QT/SkSettingsWidget.cpp
@@ -8,70 +8,115 @@
#include "SkSettingsWidget.h"
+#include <iostream>
+#include <math.h>
+
+SkSettingsWidget::SkSettingsWidget(QWidget *parent) : QWidget(parent)
+ , mainFrameLayout(this)
+ , fVerticalLayout(&mainFrame)
+ , fVisibleFrameLayout(&fVisibleFrame)
+ , fVisibleOn(&fVisibleFrame)
+ , fVisibleOff(&fVisibleFrame)
+ , fCommandLayout(&fCommandFrame)
+ , fCurrentCommandBox(&fCommandFrame)
+ , fCommandCheckBox(&fCommandFrame)
+ , fZoomBox(&fZoomFrame)
+ , fZoomLayout(&fZoomFrame)
+{
+ // Sets up the container and it's alignment around the settings widget.
+ mainFrame.setFrameShape(QFrame::StyledPanel);
+ mainFrame.setFrameShadow(QFrame::Raised);
+ mainFrameLayout.setSpacing(6);
+ mainFrameLayout.setContentsMargins(0,0,0,0);
+ mainFrameLayout.addWidget(&mainFrame);
+
+ // Vertical Layout is the alignment inside of the main frame.
+ fVerticalLayout.setContentsMargins(11,11,11,11);
+ fVerticalLayout.setAlignment(Qt::AlignTop);
+
+ // Visible Toggle
+ fVisibileText.setText("Visibility Filter");
+ fVisibleFrame.setFrameShape(QFrame::StyledPanel);
+ fVisibleFrame.setFrameShadow(QFrame::Raised);
+ fVisibleOn.setText("On");
+ fVisibleOff.setText("Off");
+ fVisibleOff.setChecked(true);
+ fVisibleFrameLayout.setSpacing(6);
+ fVisibleFrameLayout.setContentsMargins(11,11,11,11);
+ fVisibleFrameLayout.addWidget(&fVisibleOn);
+ fVisibleFrameLayout.addWidget(&fVisibleOff);
+
+ // Command Toggle
+ fCommandToggle.setText("Command Scrolling Preferences");
+ fCommandFrame.setFrameShape(QFrame::StyledPanel);
+ fCommandFrame.setFrameShadow(QFrame::Raised);
+
+ fCurrentCommandLabel.setText("Current Command: ");
+ fCurrentCommandLabel.setMinimumWidth(178);
+ fCurrentCommandLabel.setMaximumWidth(178);
+ fCurrentCommandBox.setText("0");
+ fCurrentCommandBox.setMinimumSize(QSize(50,25));
+ fCurrentCommandBox.setMaximumSize(QSize(50,25));
+ fCurrentCommandBox.setAlignment(Qt::AlignRight);
+
+ fCurrentCommandLayout.setSpacing(0);
+ fCurrentCommandLayout.setContentsMargins(0,0,0,0);
+ fCurrentCommandLayout.setAlignment(Qt::AlignLeft);
+ fCurrentCommandLayout.addWidget(&fCurrentCommandLabel);
+ fCurrentCommandLayout.addWidget(&fCurrentCommandBox);
+
+ fCommandCheckBox.setText("Pause");
+ fCommandLayout.setSpacing(6);
+ fCommandLayout.setContentsMargins(11,11,11,11);
+ fCommandLayout.addLayout(&fCurrentCommandLayout);
+ fCommandLayout.addWidget(&fCommandCheckBox);
+
+ // Zoom Info
+ fZoomSetting.setText("Zoom Level: ");
+ fZoomSetting.setMinimumWidth(178);
+ fZoomSetting.setMaximumWidth(178);
+ fZoomFrame.setFrameShape(QFrame::StyledPanel);
+ fZoomFrame.setFrameShadow(QFrame::Raised);
+ fZoomBox.setText("100%");
+ fZoomBox.setMinimumSize(QSize(50,25));
+ fZoomBox.setMaximumSize(QSize(50,25));
+ fZoomBox.setAlignment(Qt::AlignRight);
+ fZoomLayout.setSpacing(6);
+ fZoomLayout.setContentsMargins(11,11,11,11);
+ fZoomLayout.addWidget(&fZoomSetting);
+ fZoomLayout.addWidget(&fZoomBox);
+
+ // Adds all widgets to settings container
+ fVerticalLayout.addWidget(&fVisibileText);
+ fVerticalLayout.addWidget(&fVisibleFrame);
+ fVerticalLayout.addWidget(&fCommandToggle);
+ fVerticalLayout.addWidget(&fCommandFrame);
+ fVerticalLayout.addWidget(&fZoomFrame);
+
+ //this->setDisabled(true);
+}
-SkSettingsWidget::SkSettingsWidget(QWidget *parent) : QWidget(parent) {
- mainFrameLayout = new QVBoxLayout(this);
- mainFrameLayout->setSpacing(6);
- mainFrameLayout->setContentsMargins(0,0,0,0);
-
-
- mainFrame = new QFrame();
- mainFrame->setFrameShape(QFrame::StyledPanel);
- mainFrame->setFrameShadow(QFrame::Raised);
-
- mainFrameLayout->addWidget(mainFrame);
-
- fVerticalLayout = new QVBoxLayout(mainFrame);
- fVerticalLayout->setContentsMargins(11,11,11,11);
- fVerticalLayout->setAlignment(Qt::AlignTop);
-
- fVisibility = new QLabel();
- fVisibility->setText("Visibility Filter");
-
- fFrame = new QFrame();
- fFrame->setFrameShape(QFrame::StyledPanel);
- fFrame->setFrameShadow(QFrame::Raised);
-
- fVerticalLayout_2 = new QVBoxLayout(fFrame);
- fVerticalLayout_2->setSpacing(6);
- fVerticalLayout_2->setContentsMargins(11,11,11,11);
-
- fVerticalLayout->addWidget(fVisibility);
- fVerticalLayout->addWidget(fFrame);
-
- fVisibleOn = new QRadioButton(fFrame);
- fVisibleOn->setText("On");
- fVisibleOff = new QRadioButton(fFrame);
- fVisibleOff->setText("Off");
-
- fVisibleOff->setChecked(true);
-
- fVerticalLayout_2->addWidget(fVisibleOn);
- fVerticalLayout_2->addWidget(fVisibleOff);
-
- fCommandToggle = new QLabel();
- fCommandToggle->setText("Command Scrolling Preferences");
-
- fCommandFrame = new QFrame();
- fCommandFrame->setFrameShape(QFrame::StyledPanel);
- fCommandFrame->setFrameShadow(QFrame::Raised);
-
- fCommandLayout = new QVBoxLayout(fCommandFrame);
- fCommandLayout->setSpacing(6);
- fCommandLayout->setContentsMargins(11,11,11,11);
+SkSettingsWidget::~SkSettingsWidget() {}
- fVerticalLayout->addWidget(fCommandToggle);
- fVerticalLayout->addWidget(fCommandFrame);
- fCommandCheckBox = new QCheckBox(fCommandFrame);
- fCommandCheckBox->setText("Toggle Sticky Activate");
- fCommandSingleDraw = new QCheckBox(fCommandFrame);
- fCommandSingleDraw->setText("Display Single Command");
+void SkSettingsWidget::updateCommand(int newCommand) {
+ fCurrentCommandBox.setText(QString::number(newCommand));
+}
- fCommandLayout->addWidget(fCommandCheckBox);
- fCommandLayout->addWidget(fCommandSingleDraw);
+QCheckBox* SkSettingsWidget::getCommandCheckBox() {
+ return &fCommandCheckBox;
+}
- this->setDisabled(true);
+QRadioButton* SkSettingsWidget::getVisibilityButton() {
+ return &fVisibleOn;
}
-SkSettingsWidget::~SkSettingsWidget() {}
+void SkSettingsWidget::setZoomText(int scaleFactor) {
+ if(scaleFactor == 1 || scaleFactor == -1) {
+ fZoomBox.setText("100%");
+ } else if (scaleFactor > 1) {
+ fZoomBox.setText(QString::number(scaleFactor*100).append("%"));
+ } else if (scaleFactor < -1) {
+ fZoomBox.setText(QString::number(100 / pow(2, (-scaleFactor - 1))).append("%"));
+ }
+}
diff --git a/debugger/QT/SkSettingsWidget.h b/debugger/QT/SkSettingsWidget.h
index 97d2101b98..da7326b68e 100644
--- a/debugger/QT/SkSettingsWidget.h
+++ b/debugger/QT/SkSettingsWidget.h
@@ -17,6 +17,7 @@
#include <QLabel>
#include <QRadioButton>
#include <QCheckBox>
+#include <QLineEdit>
/** \class SkSettingsWidget
@@ -34,27 +35,45 @@ public:
SkSettingsWidget(QWidget *parent = NULL);
~SkSettingsWidget();
+ void setZoomText(int scaleFactor);
+
+ QCheckBox* getCommandCheckBox();
+
+ QRadioButton* getVisibilityButton();
+
+private slots:
+ void updateCommand(int newCommand);
+
+signals:
+ void scrollingPreferences(bool isStickyActivate);
+ void showStyle(bool isSingleCommand);
+ void visibilityFilter(bool isEnabled);
+
private:
- QHBoxLayout* fHorizontalLayout;
+ QVBoxLayout mainFrameLayout;
+ QFrame mainFrame;
+ QVBoxLayout fVerticalLayout;
- QVBoxLayout* mainFrameLayout;
+ QLabel fVisibileText;
+ QFrame fVisibleFrame;
+ QVBoxLayout fVisibleFrameLayout;
+ QRadioButton fVisibleOn;
+ QRadioButton fVisibleOff;
- QVBoxLayout* fVerticalLayout;
- QVBoxLayout* fVerticalLayout_2;
- QTextEdit* fText;
- QFrame* fFrame;
- QFrame* mainFrame;
+ QLabel fCommandToggle;
+ QFrame fCommandFrame;
+ QVBoxLayout fCommandLayout;
- QLabel* fVisibility;
- QRadioButton* fVisibleOn;
- QRadioButton* fVisibleOff;
+ QLineEdit fCurrentCommandBox;
+ QLabel fCurrentCommandLabel;
+ QHBoxLayout fCurrentCommandLayout;
- QLabel* fCommandToggle;
- QFrame* fCommandFrame;
- QVBoxLayout* fCommandLayout;
+ QCheckBox fCommandCheckBox;
- QCheckBox* fCommandCheckBox;
- QCheckBox* fCommandSingleDraw;
+ QLabel fZoomSetting;
+ QFrame fZoomFrame;
+ QLineEdit fZoomBox;
+ QHBoxLayout fZoomLayout;
};
#endif /* SKSETTINGSWIDGET_H_ */
diff --git a/debugger/QT/moc_SkCanvasWidget.cpp b/debugger/QT/moc_SkCanvasWidget.cpp
index f8ddf6b700..0187620abb 100644
--- a/debugger/QT/moc_SkCanvasWidget.cpp
+++ b/debugger/QT/moc_SkCanvasWidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'SkCanvasWidget.h'
**
-** Created: Thu Jun 28 17:18:47 2012
+** Created: Mon Jul 9 13:45:07 2012
** by: The Qt Meta Object Compiler version 62 (Qt 4.6.2)
**
** WARNING! All changes made in this file will be lost!
@@ -23,18 +23,24 @@ static const uint qt_meta_data_SkCanvasWidget[] = {
4, // revision
0, // classname
0, 0, // classinfo
- 0, 0, // methods
+ 2, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
- 0, // signalCount
+ 2, // signalCount
+
+ // signals: signature, parameters, type, tag, flags
+ 31, 16, 15, 15, 0x05,
+ 68, 57, 15, 15, 0x05,
0 // eod
};
static const char qt_meta_stringdata_SkCanvasWidget[] = {
- "SkCanvasWidget\0"
+ "SkCanvasWidget\0\0newScaleFactor\0"
+ "scaleFactorChanged(float)\0newCommand\0"
+ "commandChanged(int)\0"
};
const QMetaObject SkCanvasWidget::staticMetaObject = {
@@ -64,6 +70,28 @@ int SkCanvasWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
+ if (_c == QMetaObject::InvokeMetaMethod) {
+ switch (_id) {
+ case 0: scaleFactorChanged((*reinterpret_cast< float(*)>(_a[1]))); break;
+ case 1: commandChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
+ default: ;
+ }
+ _id -= 2;
+ }
return _id;
}
+
+// SIGNAL 0
+void SkCanvasWidget::scaleFactorChanged(float _t1)
+{
+ void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+ QMetaObject::activate(this, &staticMetaObject, 0, _a);
+}
+
+// SIGNAL 1
+void SkCanvasWidget::commandChanged(int _t1)
+{
+ void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+ QMetaObject::activate(this, &staticMetaObject, 1, _a);
+}
QT_END_MOC_NAMESPACE
diff --git a/debugger/QT/moc_SkDebuggerGUI.cpp b/debugger/QT/moc_SkDebuggerGUI.cpp
index d09f636c93..dfc9e46f17 100644
--- a/debugger/QT/moc_SkDebuggerGUI.cpp
+++ b/debugger/QT/moc_SkDebuggerGUI.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'SkDebuggerGUI.h'
**
-** Created: Thu Jun 28 17:18:47 2012
+** Created: Mon Jul 9 13:45:07 2012
** by: The Qt Meta Object Compiler version 62 (Qt 4.6.2)
**
** WARNING! All changes made in this file will be lost!
@@ -23,48 +23,55 @@ static const uint qt_meta_data_SkDebuggerGUI[] = {
4, // revision
0, // classname
0, 0, // classinfo
- 18, 14, // methods
+ 21, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
- 0, // signalCount
+ 1, // signalCount
+
+ // signals: signature, parameters, type, tag, flags
+ 23, 15, 14, 14, 0x05,
// slots: signature, parameters, type, tag, flags
- 15, 14, 14, 14, 0x08,
- 35, 14, 14, 14, 0x08,
- 50, 14, 14, 14, 0x08,
- 72, 14, 14, 14, 0x08,
- 86, 14, 14, 14, 0x08,
- 101, 14, 14, 14, 0x08,
- 119, 14, 14, 14, 0x08,
- 132, 14, 14, 14, 0x08,
+ 43, 14, 14, 14, 0x08,
+ 63, 14, 14, 14, 0x08,
+ 78, 14, 14, 14, 0x08,
+ 100, 14, 14, 14, 0x08,
+ 114, 14, 14, 14, 0x08,
+ 129, 14, 14, 14, 0x08,
147, 14, 14, 14, 0x08,
- 162, 14, 14, 14, 0x08,
- 179, 14, 14, 14, 0x08,
- 196, 14, 14, 14, 0x08,
- 221, 216, 14, 14, 0x08,
- 248, 14, 14, 14, 0x08,
- 259, 216, 14, 14, 0x08,
- 295, 14, 14, 14, 0x08,
- 314, 14, 14, 14, 0x08,
- 339, 332, 14, 14, 0x08,
+ 160, 14, 14, 14, 0x08,
+ 175, 14, 14, 14, 0x08,
+ 190, 14, 14, 14, 0x08,
+ 207, 14, 14, 14, 0x08,
+ 224, 14, 14, 14, 0x08,
+ 249, 244, 14, 14, 0x08,
+ 276, 14, 14, 14, 0x08,
+ 287, 244, 14, 14, 0x08,
+ 335, 323, 14, 14, 0x08,
+ 354, 14, 14, 14, 0x08,
+ 373, 14, 14, 14, 0x08,
+ 398, 391, 14, 14, 0x08,
+ 426, 420, 14, 14, 0x08,
0 // eod
};
static const char qt_meta_stringdata_SkDebuggerGUI[] = {
- "SkDebuggerGUI\0\0actionBreakpoints()\0"
- "actionCancel()\0actionCommandFilter()\0"
- "actionClose()\0actionDelete()\0"
- "actionInspector()\0actionPlay()\0"
- "actionReload()\0actionRewind()\0"
+ "SkDebuggerGUI\0\0command\0commandChanged(int)\0"
+ "actionBreakpoints()\0actionCancel()\0"
+ "actionCommandFilter()\0actionClose()\0"
+ "actionDelete()\0actionInspector()\0"
+ "actionPlay()\0actionReload()\0actionRewind()\0"
"actionSettings()\0actionStepBack()\0"
"actionStepForward()\0item\0"
"loadFile(QListWidgetItem*)\0openFile()\0"
"registerListClick(QListWidgetItem*)\0"
+ "scaleFactor\0actionScale(float)\0"
"toggleBreakpoint()\0toggleDirectory()\0"
- "string\0toggleFilter(QString)\0"
+ "string\0toggleFilter(QString)\0state\0"
+ "pauseDrawing(int)\0"
};
const QMetaObject SkDebuggerGUI::staticMetaObject = {
@@ -96,28 +103,38 @@ int SkDebuggerGUI::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
- case 0: actionBreakpoints(); break;
- case 1: actionCancel(); break;
- case 2: actionCommandFilter(); break;
- case 3: actionClose(); break;
- case 4: actionDelete(); break;
- case 5: actionInspector(); break;
- case 6: actionPlay(); break;
- case 7: actionReload(); break;
- case 8: actionRewind(); break;
- case 9: actionSettings(); break;
- case 10: actionStepBack(); break;
- case 11: actionStepForward(); break;
- case 12: loadFile((*reinterpret_cast< QListWidgetItem*(*)>(_a[1]))); break;
- case 13: openFile(); break;
- case 14: registerListClick((*reinterpret_cast< QListWidgetItem*(*)>(_a[1]))); break;
- case 15: toggleBreakpoint(); break;
- case 16: toggleDirectory(); break;
- case 17: toggleFilter((*reinterpret_cast< QString(*)>(_a[1]))); break;
+ case 0: commandChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
+ case 1: actionBreakpoints(); break;
+ case 2: actionCancel(); break;
+ case 3: actionCommandFilter(); break;
+ case 4: actionClose(); break;
+ case 5: actionDelete(); break;
+ case 6: actionInspector(); break;
+ case 7: actionPlay(); break;
+ case 8: actionReload(); break;
+ case 9: actionRewind(); break;
+ case 10: actionSettings(); break;
+ case 11: actionStepBack(); break;
+ case 12: actionStepForward(); break;
+ case 13: loadFile((*reinterpret_cast< QListWidgetItem*(*)>(_a[1]))); break;
+ case 14: openFile(); break;
+ case 15: registerListClick((*reinterpret_cast< QListWidgetItem*(*)>(_a[1]))); break;
+ case 16: actionScale((*reinterpret_cast< float(*)>(_a[1]))); break;
+ case 17: toggleBreakpoint(); break;
+ case 18: toggleDirectory(); break;
+ case 19: toggleFilter((*reinterpret_cast< QString(*)>(_a[1]))); break;
+ case 20: pauseDrawing((*reinterpret_cast< int(*)>(_a[1]))); break;
default: ;
}
- _id -= 18;
+ _id -= 21;
}
return _id;
}
+
+// SIGNAL 0
+void SkDebuggerGUI::commandChanged(int _t1)
+{
+ void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+ QMetaObject::activate(this, &staticMetaObject, 0, _a);
+}
QT_END_MOC_NAMESPACE
diff --git a/debugger/QT/moc_SkInspectorWidget.cpp b/debugger/QT/moc_SkInspectorWidget.cpp
index 44495566fa..d75946a637 100644
--- a/debugger/QT/moc_SkInspectorWidget.cpp
+++ b/debugger/QT/moc_SkInspectorWidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'SkInspectorWidget.h'
**
-** Created: Thu Jun 28 17:18:47 2012
+** Created: Mon Jul 9 13:45:07 2012
** by: The Qt Meta Object Compiler version 62 (Qt 4.6.2)
**
** WARNING! All changes made in this file will be lost!
diff --git a/debugger/QT/moc_SkSettingsWidget.cpp b/debugger/QT/moc_SkSettingsWidget.cpp
index ec5c63d625..336b1ef2f9 100644
--- a/debugger/QT/moc_SkSettingsWidget.cpp
+++ b/debugger/QT/moc_SkSettingsWidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'SkSettingsWidget.h'
**
-** Created: Thu Jun 28 17:18:47 2012
+** Created: Mon Jul 9 13:45:07 2012
** by: The Qt Meta Object Compiler version 62 (Qt 4.6.2)
**
** WARNING! All changes made in this file will be lost!
@@ -23,18 +23,30 @@ static const uint qt_meta_data_SkSettingsWidget[] = {
4, // revision
0, // classname
0, 0, // classinfo
- 0, 0, // methods
+ 4, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
- 0, // signalCount
+ 3, // signalCount
+
+ // signals: signature, parameters, type, tag, flags
+ 35, 18, 17, 17, 0x05,
+ 78, 62, 17, 17, 0x05,
+ 104, 94, 17, 17, 0x05,
+
+ // slots: signature, parameters, type, tag, flags
+ 138, 127, 17, 17, 0x08,
0 // eod
};
static const char qt_meta_stringdata_SkSettingsWidget[] = {
- "SkSettingsWidget\0"
+ "SkSettingsWidget\0\0isStickyActivate\0"
+ "scrollingPreferences(bool)\0isSingleCommand\0"
+ "showStyle(bool)\0isEnabled\0"
+ "visibilityFilter(bool)\0newCommand\0"
+ "updateCommand(int)\0"
};
const QMetaObject SkSettingsWidget::staticMetaObject = {
@@ -64,6 +76,37 @@ int SkSettingsWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
+ if (_c == QMetaObject::InvokeMetaMethod) {
+ switch (_id) {
+ case 0: scrollingPreferences((*reinterpret_cast< bool(*)>(_a[1]))); break;
+ case 1: showStyle((*reinterpret_cast< bool(*)>(_a[1]))); break;
+ case 2: visibilityFilter((*reinterpret_cast< bool(*)>(_a[1]))); break;
+ case 3: updateCommand((*reinterpret_cast< int(*)>(_a[1]))); break;
+ default: ;
+ }
+ _id -= 4;
+ }
return _id;
}
+
+// SIGNAL 0
+void SkSettingsWidget::scrollingPreferences(bool _t1)
+{
+ void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+ QMetaObject::activate(this, &staticMetaObject, 0, _a);
+}
+
+// SIGNAL 1
+void SkSettingsWidget::showStyle(bool _t1)
+{
+ void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+ QMetaObject::activate(this, &staticMetaObject, 1, _a);
+}
+
+// SIGNAL 2
+void SkSettingsWidget::visibilityFilter(bool _t1)
+{
+ void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+ QMetaObject::activate(this, &staticMetaObject, 2, _a);
+}
QT_END_MOC_NAMESPACE