Esempio n. 1
0
LogicCooling::LogicCooling(MessageReceiver* _messageReceiver)
	: Logic(), phase(PHASE_INPUT_CONTROL)
{
	addReceiver(_messageReceiver);
	dialogText = const_cast<char*>(CONFIRMATION_TEXT);
	cancelLogText = const_cast<char*>(CANCEL_LOG_TEXT);
	startLogText = const_cast<char*>(START_LOG_TEXT);
}
Esempio n. 2
0
SocketAdapter::SocketAdapter(SocketAdapter* sender, SocketAdapter* receiver) : 
     _sender(sender)
{
    //TraceLS(this) << "Create" << endl;    
    assert(sender != this);
    //assert(receiver != this);

    if (receiver)
        addReceiver(receiver);
}
Esempio n. 3
0
ReceiversForm::ReceiversForm(QWidget *parent) :
    QWidget(parent),
    model(0),
    ui(new Ui::ReceiversForm)
{
    createWidget();

    if(receiverList.isEmpty()){
        addReceiver();
    }

    fNewRecipientAllowed = true;
}
Esempio n. 4
0
RCommand::RCommand(const QString &command, int type, const QString &rk_equiv, RCommandReceiver *receiver, int flags) : RData (), RCommandBase (false) {
	RK_TRACE (RBACKEND);
	_id = next_id++;
// if we ever submit enough commands to get a buffer overflow, use only positive numbers.
	if (next_id < 0) {
		next_id = 0;
	}
	_type = type;
	_flags = flags;
	if (type & Plugin) _command = command.trimmed ();
	else _command = command;
	if (_command.isEmpty ()) _type |= EmptyCommand;
	status = 0;
	has_been_run_up_to = 0;
	_rk_equiv = rk_equiv;
	_notifier = 0;
	for (int i = 0; i < MAX_RECEIVERS_PER_RCOMMAND; ++i) receivers[i] = 0;
	if (!(type & Internal)) {
		addReceiver (receiver);
		addReceiver (RKCommandLog::getLog ());
	}
}
Esempio n. 5
0
MainTabControl::MainTabControl(unsigned int _positionX, unsigned int _positionY, unsigned int _width, unsigned int _height, MessageReceiver* _messageReceiver)
	:	Control(_positionX, _positionY, _width, _height, _messageReceiver),
		tab(new TabControl(_positionX, _positionY, _width, _height, TAB_COUNT, Window::BORDER_STYLE_DOUBLE, this))
{
	addChildControl(tab);

	mainInfo = new MainInfo(_positionX, _positionY, this); 
	mainConfirmation = new MainConfirmation(_positionX, _positionY, this);
	mainFinish = new MainFinish(_positionX, _positionY, this);
	addReceiver(mainFinish);
	tab->getTabPanel(INFO_TAB)->addChildControl(mainInfo);
	tab->getTabPanel(CONFIRMATION_TAB)->addChildControl(mainConfirmation);
	tab->getTabPanel(FINISH_TAB)->addChildControl(mainFinish);

	tab->setActiveTab(INFO_TAB);
}
Esempio n. 6
0
Fv300Device::Fv300Device(unsigned char _address, unsigned int _type)
	:	IDetectionDevice(_address, _type)
{
	ConfigData* pConfigData = Config::getSingleton().getConfigData();
	unsigned count = pConfigData->getConfigDataStructFv300Count();
	ConfigDataStructFv300** fvStruct = pConfigData->getConfigDataStructFv300();

	devicesCount = count;
	pDevices = new Device[devicesCount];

	for (unsigned int i = 0; i < count; i++)
		pDevices[i].address = fvStruct[i]->address;

	ExtensionSystem::getSingleton().addReceiver(this);
	addReceiver(ExtensionSystem::getSingletonPtr());

	points = nullptr;
	pointsCount = 0;
}
Esempio n. 7
0
void Receiver::createWidget()
{
    this->setMinimumHeight(150);
    this->setMinimumWidth(500);
    setAutoFillBackground(true);
    QPalette pa = palette();
    pa.setColor(QPalette::Background,QColor(255, 255, 255));

    this->setPalette(pa);
#ifndef Q_OS_MAC
    setStyleSheet("QLineEdit{border: 2px groove rgb(211, 211, 211)} QDoubleSpinBox{border: 2px groove rgb(211, 211, 211);} QComboBox{border: 2px groove rgb(211, 211, 211);}");
#endif

    payTo->setToolTip(tr("输入地址"));
    payTo->setMinimumHeight(25);
    payTo->setMinimumWidth(370);

    QPixmap closePix(":icons/closesend");
    closeButton = new YbLabelButton(closePix);
    QHBoxLayout *closeLayout = new QHBoxLayout;
    closeLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
    closeLayout->addWidget(closeButton);
//    closeLayout->addSpacing(1);
    connect(closeButton, SIGNAL(labelButtonClicked()), this, SIGNAL(closeReceiver()));

    QPixmap addPix(":icons/addsend");
    addButton = new YbLabelButton(addPix);
    QHBoxLayout *addLayout = new QHBoxLayout;
    addLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
    addLayout->addWidget(addButton);
    addLayout->addSpacing(10);
    connect(addButton, SIGNAL(labelButtonClicked()), this, SIGNAL(addReceiver()));

    QLabel *receiverLabel = new QLabel(tr("receiver:"));

    QHBoxLayout *payToLayout = new QHBoxLayout;
    payToLayout->addSpacing(20);
    payToLayout->addWidget(receiverLabel);
    //payToLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
    payToLayout->addWidget(payTo);
    payToLayout->addSpacing(33);

    payAmount->setMinimumHeight(25);
    payAmount->setMinimumWidth(370);
    QHBoxLayout *moneyLayout = new QHBoxLayout;
    //moneyLayout->addSpacing();
    QLabel *moneyText = new QLabel(tr("money:"));
    moneyLayout->addSpacing(20);
    moneyLayout->addWidget(moneyText);
    moneyLayout->addSpacing(12);
    moneyLayout->addWidget(payAmount);
    moneyLayout->addSpacing(40);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addLayout(closeLayout);
    mainLayout->addLayout(payToLayout);
    mainLayout->addSpacing(20);
    mainLayout->addLayout(moneyLayout);
    mainLayout->addSpacing(10);
    mainLayout->addLayout(addLayout);
    mainLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding));

    setLayout(mainLayout);
}
Esempio n. 8
0
void Emitter::addReceiver(Receiver & target, const MessageBase & source) const
{
	const unsigned long int messageType = source.getType();
	addReceiver(target, messageType);
}
Esempio n. 9
0
/**
	@brief Attach a Receiver object directly to this Emitter

	When a Receiver needs to specifically target a particular emitter,
	it should invoke addReceiver and specify the message type it is 
	subscribing to.

	@param target          The Receiver object that will receive the 
	                       specified message when the Emitter emits.
	@param messageTypeName  The message type that the Emitter should 
	                        deliver to the target Receiver.

	@see Receiver
	@see MessageManager::addReceiver

	@author Justin Randall
*/
void Emitter::addReceiver(Receiver & target, const char * const messageTypeName) const
{
	const unsigned long int messageType = MessageBase::makeMessageTypeFromString(messageTypeName);
	addReceiver(target, messageType);
}
Esempio n. 10
0
MonitoringDevice::MonitoringDevice(unsigned char _address, unsigned int _type)
	:	IMonitoringDevice(_address, _type), setTimeTimeOut(0), isSetTimeTimeOut(false), eventId(0){
	ExtensionSystem::getSingleton().addReceiver(this);
	addReceiver(ExtensionSystem::getSingletonPtr());
}