19 #include "tdeio/skipdlg.h"
24 #include <tqmessagebox.h>
29 #include <tdeapplication.h>
30 #include <tdelocale.h>
32 #include <kpushbutton.h>
33 #include <kstdguiitem.h>
39 using namespace TDEIO;
41 SkipDlg::SkipDlg(TQWidget *parent,
bool _multi,
const TQString& _error_text,
bool _modal ) :
42 KDialog ( parent,
"" , _modal )
51 KWin::setState( winId(), NET::StaysOnTop );
56 setCaption( i18n(
"Information" ) );
58 b0 =
new KPushButton( KStdGuiItem::cancel(),
this );
59 connect(b0, TQ_SIGNAL(clicked()),
this, TQ_SLOT(b0Pressed()));
63 b1 =
new TQPushButton( i18n(
"Skip" ),
this );
64 connect(b1, TQ_SIGNAL(clicked()),
this, TQ_SLOT(b1Pressed()));
66 b2 =
new TQPushButton( i18n(
"Auto Skip" ),
this );
67 connect(b2, TQ_SIGNAL(clicked()),
this, TQ_SLOT(b2Pressed()));
70 TQVBoxLayout *vlayout =
new TQVBoxLayout(
this, 10, 0 );
73 TQLabel * lb =
new TQLabel( _error_text,
this );
74 lb->setFixedHeight( lb->sizeHint().height() );
75 lb->setMinimumWidth( lb->sizeHint().width() );
76 vlayout->addWidget( lb );
78 vlayout->addSpacing( 10 );
80 TQHBoxLayout* layout =
new TQHBoxLayout();
81 vlayout->addLayout( layout );
84 b0->setDefault(
true );
85 b0->setFixedSize( b0->sizeHint() );
86 layout->addWidget( b0 );
87 layout->addSpacing( 5 );
91 b1->setFixedSize( b1->sizeHint() );
92 layout->addWidget( b1 );
93 layout->addSpacing( 5 );
97 b2->setFixedSize( b2->sizeHint() );
98 layout->addWidget( b2 );
99 layout->addSpacing( 5 );
102 vlayout->addStretch( 10 );
104 resize( sizeHint() );
111 void SkipDlg::b0Pressed()
116 emit result(
this, 0 );
119 void SkipDlg::b1Pressed()
124 emit result(
this, 1 );
127 void SkipDlg::b2Pressed()
132 emit result(
this, 2 );
135 SkipDlg_Result TDEIO::open_SkipDlg(
bool _multi,
const TQString& _error_text )
139 SkipDlg dlg( 0L, _multi, _error_text,
true );
140 return (SkipDlg_Result) dlg.exec();
143 #include "skipdlg.moc"
A namespace for TDEIO globals.