summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/infodlg.cc
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2015-09-04 01:34:34 -0500
committerTimothy Pearson <[email protected]>2015-09-04 01:35:03 -0500
commitc54c4e700377b9853371c0c3809885d9b0830877 (patch)
tree159eb53581df22f33ba9dfd996d06fe49389d3ea /kdesktop/lock/infodlg.cc
parentb45b9ed9b12d8f05237f52b00a8d61cff1d53806 (diff)
downloadtdebase-c54c4e700377b9853371c0c3809885d9b0830877.tar.gz
tdebase-c54c4e700377b9853371c0c3809885d9b0830877.zip
Fix the most egregious style guide violations in the kdesktoplock plugin sources
No functional changes were made to the source
Diffstat (limited to 'kdesktop/lock/infodlg.cc')
-rw-r--r--kdesktop/lock/infodlg.cc86
1 files changed, 44 insertions, 42 deletions
diff --git a/kdesktop/lock/infodlg.cc b/kdesktop/lock/infodlg.cc
index d248d7bd0..3efaf060d 100644
--- a/kdesktop/lock/infodlg.cc
+++ b/kdesktop/lock/infodlg.cc
@@ -1,8 +1,8 @@
//===========================================================================
//
-// This file is part of the KDE project
+// This file is part of the TDE project
//
-// Copyright (c) 2010 Timothy Pearson <[email protected]>
+// Copyright (c) 2010 - 2015 Timothy Pearson <[email protected]>
#include <config.h>
@@ -62,86 +62,88 @@ extern bool trinity_desktop_lock_use_system_modal_dialogs;
// Simple dialog for displaying an unlock status or recurring error message
//
InfoDlg::InfoDlg(LockProcess *parent)
- : TQDialog(parent, "information dialog", true, (trinity_desktop_lock_use_system_modal_dialogs?((WFlags)WStyle_StaysOnTop):((WFlags)WX11BypassWM))),
- mUnlockingFailed(false)
+ : TQDialog(parent, "information dialog", true, (trinity_desktop_lock_use_system_modal_dialogs?((WFlags)WStyle_StaysOnTop):((WFlags)WX11BypassWM))),
+ mUnlockingFailed(false)
{
- if (trinity_desktop_lock_use_system_modal_dialogs) {
- // Signal that we do not want any window controls to be shown at all
- Atom kde_wm_system_modal_notification;
- kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False);
- XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
- }
- setCaption(i18n("Information"));
+ if (trinity_desktop_lock_use_system_modal_dialogs) {
+ // Signal that we do not want any window controls to be shown at all
+ Atom kde_wm_system_modal_notification;
+ kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False);
+ XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
+ }
+ setCaption(i18n("Information"));
- frame = new TQFrame( this );
- if (trinity_desktop_lock_use_system_modal_dialogs)
- frame->setFrameStyle( TQFrame::NoFrame );
- else
- frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
- frame->setLineWidth( 2 );
+ frame = new TQFrame( this );
+ if (trinity_desktop_lock_use_system_modal_dialogs) {
+ frame->setFrameStyle( TQFrame::NoFrame );
+ }
+ else {
+ frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
+ }
+ frame->setLineWidth( 2 );
- mpixLabel = new TQLabel( frame, "pixlabel" );
- mpixLabel->setPixmap(DesktopIcon("unlock"));
+ mpixLabel = new TQLabel( frame, "pixlabel" );
+ mpixLabel->setPixmap(DesktopIcon("unlock"));
- KUser user;
+ KUser user;
- mStatusLabel = new TQLabel( "<b> </b>", frame );
- mStatusLabel->setAlignment( TQLabel::AlignCenter );
+ mStatusLabel = new TQLabel( "<b> </b>", frame );
+ mStatusLabel->setAlignment( TQLabel::AlignCenter );
- TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this );
- unlockDialogLayout->addWidget( frame );
+ TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this );
+ unlockDialogLayout->addWidget( frame );
- TQHBoxLayout *layStatus = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
- layStatus->addWidget( mStatusLabel );
+ TQHBoxLayout *layStatus = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
+ layStatus->addWidget( mStatusLabel );
- frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
- frameLayout->addMultiCellWidget( mpixLabel, 0, 2, 0, 0, Qt::AlignTop );
- frameLayout->addLayout( layStatus, 1, 1 );
+ frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
+ frameLayout->addMultiCellWidget( mpixLabel, 0, 2, 0, 0, Qt::AlignTop );
+ frameLayout->addLayout( layStatus, 1, 1 );
- installEventFilter(this);
- setFixedSize( sizeHint() );
-}
+ installEventFilter(this);
+ setFixedSize( sizeHint() );
+ }
InfoDlg::~InfoDlg()
{
- hide();
+ hide();
}
void InfoDlg::updateLabel(TQString &txt)
{
- mStatusLabel->setPaletteForegroundColor(Qt::black);
- mStatusLabel->setText("<b>" + txt + "</b>");
+ mStatusLabel->setPaletteForegroundColor(Qt::black);
+ mStatusLabel->setText("<b>" + txt + "</b>");
}
void InfoDlg::setUnlockIcon()
{
- mpixLabel->setPixmap(DesktopIcon("unlock"));
+ mpixLabel->setPixmap(DesktopIcon("unlock"));
}
void InfoDlg::setKDEIcon()
{
- mpixLabel->setPixmap(DesktopIcon("about_kde"));
+ mpixLabel->setPixmap(DesktopIcon("about_kde"));
}
void InfoDlg::setInfoIcon()
{
- mpixLabel->setPixmap(DesktopIcon("messagebox_info"));
+ mpixLabel->setPixmap(DesktopIcon("messagebox_info"));
}
void InfoDlg::setWarningIcon()
{
- mpixLabel->setPixmap(DesktopIcon("messagebox_warning"));
+ mpixLabel->setPixmap(DesktopIcon("messagebox_warning"));
}
void InfoDlg::setErrorIcon()
{
- mpixLabel->setPixmap(DesktopIcon("messagebox_critical"));
+ mpixLabel->setPixmap(DesktopIcon("messagebox_critical"));
}
void InfoDlg::show()
{
- TQDialog::show();
- TQApplication::flushX();
+ TQDialog::show();
+ TQApplication::flushX();
}
#include "infodlg.moc"