Changeset View
Changeset View
Standalone View
Standalone View
kcms/kfontinst/kcmfontinst/FontFilter.cpp
Show First 20 Lines • Show All 274 Lines • ▼ Show 20 Line(s) | 274 | { | |||
---|---|---|---|---|---|
275 | deselectCurrent((KSelectAction *)itsActions[CRIT_FOUNDRY]); | 275 | deselectCurrent((KSelectAction *)itsActions[CRIT_FOUNDRY]); | ||
276 | deselectCurrent((KSelectAction *)itsActions[CRIT_FILETYPE]); | 276 | deselectCurrent((KSelectAction *)itsActions[CRIT_FILETYPE]); | ||
277 | deselectCurrent((KSelectAction *)itsActions[CRIT_WS]); | 277 | deselectCurrent((KSelectAction *)itsActions[CRIT_WS]); | ||
278 | setText(QString()); | 278 | setText(QString()); | ||
279 | itsCurrentWs=QFontDatabase::Any; | 279 | itsCurrentWs=QFontDatabase::Any; | ||
280 | itsCurrentFileTypes.clear(); | 280 | itsCurrentFileTypes.clear(); | ||
281 | 281 | | |||
282 | setCriteria(crit); | 282 | setCriteria(crit); | ||
283 | setPlaceholderText(i18n("Filter by %1...", act->text().toLower())); | 283 | setPlaceholderText(i18n("Filter by %1...", act->text())); | ||
284 | setReadOnly(false); | 284 | setReadOnly(false); | ||
285 | } | 285 | } | ||
286 | } | 286 | } | ||
287 | } | 287 | } | ||
288 | 288 | | |||
289 | void CFontFilter::ftChanged(const QString &ft) | 289 | void CFontFilter::ftChanged(const QString &ft) | ||
290 | { | 290 | { | ||
291 | deselectCurrent((KSelectAction *)itsActions[CRIT_FOUNDRY]); | 291 | deselectCurrent((KSelectAction *)itsActions[CRIT_FOUNDRY]); | ||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
337 | { | 337 | { | ||
338 | itsActions[crit]=new KToggleAction(QIcon(itsPixmaps[crit]), | 338 | itsActions[crit]=new KToggleAction(QIcon(itsPixmaps[crit]), | ||
339 | text, this); | 339 | text, this); | ||
340 | itsMenu->addAction(itsActions[crit]); | 340 | itsMenu->addAction(itsActions[crit]); | ||
341 | itsActionGroup->addAction(itsActions[crit]); | 341 | itsActionGroup->addAction(itsActions[crit]); | ||
342 | itsActions[crit]->setData((int)crit); | 342 | itsActions[crit]->setData((int)crit); | ||
343 | itsActions[crit]->setChecked(on); | 343 | itsActions[crit]->setChecked(on); | ||
344 | if(on) | 344 | if(on) | ||
345 | setPlaceholderText(i18n("Type here to filter on %1", text.toLower())); | 345 | setPlaceholderText(i18n("Filter by %1", text)); | ||
346 | connect(itsActions[crit], SIGNAL(toggled(bool)), SLOT(filterChanged())); | 346 | connect(itsActions[crit], SIGNAL(toggled(bool)), SLOT(filterChanged())); | ||
347 | } | 347 | } | ||
348 | 348 | | |||
349 | void CFontFilter::resizeEvent(QResizeEvent *ev) | 349 | void CFontFilter::resizeEvent(QResizeEvent *ev) | ||
350 | { | 350 | { | ||
351 | KLineEdit::resizeEvent(ev); | 351 | KLineEdit::resizeEvent(ev); | ||
352 | 352 | | |||
353 | int frameWidth(style()->pixelMetric(QStyle::PM_DefaultFrameWidth)), | 353 | int frameWidth(style()->pixelMetric(QStyle::PM_DefaultFrameWidth)), | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |