1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
/***************************************************************************
rtoolbar.cpp - description
-------------------
begin : Mon Sep 27 1999
copyright : (C) 1999 by Andreas Mustun
email : andrew@ribbonsoft.com
***************************************************************************/
/****************************************************************************
** rtoolbar.cpp 1998/09/04 A. Mustun RibbonSoft
**
** Copyright (C) 1998 RibbonSoft. All rights reserved.
**
*****************************************************************************/
#include "rtoolbar.h"
#include <qdrawutil.h>
#include "rappwin.h"
#include "reventdef.h"
#include "rgraphic.h"
#include "rpainter.h"
// Constructor:
//
RToolBar::RToolBar(const char* _label, QMainWindow *_parent,
QMainWindow::ToolBarDock _dock,
bool _newLine,
const char* _name)
:QToolBar(_label, _parent,
_dock,
_newLine, _name)
{
}
// Destructor:
//
RToolBar::~RToolBar()
{
}
// Mouse Release event:
//
void
RToolBar::mouseReleaseEvent(QMouseEvent* _ev)
{
QToolBar::mouseReleaseEvent(_ev);
if(_ev->button()==RightButton) {
//RAppWin::getRAppWin()->changeMenu(TOOLBAR_MAIN);
if(RAppWin::getRAppWin()->currentDoc()) {
RAppWin::getRAppWin()->currentDoc()->distributeEvent(REVENT_RBUTTONUP);
}
}
}
// Repaint:
//
void
RToolBar::paintEvent(QPaintEvent*)
{
RPainter paint; // painter
paint.begin(this);
/*QBrush brush(backgroundColor());
qDrawWinPanel(&paint,
0, 0, width(), height(),
colorGroup(),
false,
&brush);*/
//paint.eraseRect(2, 2, width()-4, height()-4);
/*paint.setPen(white);
paint.drawLine(0, 0, width(), 0);
paint.drawLine(0, 1, width(), 1);
paint.drawLine(0, 0, 0, height());
paint.drawLine(1, 0, 1, height());*/
paint.end();
}
// EOF
|