From b9bf3ce155203b7afcc7ac28cf495a6924f1ded4 Mon Sep 17 00:00:00 2001 From: "luke.segars" Date: Fri, 8 Oct 2010 00:31:42 -0700 Subject: [PATCH] Changed some icons and added toolbar widgets. --- icons/play.png | Bin 617 -> 676 bytes icons/rewind.png | Bin 629 -> 666 bytes icons/stop.png | Bin 667 -> 820 bytes mainwindow.cpp | 59 +++++++++++++++++++++++++++++++++++++++++++++++ mainwindow.h | 2 ++ 5 files changed, 61 insertions(+) diff --git a/icons/play.png b/icons/play.png index 2e8f4159bb236aee0643c0dd34f939fe7a1269d2..6ef8de76e0f5bf01c09da24a07c61cfe558d7a4b 100644 GIT binary patch delta 652 zcmV;70(1T81f&I!B!2{RLP=Bz2nYy#2xN!=000?uMObuGZ)S9NVRB^vcXxL#X>MzC zV_|S*E^l&Yo9;Xs0006uNkl+a*Q@YD>sdhizspv6uqQHVm@#YEoRUuq!c&NB7ZD1ow0!)<9P4f`?UyP zGZWN-v-$pq!}*{8hcSkHhP!mEu~WAdo8?nd1jeIrclCk3aF;a@j#!~$nl%(P0Jzf9 z8$5aR>}dqE;fU4n-v&x*nhu}wwKrd{4f;b9;fU2%OeY#6`YVQ=TOJkJo9%;vsn26n zmF>ePxAA!V)_=-}`I%v3I3J5TKQ|0IwduKdA1M?{D1?v*1OSOoLwLB9`FF6Zyq@^< zxHC36uz)eAVo_%XKm)j5j@ZX%D5+6Gfe;7*LIJ{K*`6c4G|$1hBUVk-p4z8lcPGLT zt0NY5`ZYk#TP2-Yz;?6PZWg69r6pyQ1VZ>NKSsFNUVn~vOQY0;>O^aESIN+;M}5by zTE{fN(vLabCtt63pnZarBhguj)(XEbh))Jk_$kemqfC&joiXbxY$;HJ)BziSjh6#jN^ch3!+q&cG&5&{tmA;PrUNC+6gLJI|BV{>Aa#{a=Gm5?G< z3n~(j1S}+7+Pfeo#HfUzP0qx~<}SBCXJ>tHZtpyWppXY2Z-3s*n{VE)G4edeNyM6X zx(>rIz(mcJXE;0gSlh$ZYTt?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720e85b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -6,6 +6,10 @@ #include #include #include +#include +#include +#include +#include #include "connectionmanager.h" #include "shareboard.h" @@ -15,6 +19,8 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent) { createActions(); createMenus(); + createToolBars(); + board = new Shareboard(this); setCentralWidget(board); @@ -114,3 +120,56 @@ void MainWindow::createMenus() { } +void MainWindow::createToolBars() { + + // Create some of the basic tool actions. + // They should also be added to an exclusive tool group. + QActionGroup* toolGroup = new QActionGroup(this); + QAction* penAction = new QAction(QIcon("icons/pen.png"), "Pen", this); + QAction* eraserAction = new QAction(QIcon("icons/eraser.png"), "Eraser", this); + penAction->setChecked(true); + toolGroup->addAction(penAction); + toolGroup->addAction(eraserAction); + + // Create some other one-click actions that are not a part of the action group. + QAction* imageAction = new QAction(QIcon("icons/import_image.png"), "Import Image", this); + QAction* clearAction = new QAction(QIcon("icons/clear.png"), "Clear", this); + + // Style + QSpinBox* spinboxWidget = new QSpinBox(this); + spinboxWidget->setMinimum(4); + spinboxWidget->setMaximum(40); + + + QPixmap pixmap(16, 16); + pixmap.fill(QColor(0, 0, 255)); + QAction* colorAction = new QAction(QIcon(pixmap), "Select Color", this); + + // Create the history UI elements. + QAction* restartAction = new QAction(QIcon("icons/rewind.png"), "Replay History", this); + QAction* playAction = new QAction(QIcon("icons/play.png"), "Play", this); + QSlider* sliderWidget = new QSlider(Qt::Horizontal, this); + + toolBar = addToolBar("Test"); + toolBar->setMovable(false); + + toolBar->addSeparator(); +// toolBar->addWidget(new QLabel("Tools", this)); + toolBar->addAction(penAction); + toolBar->addAction(eraserAction); + toolBar->addAction(imageAction); + toolBar->addAction(clearAction); + toolBar->addSeparator(); + +// toolBar->addWidget(new QLabel("Style", this)); + toolBar->addWidget(new QLabel("Width: ", this)); + toolBar->addWidget(spinboxWidget); + toolBar->addWidget(new QLabel("Color: ", this)); + toolBar->addAction(colorAction); + toolBar->addSeparator(); + +// toolBar->addWidget(new QLabel("History", this)); + toolBar->addAction(restartAction); + toolBar->addWidget(sliderWidget); + toolBar->addAction(playAction); +} diff --git a/mainwindow.h b/mainwindow.h index 692bc3c..867bd6c 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -27,7 +27,9 @@ public slots: private: void createActions(); void createMenus(); + void createToolBars(); QMenu* fileMenu; + QToolBar* toolBar; // QAction* joinAction; // Removed in favor of central widget handling this. QAction* loadPastAction; QAction* saveAction; -- 2.39.5