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

prefcapture.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 
00028 #include <klocale.h>
00029 #include <knuminput.h>
00030 #include <qcheckbox.h>
00031  
00032 #include "configuration.h"
00033 #include "prefcapture.h"
00034 
00035 PrefCapture::PrefCapture(QWidget* parent, const char* name, WFlags fl)
00036 : PrefCaptureLayout(parent,name,fl)
00037 {
00038 }
00039 
00040 PrefCapture::~PrefCapture()
00041 {
00042 }
00043 
00044 /*$SPECIALIZATION$*/
00045 void PrefCapture::scaleModeChanged(int value)
00046 {
00047         if(value == Configuration::ScalePercent) 
00048         { 
00049                 m_inputMain->setRange(0, 200, 1, true);
00050                 m_inputThumb->setRange(0, 200, 1, true);
00051                 m_inputMain->setSuffix(i18n(" percent"));
00052                 m_inputThumb->setSuffix(i18n(" percent"));
00053                 m_inputMain->setValue(Config().Capture.ScaleMain);
00054                 m_inputThumb->setValue(Config().Capture.ScaleThumb);
00055         }
00056         else
00057         {
00058                 m_inputMain->setRange(0, 2600, 1, true);
00059                 m_inputThumb->setRange(0, 2600, 1, true);
00060                 m_inputMain->setSuffix(i18n(" pixels"));
00061                 m_inputThumb->setSuffix(i18n(" pixels"));
00062                 m_inputMain->setValue(Config().Capture.ScaleMain);
00063                 m_inputThumb->setValue(Config().Capture.ScaleThumb);
00064         }               
00065 }
00066 
00067 void PrefCapture::captureModeChanged(int value)
00068 {
00069         switch ( value )
00070     {
00071         case Configuration::FullScreen:
00072                         m_chkIncWD->setEnabled(false);
00073                 break;
00074         case Configuration::WindowUnderCursor:
00075                         m_chkIncWD->setEnabled(true);
00076                 break;
00077         default:
00078                 break;
00079     }
00080 }
00081 
00082 #include "prefcapture.moc"
00083 

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