Main Page | Class List | File List | Class Members | File Members | Related Pages

kwebsnapdlg.cpp

00001 #include <klocale.h>
00002 /****************************************************************************
00003 ** Form implementation generated from reading ui file '/home/bojan/Documents/Code/kwebsnap/src/kwebsnapdlg.ui'
00004 **
00005 ** Created: Thu Jun 2 23:30:44 2005
00006 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.3   edited Nov 24 2003 $)
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "kwebsnapdlg.h"
00012 
00013 #include <qvariant.h>
00014 #include <qpushbutton.h>
00015 #include <qgroupbox.h>
00016 #include <qlabel.h>
00017 #include <qbuttongroup.h>
00018 #include <qprogressbar.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 #include <qimage.h>
00023 #include <qpixmap.h>
00024 
00025 /*
00026  *  Constructs a KWebSnapDlg as a child of 'parent', with the
00027  *  name 'name' and widget flags set to 'f'.
00028  *
00029  *  The dialog will by default be modeless, unless you set 'modal' to
00030  *  TRUE to construct a modal dialog.
00031  */
00032 KWebSnapDlg::KWebSnapDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
00033     : QDialog( parent, name, modal, fl )
00034 {
00035     if ( !name )
00036         setName( "KWebSnapDlg" );
00037     setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
00038     setIcon( QPixmap::fromMimeSource( "hi32-app-kwebsnap.png" ) );
00039     setSizeGripEnabled( FALSE );
00040     KWebSnapDlgLayout = new QGridLayout( this, 1, 1, 11, 6, "KWebSnapDlgLayout"); 
00041     KWebSnapDlgLayout->setResizeMode( QLayout::Fixed );
00042 
00043     m_grbPreview = new QGroupBox( this, "m_grbPreview" );
00044     m_grbPreview->setFrameShape( QGroupBox::NoFrame );
00045 
00046     m_lblPreview = new QLabel( m_grbPreview, "m_lblPreview" );
00047     m_lblPreview->setGeometry( QRect( 0, 10, 318, 270 ) );
00048     m_lblPreview->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, m_lblPreview->sizePolicy().hasHeightForWidth() ) );
00049     m_lblPreview->setFrameShape( QLabel::Box );
00050     m_lblPreview->setScaledContents( TRUE );
00051 
00052     KWebSnapDlgLayout->addMultiCellWidget( m_grbPreview, 0, 0, 1, 2 );
00053 
00054     m_btnGroup = new QButtonGroup( this, "m_btnGroup" );
00055     m_btnGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, m_btnGroup->sizePolicy().hasHeightForWidth() ) );
00056     m_btnGroup->setFrameShape( QButtonGroup::NoFrame );
00057     m_btnGroup->setColumnLayout(0, Qt::Vertical );
00058     m_btnGroup->layout()->setSpacing( 6 );
00059     m_btnGroup->layout()->setMargin( 11 );
00060     m_btnGroupLayout = new QGridLayout( m_btnGroup->layout() );
00061     m_btnGroupLayout->setAlignment( Qt::AlignTop );
00062 
00063     m_btnStart = new QPushButton( m_btnGroup, "m_btnStart" );
00064 
00065     m_btnGroupLayout->addWidget( m_btnStart, 0, 0 );
00066 
00067     m_btnGrab = new QPushButton( m_btnGroup, "m_btnGrab" );
00068 
00069     m_btnGroupLayout->addWidget( m_btnGrab, 1, 0 );
00070 
00071     m_btnStop = new QPushButton( m_btnGroup, "m_btnStop" );
00072 
00073     m_btnGroupLayout->addWidget( m_btnStop, 2, 0 );
00074 
00075     m_btnConf = new QPushButton( m_btnGroup, "m_btnConf" );
00076 
00077     m_btnGroupLayout->addWidget( m_btnConf, 3, 0 );
00078 
00079     m_btnQuit = new QPushButton( m_btnGroup, "m_btnQuit" );
00080 
00081     m_btnGroupLayout->addWidget( m_btnQuit, 6, 0 );
00082 
00083     m_btnAbout = new QPushButton( m_btnGroup, "m_btnAbout" );
00084 
00085     m_btnGroupLayout->addWidget( m_btnAbout, 5, 0 );
00086 
00087     m_btnHelp = new QPushButton( m_btnGroup, "m_btnHelp" );
00088 
00089     m_btnGroupLayout->addWidget( m_btnHelp, 4, 0 );
00090 
00091     KWebSnapDlgLayout->addWidget( m_btnGroup, 0, 0 );
00092 
00093     m_lblLog = new QLabel( this, "m_lblLog" );
00094     m_lblLog->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, m_lblLog->sizePolicy().hasHeightForWidth() ) );
00095 
00096     KWebSnapDlgLayout->addMultiCellWidget( m_lblLog, 1, 1, 0, 1 );
00097 
00098     m_progressBar = new QProgressBar( this, "m_progressBar" );
00099     m_progressBar->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, m_progressBar->sizePolicy().hasHeightForWidth() ) );
00100 
00101     KWebSnapDlgLayout->addWidget( m_progressBar, 1, 2 );
00102     languageChange();
00103     resize( QSize(461, 356).expandedTo(minimumSizeHint()) );
00104     clearWState( WState_Polished );
00105 
00106     // signals and slots connections
00107     connect( m_btnGrab, SIGNAL( clicked() ), this, SLOT( slotSnapshot() ) );
00108     connect( m_btnStart, SIGNAL( clicked() ), this, SLOT( slotStart() ) );
00109     connect( m_btnStop, SIGNAL( clicked() ), this, SLOT( slotStop() ) );
00110     connect( m_btnAbout, SIGNAL( clicked() ), this, SLOT( slotAbout() ) );
00111     connect( m_btnQuit, SIGNAL( clicked() ), this, SLOT( slotQuit() ) );
00112     connect( m_btnConf, SIGNAL( clicked() ), this, SLOT( slotConfig() ) );
00113     connect( m_btnHelp, SIGNAL( clicked() ), this, SLOT( slotHelp() ) );
00114 }
00115 
00116 /*
00117  *  Destroys the object and frees any allocated resources
00118  */
00119 KWebSnapDlg::~KWebSnapDlg()
00120 {
00121     // no need to delete child widgets, Qt does it all for us
00122 }
00123 
00124 /*
00125  *  Sets the strings of the subwidgets using the current
00126  *  language.
00127  */
00128 void KWebSnapDlg::languageChange()
00129 {
00130     setCaption( tr2i18n( "WebSnap" ) );
00131     m_grbPreview->setTitle( QString::null );
00132     m_btnGroup->setTitle( QString::null );
00133     m_btnStart->setText( tr2i18n( "&Start" ) );
00134     m_btnStart->setAccel( QKeySequence( tr2i18n( "Alt+S" ) ) );
00135     QToolTip::add( m_btnStart, tr2i18n( "Start capture" ) );
00136     QWhatsThis::add( m_btnStart, tr2i18n( "Press this to begin capture/transfer session." ) );
00137     m_btnGrab->setText( tr2i18n( "S&napshot" ) );
00138     m_btnGrab->setAccel( QKeySequence( tr2i18n( "Alt+N" ) ) );
00139     QToolTip::add( m_btnGrab, tr2i18n( "Take a snapshot" ) );
00140     QWhatsThis::add( m_btnGrab, tr2i18n( "Take a single snapshot of the desktop." ) );
00141     m_btnStop->setText( tr2i18n( "Stop" ) );
00142     m_btnStop->setAccel( QKeySequence( QString::null ) );
00143     QToolTip::add( m_btnStop, tr2i18n( "Stop capturing" ) );
00144     QWhatsThis::add( m_btnStop, tr2i18n( "Stop the current capture/transim session." ) );
00145     m_btnConf->setText( tr2i18n( "&Configure" ) );
00146     m_btnConf->setAccel( QKeySequence( tr2i18n( "Alt+C" ) ) );
00147     QToolTip::add( m_btnConf, tr2i18n( "Configure WebSnap" ) );
00148     QWhatsThis::add( m_btnConf, tr2i18n( "Configure options, such as file names, ftp host, and capture quality." ) );
00149     m_btnQuit->setText( tr2i18n( "&Quit" ) );
00150     m_btnQuit->setAccel( QKeySequence( tr2i18n( "Alt+Q" ) ) );
00151     QToolTip::add( m_btnQuit, tr2i18n( "Quit WebSnap" ) );
00152     QWhatsThis::add( m_btnQuit, tr2i18n( "Quit WebSnap." ) );
00153     m_btnAbout->setText( tr2i18n( "&About" ) );
00154     m_btnAbout->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) );
00155     QToolTip::add( m_btnAbout, tr2i18n( "About WebSnap" ) );
00156     QWhatsThis::add( m_btnAbout, tr2i18n( "Find out about WebSnap, credits, and lisence." ) );
00157     m_btnHelp->setText( tr2i18n( "&Help" ) );
00158     m_btnHelp->setAccel( QKeySequence( tr2i18n( "Alt+H" ) ) );
00159     m_lblLog->setText( QString::null );
00160 }
00161 
00162 void KWebSnapDlg::slotSnapshot()
00163 {
00164     qWarning( "KWebSnapDlg::slotSnapshot(): Not implemented yet" );
00165 }
00166 
00167 void KWebSnapDlg::slotStart()
00168 {
00169     qWarning( "KWebSnapDlg::slotStart(): Not implemented yet" );
00170 }
00171 
00172 void KWebSnapDlg::slotStop()
00173 {
00174     qWarning( "KWebSnapDlg::slotStop(): Not implemented yet" );
00175 }
00176 
00177 void KWebSnapDlg::slotAbout()
00178 {
00179     qWarning( "KWebSnapDlg::slotAbout(): Not implemented yet" );
00180 }
00181 
00182 void KWebSnapDlg::slotQuit()
00183 {
00184     qWarning( "KWebSnapDlg::slotQuit(): Not implemented yet" );
00185 }
00186 
00187 void KWebSnapDlg::slotConfig()
00188 {
00189     qWarning( "KWebSnapDlg::slotConfig(): Not implemented yet" );
00190 }
00191 
00192 void KWebSnapDlg::slotHelp()
00193 {
00194     qWarning( "KWebSnapDlg::slotHelp(): Not implemented yet" );
00195 }
00196 
00197 #include "kwebsnapdlg.moc"

Generated on Mon Sep 5 12:52:34 2005 for kwebsnap.kdevelop by  doxygen 1.3.9.1