#include "qg_blockwidget.h"
+#include "qg_actionhandler.h"
+#include "rs_block.h"
+#include "rs_blocklist.h"
+#include "rs_debug.h"
+
/**
* Constructor.
*/
RS_Block * activeBlock = NULL;
- if (blockList != NULL)
+ if (blockList)
activeBlock = blockList->getActive();
listBox->clear();
- if (blockList == NULL)
+ if (!blockList)
{
RS_DEBUG->print("QG_BlockWidget::update(): blockList is NULL");
return;
{
RS_DEBUG->print("QG_BlockWidget::highlightBlock()");
- if (block == NULL || listBox == NULL)
+ if (!block || !listBox)
return;
blockList->activate(block);
{
QListWidgetItem * item = listBox->item(i);
-// if (listBox->text(i) == name)
if (item->text() == name)
{
-// listBox->setCurrentItem(i);
listBox->setCurrentRow(i);
break;
}
QString blockName = listBox->currentItem()->text();
RS_DEBUG->print("QG_BlockWidget::slotActivated(): %s", blockName.toLatin1().data());
- if (blockList == NULL)
+ if (!blockList)
return;
lastBlock = blockList->getActive();
}
else
{
- if (item != NULL && blockList != NULL)
+ if (item && blockList)
lastBlock = blockList->find(item->text());
}
}