/*
 *  Copyright (C) 2007-2008 CMM Sigma Andrzej Chmielowiec <cmmsigma@cmmsigma.eu>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 3
 *  as published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 */

#include "ConnectAction.h"
#include "VpnItem.h"

ConnectAction::ConnectAction(VpnItem *item, QObject *parent): QAction(parent)
{
	mItem = item;
	setText(item->sTokenVpnName());
	connect(this, SIGNAL(triggered()), this, SLOT(vpnConnectSlot()));
}

void
ConnectAction::vpnConnectSlot()
{
	mItem->listWidget()->setCurrentItem(mItem);
	emit vpnItemActiveSig(mItem);
	emit vpnConnectSig();
}
