76
76
m_layout = new QGraphicsGridLayout(this);
77
77
// First, third and fourth colunm are fixed width for the icons
78
m_layout->setColumnPreferredWidth(0, 160);
78
m_layout->setColumnPreferredWidth(0, 150);
79
79
m_layout->setColumnFixedWidth(1, 60);
80
80
m_layout->setColumnFixedWidth(2, rowHeight);
81
81
m_layout->setColumnSpacing(1, spacing);
92
92
m_connectButton->setText(m_wirelessStatus->ssid());
94
m_connectButton->setMinimumWidth(160);
95
94
m_connectButton->setOrientation(Qt::Horizontal);
96
95
m_connectButton->setTextBackgroundColor(QColor(Qt::transparent));
97
96
//m_connectButton->setToolTip(i18nc("icon to connect to wireless network", "Connect to wireless network %1", ssid));
98
97
m_layout->addItem(m_connectButton, 0, 0, 1, 1 );
100
if (m_remote->strength() >= 0)
99
if (m_remote->strength()>=0)
102
101
m_strengthMeter = new Plasma::Meter(this);
103
102
m_strengthMeter->setMinimum(0);
104
103
m_strengthMeter->setMaximum(100);
105
104
m_strengthMeter->setValue(m_wirelessStatus->strength());
106
105
m_strengthMeter->setMeterType(Plasma::Meter::BarMeterHorizontal);
107
m_strengthMeter->setPreferredSize(QSizeF(60, rowHeight/2));
108
m_strengthMeter->setMaximumHeight(rowHeight/2);
106
m_strengthMeter->setPreferredSize(QSizeF(60, 12));
107
m_strengthMeter->setMaximumHeight(12);
109
108
m_strengthMeter->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
110
109
m_layout->addItem(m_strengthMeter, 0, 1, 1, 1, Qt::AlignCenter);
113
QGraphicsWidget *widget = new QGraphicsWidget(this);
114
widget->setPreferredSize(QSizeF(60, 12));
115
widget->setMaximumHeight(12);
116
widget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
117
m_layout->addItem(widget, 0, 1, 1, 1, Qt::AlignCenter);
113
120
m_securityIcon = new Plasma::Label(this);
114
121
m_securityIcon->nativeWidget()->setPixmap(KIcon(m_wirelessStatus->securityIcon()).pixmap(22,22));
175
182
void WirelessNetworkItem::update()
177
184
//kDebug() << "updating" << m_wirelessStatus->ssid() << wirelessNetworkItem()->strength();
178
setStrength((static_cast<RemoteWirelessNetwork*>(m_activatable))->strength());
186
setStrength((static_cast<RemoteWirelessNetwork*>(m_activatable))->strength());