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

kwebsnapwidget.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Bojan D.                                        *
00003  *   bojan_d@users.sourceforge.net                                         *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00029 #include <qpushbutton.h>
00030 #include <qlabel.h>
00031 #include <kiconloader.h>
00032 #include <kglobal.h>
00033 
00034 #include "kwebsnapwidget.h"
00035 
00036 KWebSnapWidget::KWebSnapWidget(QWidget* parent, const char* name, WFlags fl)
00037 : KWebSnapWidgetUI(parent,name,fl)
00038 {
00039         m_btnStart->setIconSet(KGlobal::iconLoader()->loadIconSet("run",KIcon::Small,0,false));
00040         m_btnGrab->setIconSet(KGlobal::iconLoader()->loadIconSet("ksnapshot",KIcon::Small,0,false));
00041         m_btnStop->setIconSet(KGlobal::iconLoader()->loadIconSet("stop",KIcon::Small,0,false));
00042         m_btnConf->setIconSet(KGlobal::iconLoader()->loadIconSet("configure",KIcon::Small,0,false));
00043         m_btnHelp->setIconSet(KGlobal::iconLoader()->loadIconSet("help",KIcon::Small,0,false));
00044         m_btnAbout->setIconSet(KGlobal::iconLoader()->loadIconSet("info",KIcon::Small,0,false));
00045         m_btnQuit->setIconSet(KGlobal::iconLoader()->loadIconSet("exit",KIcon::Small,0,false));
00046 }
00047 
00048 KWebSnapWidget::~KWebSnapWidget()
00049 {
00050 }
00051 
00052 /*$SPECIALIZATION$*/
00053 void KWebSnapWidget::slotHelp()
00054 {
00055         emit helpClicked();
00056 }
00057 
00058 void KWebSnapWidget::slotConfig()
00059 {
00060         emit configClicked();
00061 }
00062 
00063 void KWebSnapWidget::slotQuit()
00064 {
00065         emit quitClicked();
00066 }
00067 
00068 void KWebSnapWidget::slotAbout()
00069 {
00070         emit aboutClicked();
00071 }
00072 
00073 void KWebSnapWidget::slotStop()
00074 {
00075         emit stopClicked();
00076 }
00077 
00078 void KWebSnapWidget::slotStart()
00079 {
00080         emit startClicked();
00081 }
00082 
00083 void KWebSnapWidget::slotSnapshot()
00084 {
00085         emit snapClicked();
00086 }
00087 
00088 QPixmap KWebSnapWidget::preview()
00089 {
00090     return *m_lblPreview->pixmap();
00091 }
00092 
00093 
00094 int KWebSnapWidget::previewWidth()
00095 {
00096     return m_lblPreview->width();
00097 }
00098 
00099 int KWebSnapWidget::previewHeight()
00100 {
00101     return m_lblPreview->height();
00102 }
00103 
00104 void KWebSnapWidget::setPreview( const QPixmap& pm )
00105 {
00106     m_lblPreview->setPixmap(pm);
00107 }
00108 
00109 void KWebSnapWidget::setLabel( const QString& text )
00110 {
00111     m_lblLog->setText(text);
00112 }
00113 
00114 void KWebSnapWidget::setStart( bool enable )
00115 {
00116     m_btnStart->setEnabled(enable);
00117 }
00118 
00119 void KWebSnapWidget::setStop( bool enable )
00120 {
00121     m_btnStop->setEnabled(enable);
00122 }
00123 
00124 void KWebSnapWidget::setConfig( bool enable )
00125 {
00126     m_btnConf->setEnabled(enable);
00127 }
00128 
00129 #include "kwebsnapwidget.moc"
00130 

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