diff options
| author | deva <deva> | 2009-06-30 17:31:53 +0000 | 
|---|---|---|
| committer | deva <deva> | 2009-06-30 17:31:53 +0000 | 
| commit | 9a773bc9ed736301b5ac6f6f8798056194398011 (patch) | |
| tree | a113908743936aea97975adb6f4f1c7f49e6b007 /client/macrodrawer.cc | |
| parent | b31e7fba17d1e5c1264c0829c4da258c32aa80c3 (diff) | |
Removed console on win32 unless, compiled in debug mode. First attempt on a macro dependency system.
Diffstat (limited to 'client/macrodrawer.cc')
| -rw-r--r-- | client/macrodrawer.cc | 16 | 
1 files changed, 10 insertions, 6 deletions
diff --git a/client/macrodrawer.cc b/client/macrodrawer.cc index 85cab3f..f3fcab1 100644 --- a/client/macrodrawer.cc +++ b/client/macrodrawer.cc @@ -28,11 +28,9 @@  #include <QPushButton> -MacroDrawer::MacroDrawer(MacroWindow *p, QString title) +MacroDrawer::MacroDrawer(Macro *macro, QString title)  { -  mw = p; -   -  if(!mw->isstatic) setTitle("       " + title); +  if(!macro->isstatic) setTitle("       " + title);    setFlat(true);    { @@ -41,7 +39,7 @@ MacroDrawer::MacroDrawer(MacroWindow *p, QString title)      setFont(f);    } -  if(!mw->isstatic) { +  if(!macro->isstatic) {      QPushButton *b = new QPushButton("±", this);      b->setFixedSize(16,16);      b->move(0,0); @@ -61,7 +59,7 @@ bool MacroDrawer::eventFilter(QObject *obj, QEvent *event)  {    if(event->type() == QEvent::MouseButtonRelease) {      QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event); -    if(mouseEvent->y() < 16 && isEnabled()) toggle(); +    if(mouseEvent->y() < 16 && isEnabled()) emit toggle();    }    return QObject::eventFilter(obj, event);  } @@ -70,3 +68,9 @@ void MacroDrawer::toggleMe()  {    emit toggle();  } + +void MacroDrawer::activationChange(bool active) +{ +  //printf("Active %d\n", (int)active); +  setEnabled(active); +}  | 
