summaryrefslogtreecommitdiff
authordwmw2 <dwmw2>2002-04-02 14:50:03 (UTC)
committer dwmw2 <dwmw2>2002-04-02 14:50:03 (UTC)
commit78f5a64dd32d0857294ef11c3aa04333948fcece (patch) (unidiff)
tree966e3eb263238a091b11a9cdf07d5ef37ff81cb0
parent108f15e0121aca57d5828cf0f22285989d920bd7 (diff)
downloadopie-78f5a64dd32d0857294ef11c3aa04333948fcece.zip
opie-78f5a64dd32d0857294ef11c3aa04333948fcece.tar.gz
opie-78f5a64dd32d0857294ef11c3aa04333948fcece.tar.bz2
Typo fix. s/Snaphot/Snapshot/
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/screenshotapplet/screenshot.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/screenshotapplet/screenshot.cpp b/core/applets/screenshotapplet/screenshot.cpp
index 16d5588..9d8d4fc 100644
--- a/core/applets/screenshotapplet/screenshot.cpp
+++ b/core/applets/screenshotapplet/screenshot.cpp
@@ -38,97 +38,97 @@
38#include <qpixmap.h> 38#include <qpixmap.h>
39#include <qstring.h> 39#include <qstring.h>
40#include <qfile.h> 40#include <qfile.h>
41#include <qtimer.h> 41#include <qtimer.h>
42 42
43static char * snapshot_xpm[] = { 43static char * snapshot_xpm[] = {
44"16 16 10 1", 44"16 16 10 1",
45" c None", 45" c None",
46". c #000000", 46". c #000000",
47"+ c #00C000", 47"+ c #00C000",
48"@ c #585858", 48"@ c #585858",
49"# c #808080", 49"# c #808080",
50"$ c #00FF00", 50"$ c #00FF00",
51"% c #008000", 51"% c #008000",
52"& c #00FFFF", 52"& c #00FFFF",
53"* c #FF0000", 53"* c #FF0000",
54"= c #FFC0C0", 54"= c #FFC0C0",
55" ", 55" ",
56" ... ", 56" ... ",
57" ..+++..@#. ", 57" ..+++..@#. ",
58" .$++++++.#. ", 58" .$++++++.#. ",
59" .%$$++++++. ", 59" .%$$++++++. ",
60" .&%%$$++@***. ", 60" .&%%$$++@***. ",
61" .$&$++$=**@+. ", 61" .$&$++$=**@+. ",
62" .+$$+++@*$%%. ", 62" .+$$+++@*$%%. ",
63" .+++++%+++%%. ", 63" .+++++%+++%%. ",
64" .%%++++..+%%. ", 64" .%%++++..+%%. ",
65" ..%%+++++%%. ", 65" ..%%+++++%%. ",
66" ..%%+++%%. ", 66" ..%%+++%%. ",
67" ..%%+%%. ", 67" ..%%+%%. ",
68" ..%%.. ", 68" ..%%.. ",
69" .. ", 69" .. ",
70" "}; 70" "};
71 71
72 72
73ScreenshotControl::ScreenshotControl( QWidget *parent, const char *name ) 73ScreenshotControl::ScreenshotControl( QWidget *parent, const char *name )
74 : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup ) 74 : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup )
75{ 75{
76 setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); 76 setFrameStyle( QFrame::PopupPanel | QFrame::Raised );
77// qDebug("screenshot control"); 77// qDebug("screenshot control");
78 QVBoxLayout *vbox = new QVBoxLayout( this ); 78 QVBoxLayout *vbox = new QVBoxLayout( this );
79// qDebug("new layout"); 79// qDebug("new layout");
80 delaySpin = new QSpinBox( 0,60,1, this, "Spinner" ); 80 delaySpin = new QSpinBox( 0,60,1, this, "Spinner" );
81// qDebug("new spinbox"); 81// qDebug("new spinbox");
82 delaySpin->setFocusPolicy( QWidget::NoFocus ); 82 delaySpin->setFocusPolicy( QWidget::NoFocus );
83 grabItButton= new QPushButton( this, "GrabButton" ); 83 grabItButton= new QPushButton( this, "GrabButton" );
84// qDebug("new pushbutton"); 84// qDebug("new pushbutton");
85 grabItButton ->setFocusPolicy( QWidget::TabFocus ); 85 grabItButton ->setFocusPolicy( QWidget::TabFocus );
86 grabItButton->setText("Snaphot"); 86 grabItButton->setText("Snapshot");
87 vbox->setMargin( 6 ); 87 vbox->setMargin( 6 );
88 vbox->setSpacing( 3 ); 88 vbox->setSpacing( 3 );
89 vbox->addWidget( delaySpin); 89 vbox->addWidget( delaySpin);
90 vbox->setMargin( 6 ); 90 vbox->setMargin( 6 );
91 vbox->setSpacing( 3 ); 91 vbox->setSpacing( 3 );
92 vbox->addWidget( grabItButton); 92 vbox->addWidget( grabItButton);
93 93
94 setFixedHeight( 100 ); 94 setFixedHeight( 100 );
95 setFixedWidth( sizeHint().width() ); 95 setFixedWidth( sizeHint().width() );
96 setFocusPolicy(QWidget::NoFocus); 96 setFocusPolicy(QWidget::NoFocus);
97 97
98 grabTimer= new QTimer(this,"grab timer"); 98 grabTimer= new QTimer(this,"grab timer");
99// qDebug("newTimer"); 99// qDebug("newTimer");
100 connect( grabTimer, SIGNAL( timeout() ), this, SLOT( grabTimerDone() ) ); 100 connect( grabTimer, SIGNAL( timeout() ), this, SLOT( grabTimerDone() ) );
101 101
102// Config cfg("Snapshot"); 102// Config cfg("Snapshot");
103// cfg.setGroup("General"); 103// cfg.setGroup("General");
104 delaySpin->setValue(1); 104 delaySpin->setValue(1);
105// delaySpin->setValue(cfg.readNumEntry("delay",0)); 105// delaySpin->setValue(cfg.readNumEntry("delay",0));
106 connect( grabItButton, SIGNAL(released()), SLOT(slotGrab()) ); 106 connect( grabItButton, SIGNAL(released()), SLOT(slotGrab()) );
107 107
108} 108}
109 109
110void ScreenshotControl::slotGrab() 110void ScreenshotControl::slotGrab()
111{ 111{
112// qDebug("SlotGrab"); 112// qDebug("SlotGrab");
113 hide(); 113 hide();
114 if ( delaySpin->value() ) { 114 if ( delaySpin->value() ) {
115 grabTimer->start( delaySpin->value() * 1000, true ); 115 grabTimer->start( delaySpin->value() * 1000, true );
116 } else { 116 } else {
117 show(); 117 show();
118 } 118 }
119} 119}
120 120
121 121
122void ScreenshotControl::grabTimerDone() 122void ScreenshotControl::grabTimerDone()
123{ 123{
124 performGrab(); 124 performGrab();
125} 125}
126 126
127void ScreenshotControl::savePixmap() 127void ScreenshotControl::savePixmap()
128{ 128{
129 DocLnk lnk; 129 DocLnk lnk;
130 QString fileName = "sc_"+TimeString::dateString( QDateTime::currentDateTime(),false,true); 130 QString fileName = "sc_"+TimeString::dateString( QDateTime::currentDateTime(),false,true);
131 fileName.replace(QRegExp("'"),""); fileName.replace(QRegExp(" "),"_"); fileName.replace(QRegExp(":"),"."); fileName.replace(QRegExp(","),""); 131 fileName.replace(QRegExp("'"),""); fileName.replace(QRegExp(" "),"_"); fileName.replace(QRegExp(":"),"."); fileName.replace(QRegExp(","),"");
132 132
133 QString dirName = QDir::homeDirPath()+"/Documents/image/png/"; 133 QString dirName = QDir::homeDirPath()+"/Documents/image/png/";
134 if( !QDir( dirName).exists() ) { 134 if( !QDir( dirName).exists() ) {