summaryrefslogtreecommitdiff
path: root/noncore
authorllornkcor <llornkcor>2005-08-11 10:10:40 (UTC)
committer llornkcor <llornkcor>2005-08-11 10:10:40 (UTC)
commit6040d26c56a95d9f5bd09688e22009fc5b5e124d (patch) (unidiff)
tree53ad03c346cc006d17093918d5cf6bbb09aa4b3b /noncore
parent8938048502047f781447ed24351512cdca997a2e (diff)
downloadopie-6040d26c56a95d9f5bd09688e22009fc5b5e124d.zip
opie-6040d26c56a95d9f5bd09688e22009fc5b5e124d.tar.gz
opie-6040d26c56a95d9f5bd09688e22009fc5b5e124d.tar.bz2
add opie-smb
Diffstat (limited to 'noncore') (more/less context) (show whitespace changes)
-rw-r--r--noncore/applets/volumeapplet2/volumeapplet.cpp52
-rw-r--r--noncore/applets/volumeapplet2/volumeapplet.h15
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp5
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp18
-rw-r--r--noncore/net/opie-smb/config.in4
-rw-r--r--noncore/net/opie-smb/main.cpp6
-rw-r--r--noncore/net/opie-smb/opie-smb.control12
-rw-r--r--noncore/net/opie-smb/opie-smb.pro18
-rw-r--r--noncore/net/opie-smb/qsmb.cpp402
-rw-r--r--noncore/net/opie-smb/qsmb.h39
-rw-r--r--noncore/net/opie-smb/qsmbbase.cpp146
-rw-r--r--noncore/net/opie-smb/qsmbbase.h62
-rw-r--r--noncore/net/opie-smb/qsmbbase.ui298
-rw-r--r--noncore/settings/netsystemtime/formattabwidget.cpp0
-rw-r--r--noncore/tools/calc2/binary/binary.pro28
-rw-r--r--noncore/tools/calc2/binary/binaryfactory.cpp2
-rw-r--r--noncore/tools/calc2/binary/binaryfactory.h4
-rw-r--r--noncore/tools/calc2/binary/binaryimpl.cpp2
-rw-r--r--noncore/tools/calc2/binary/binaryimpl.h2
-rw-r--r--noncore/tools/calc2/calc.cpp1
-rw-r--r--noncore/tools/calc2/simple/simple.pro22
-rw-r--r--noncore/tools/calc2/simple/simplefactory.cpp2
-rw-r--r--noncore/tools/calc2/simple/simplefactory.h4
-rw-r--r--noncore/tools/calc2/simple/simpleimpl.cpp2
-rw-r--r--noncore/tools/calc2/simple/simpleimpl.h4
25 files changed, 1099 insertions, 51 deletions
diff --git a/noncore/applets/volumeapplet2/volumeapplet.cpp b/noncore/applets/volumeapplet2/volumeapplet.cpp
index 2f61f48..2122007 100644
--- a/noncore/applets/volumeapplet2/volumeapplet.cpp
+++ b/noncore/applets/volumeapplet2/volumeapplet.cpp
@@ -38,6 +38,7 @@ _;:, .> :=|. This program is free software; you can
38#include <opie2/oresource.h> 38#include <opie2/oresource.h>
39 39
40#include <qpe/applnk.h> 40#include <qpe/applnk.h>
41#include <qpe/qpeapplication.h>
41 42
42using namespace Opie::Core; 43using namespace Opie::Core;
43using namespace Opie::MM; 44using namespace Opie::MM;
@@ -88,7 +89,8 @@ void VolumeAppletControl::build()
88 OSoundSystem* sound = OSoundSystem::instance(); 89 OSoundSystem* sound = OSoundSystem::instance();
89 OSoundSystem::CardIterator it = sound->iterator(); 90 OSoundSystem::CardIterator it = sound->iterator();
90 91
91 OMixerInterface* mixer = new OMixerInterface( this, "/dev/mixer" ); 92// OMixerInterface*
93 mixer = new OMixerInterface( this, "/dev/mixer" );
92 94
93 QStringList channels = mixer->allChannels(); 95 QStringList channels = mixer->allChannels();
94 96
@@ -97,8 +99,11 @@ void VolumeAppletControl::build()
97 99
98 for ( QStringList::Iterator it = channels.begin(); it != channels.end(); ++it ) 100 for ( QStringList::Iterator it = channels.begin(); it != channels.end(); ++it )
99 { 101 {
100 odebug << "OSSDEMO: Mixer has channel " << *it << "" << oendl; 102 if((*it) == mixer->volume( "Vol")) {
101 odebug << "OSSDEMO: +--- volume " << ( mixer->volume( *it ) & 0xff ) 103 m_vol_percent=mixer->volume( *it ) >> 8;
104 }
105 owarn << "OSSDEMO: Mixer has channel " << *it << "" << oendl;
106 owarn << "OSSDEMO: +--- volume " << ( mixer->volume( *it ) & 0xff )
102 << " (left) | " << ( mixer->volume( *it ) >> 8 ) << " (right)" << oendl; 107 << " (left) | " << ( mixer->volume( *it ) >> 8 ) << " (right)" << oendl;
103 108
104 l->addWidget( new Channel( mixer, this, *it ), 0, x++, AlignCenter ); 109 l->addWidget( new Channel( mixer, this, *it ), 0, x++, AlignCenter );
@@ -111,6 +116,16 @@ VolumeAppletControl::~VolumeAppletControl()
111{ 116{
112} 117}
113 118
119int VolumeAppletControl::volPercent ( ) const
120{
121 return m_vol_percent;
122}
123
124bool VolumeAppletControl::volMuted ( ) const
125{
126 return m_vol_muted;
127}
128
114 129
115void VolumeAppletControl::showEvent( QShowEvent* e ) 130void VolumeAppletControl::showEvent( QShowEvent* e )
116{ 131{
@@ -128,16 +143,17 @@ void VolumeAppletControl::hideEvent( QHideEvent* e )
128 143
129QSize VolumeAppletControl::sizeHint() const 144QSize VolumeAppletControl::sizeHint() const
130{ 145{
131 return QSize( 200, 200 ); //QFrame::sizeHint(); 146 int wd = QPEApplication::desktop()->width();
147 return QSize( wd, 200 ); //QFrame::sizeHint();
132} 148}
133 149
134 150
135VolumeApplet::VolumeApplet( QWidget *parent, const char *name ) 151VolumeApplet::VolumeApplet( QWidget *parent, const char *name )
136 :OTaskbarApplet( parent, name ) 152 :OTaskbarApplet( parent, name )
137{ 153{
138 setFixedHeight( AppLnk::smallIconSize() ); 154 setFixedHeight( AppLnk::smallIconSize() +4);
139 setFixedWidth( AppLnk::smallIconSize() ); 155 setFixedWidth( AppLnk::smallIconSize() );
140 _pixmap = Opie::Core::OResource::loadPixmap( "volume", Opie::Core::OResource::SmallIcon ); 156 _pixmap = new QPixmap (Opie::Core::OResource::loadPixmap( "volume", Opie::Core::OResource::SmallIcon ));
141 _control = new VolumeAppletControl( this, "control" ); 157 _control = new VolumeAppletControl( this, "control" );
142} 158}
143 159
@@ -156,7 +172,29 @@ int VolumeApplet::position()
156void VolumeApplet::paintEvent( QPaintEvent* ) 172void VolumeApplet::paintEvent( QPaintEvent* )
157{ 173{
158 QPainter p(this); 174 QPainter p(this);
159 p.drawPixmap(0, 2, _pixmap ); 175
176 p. drawPixmap ( (width()- _pixmap->width())/2, QMAX( (height()-4-_pixmap->height() )/2, 1), *_pixmap );
177 p. setPen ( darkGray );
178 p. drawRect ( 1, height() - 4, width() - 2, 4 );
179
180 OMixerInterface* mixer = new OMixerInterface( this, "/dev/mixer" );
181
182 int volPercent = mixer->volume( "Vol" ) >> 8;
183
184 int pixelsWide = volPercent * ( width() - 4 ) / 100;
185 p. fillRect ( 2, height() - 3, pixelsWide, 2, red );
186 p. fillRect ( pixelsWide + 2, height() - 3, width() - 4 - pixelsWide, 2, lightGray );
187
188// if ( _control-> volMuted ( )) {
189// p. setPen ( red );
190// p. drawLine ( 1, 2, width() - 2, height() - 5 );
191// p. drawLine ( 1, 3, width() - 2, height() - 4 );
192// p. drawLine ( width() - 2, 2, 1, height() - 5 );
193// p. drawLine ( width() - 2, 3, 1, height() - 4 );
194// }
195
196// QPainter p(this);
197 // p.drawPixmap(0, 2, _pixmap );
160} 198}
161 199
162 200
diff --git a/noncore/applets/volumeapplet2/volumeapplet.h b/noncore/applets/volumeapplet2/volumeapplet.h
index c1f1a3a..953c305 100644
--- a/noncore/applets/volumeapplet2/volumeapplet.h
+++ b/noncore/applets/volumeapplet2/volumeapplet.h
@@ -32,15 +32,17 @@
32#define VOLUMEAPPLET_H 32#define VOLUMEAPPLET_H
33 33
34#include <opie2/otaskbarapplet.h> 34#include <opie2/otaskbarapplet.h>
35#include <opie2/osoundsystem.h>
35#include <qframe.h> 36#include <qframe.h>
36#include <qstring.h> 37#include <qstring.h>
37#include <qvbox.h> 38#include <qvbox.h>
38#include <qpixmap.h> 39#include <qpixmap.h>
40//using namespace Opie::MM;
39 41
40namespace Opie 42namespace Opie
41{ 43{
42 namespace Ui { class OLedBox; } 44 namespace Ui { class OLedBox; }
43 namespace MM { class OMixerInterface; } 45// namespace MM { class OMixerInterface; }
44} 46}
45class QLabel; 47class QLabel;
46class QSlider; 48class QSlider;
@@ -69,6 +71,13 @@ class VolumeAppletControl : public QFrame
69 public: 71 public:
70 VolumeAppletControl( Opie::Ui::OTaskbarApplet* parent, const char* name = 0 ); 72 VolumeAppletControl( Opie::Ui::OTaskbarApplet* parent, const char* name = 0 );
71 ~VolumeAppletControl(); 73 ~VolumeAppletControl();
74 bool volMuted() const;
75 int volPercent() const;
76
77 int m_vol_percent;
78 bool m_vol_muted;
79
80 Opie::MM::OMixerInterface* mixer;
72 81
73 virtual QSize sizeHint() const; 82 virtual QSize sizeHint() const;
74 83
@@ -78,8 +87,8 @@ class VolumeAppletControl : public QFrame
78 void build(); 87 void build();
79 88
80 private: 89 private:
81 QGridLayout* l;
82 90
91 QGridLayout* l;
83}; 92};
84 93
85 94
@@ -96,7 +105,7 @@ class VolumeApplet : public Opie::Ui::OTaskbarApplet
96 105
97 private: 106 private:
98 VolumeAppletControl* _control; 107 VolumeAppletControl* _control;
99 QPixmap _pixmap; 108 QPixmap* _pixmap;
100}; 109};
101 110
102#endif 111#endif
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp
index feda198..95e619b 100644
--- a/noncore/apps/advancedfm/advancedfmData.cpp
+++ b/noncore/apps/advancedfm/advancedfmData.cpp
@@ -22,6 +22,7 @@ using namespace Opie::Core;
22using namespace Opie::Ui; 22using namespace Opie::Ui;
23 23
24/* QT */ 24/* QT */
25#include <qframe.h>
25#include <qlayout.h> 26#include <qlayout.h>
26#include <qhbox.h> 27#include <qhbox.h>
27#include <qmenubar.h> 28#include <qmenubar.h>
@@ -37,6 +38,10 @@ void AdvancedFm::init() {
37 b = false; 38 b = false;
38 setCaption( tr( "AdvancedFm" ) ); 39 setCaption( tr( "AdvancedFm" ) );
39 40
41// QFrame* frame = new QFrame(this);
42// setCentralWidget(frame);
43// QVBoxLayout *layout = new QVBoxLayout( frame );
44
40 QVBoxLayout *layout = new QVBoxLayout( this ); 45 QVBoxLayout *layout = new QVBoxLayout( this );
41 layout->setSpacing( 2); 46 layout->setSpacing( 2);
42 layout->setMargin( 0); // squeeze 47 layout->setMargin( 0); // squeeze
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 80324eb..ed280aa 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -656,15 +656,29 @@ void AdvancedFm::fileStatus() {
656 if( !CurrentView()->currentItem()) return; 656 if( !CurrentView()->currentItem()) return;
657 QString curFile; 657 QString curFile;
658 curFile = CurrentView()->currentItem()->text(0); 658 curFile = CurrentView()->currentItem()->text(0);
659 659 if(QFileInfo("/usr/bin/stat").exists()) {
660 QStringList command; 660 QStringList command;
661 command << "/bin/sh"; 661 command << "/bin/sh";
662 command << "-c"; 662 command << "-c";
663 command << "stat -l "+ curFile; 663 command << "stat -l "+ curFile;
664
665 Output *outDlg; 664 Output *outDlg;
666 outDlg = new Output( command, this, tr("AdvancedFm Output"), true); 665 outDlg = new Output( command, this, tr("AdvancedFm Output"), true);
667 QPEApplication::execDialog( outDlg ); 666 QPEApplication::execDialog( outDlg );
667 } else {
668/* struct stat buf;
669 stat( curFile.local8bit(), &buf);
670
671 st_dev dev;
672 st_uid uid;
673 st_gid gid;
674 st_size size;
675 st_atime atime;
676 st_mtime mtime;
677 st_ctime ctime;
678 st_mode mode;
679*/
680 }
681
668 qApp->processEvents(); 682 qApp->processEvents();
669} 683}
670 684
diff --git a/noncore/net/opie-smb/config.in b/noncore/net/opie-smb/config.in
new file mode 100644
index 0000000..4ff78fd
--- a/dev/null
+++ b/noncore/net/opie-smb/config.in
@@ -0,0 +1,4 @@
1 config OPIESMB
2 boolean "opie-smb (samba front end client for Opie)"
3 default "n"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE
diff --git a/noncore/net/opie-smb/main.cpp b/noncore/net/opie-smb/main.cpp
new file mode 100644
index 0000000..5fae972
--- a/dev/null
+++ b/noncore/net/opie-smb/main.cpp
@@ -0,0 +1,6 @@
1#include "qsmb.h"
2#include <opie2/oapplicationfactory.h>
3using namespace Opie::Core;
4OPIE_EXPORT_APP( OApplicationFactory<Qsmb> )
5
6
diff --git a/noncore/net/opie-smb/opie-smb.control b/noncore/net/opie-smb/opie-smb.control
new file mode 100644
index 0000000..ce5c6bf
--- a/dev/null
+++ b/noncore/net/opie-smb/opie-smb.control
@@ -0,0 +1,12 @@
1Package: smbclient
2Version: 1.0
3Architecture: arm
4Arch: arm
5Maintainer: Kurt Korbatits (support@midget.net.au)
6Section: Network
7Priority: optional
8Description: Gui front end for samba utilities.
9Source:
10Depends: smbclient
11
12
diff --git a/noncore/net/opie-smb/opie-smb.pro b/noncore/net/opie-smb/opie-smb.pro
new file mode 100644
index 0000000..90f9980
--- a/dev/null
+++ b/noncore/net/opie-smb/opie-smb.pro
@@ -0,0 +1,18 @@
1 TEMPLATE= app
2 CONFIG += qte warn_on quickapp debug
3 HEADERS = qsmb.h
4 SOURCES = main.cpp qsmb.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include
7DESTDIR = $(OPIEDIR)/bin
8LIBS += -lqpe -lopiecore2 -lopieui2 -lpthread
9
10 # INCLUDEPATH+= $(QPEDIR)/include
11 # DEPENDPATH+= $(QPEDIR)/include
12# LIBS +=
13
14 INTERFACES= qsmbbase.ui
15 TARGET = opie-smb
16
17#DEFINES += QT_QWS_NONOPIE
18include( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/opie-smb/qsmb.cpp b/noncore/net/opie-smb/qsmb.cpp
new file mode 100644
index 0000000..527ab38
--- a/dev/null
+++ b/noncore/net/opie-smb/qsmb.cpp
@@ -0,0 +1,402 @@
1#include "qsmb.h"
2#include <qpushbutton.h>
3#include <qpe/qpeapplication.h>
4
5#include <string.h>
6#include <qstring.h>
7#include <qdir.h>
8#include <qfileinfo.h>
9
10#include <qlabel.h>
11#include <qlineedit.h>
12#include <qcombobox.h>
13#include <qstringlist.h>
14#include <qcheckbox.h>
15#include <qtextview.h>
16#include <qmessagebox.h>
17
18
19#include <pthread.h>
20#include <signal.h>
21#include <ctype.h>
22
23
24#include <opie2/odebug.h>
25using namespace Opie::Core;
26
27
28Qsmb::Qsmb( QWidget* parent, const char* name, WFlags fl )
29 : FormQPESMBBase( parent, name, fl )
30{
31 connect(CBHost, SIGNAL(activated(int)), this, SLOT(hostSelected(int)));
32 connect(DoItBtn, SIGNAL(clicked()), this, SLOT(DoItClicked()));
33 connect(BtnScan, SIGNAL(clicked()), this, SLOT(scanClicked()));
34 connect(BtnClear, SIGNAL(clicked()), this, SLOT(clear()));
35
36//TODO configurable mount points
37 if(!QFileInfo("/mnt/samba1").exists()) system("mkdir /mnt/samba1");
38 if(!QFileInfo("/mnt/samba2").exists()) system("mkdir /mnt/samba2");
39 if(!QFileInfo("/mnt/samba2").exists()) system("mkdir /mnt/samba3");
40
41 mountpt->insertItem("/mnt/samba1",-1);
42 mountpt->insertItem("/mnt/samba2",-1);
43 mountpt->insertItem("/mnt/samba3",-1);
44
45 top_element = NULL;
46 scanning = false;
47}
48
49Qsmb::~Qsmb()
50{
51}
52
53void Qsmb::clear()
54{
55 if (scanning) return;
56 ListViewScan->clear();
57 TextViewOutput->setText("");
58 top_element = NULL;
59}
60
61void Qsmb::scanClicked()
62{
63 if (scanning) return;
64 pthread_create(&tpid, NULL, runit, (void *)this);
65}
66
67void Qsmb::DoItClicked()
68{
69
70 if(! ListViewScan->selectedItem()) {
71 QMessageBox::warning(this, tr("Error"),tr("<p>No share selected!</p>"));
72 return;
73 }
74 if (scanning) return;
75 pthread_create(&tpid, NULL, runitm, (void *)this);
76}
77
78void* runit(void* arg)
79{
80 Qsmb* caller = (Qsmb*)arg;
81 caller->scan();
82 return(0);
83}
84
85void* runitm(void* arg)
86{
87 Qsmb* caller = (Qsmb*)arg;
88 caller->DoIt();
89 return(0);
90}
91
92void Qsmb::scan()
93{
94 int i;
95
96 if (scanning) return;
97 scanning = true;
98
99 char match[512], lmhosts[512];
100 QString cmd;
101 char result[256];
102
103 FILE *pipe, *pipe2;
104
105 LScan->setText("Scanning...");
106 qApp->processEvents();
107
108 cmd = "ifconfig |grep 'addr:'|awk '{print $2}'|awk 'BEGIN{FS=\":\"}{print $2}'|sed 's/\\.[0-9]*$//'|head -n1";
109
110 owarn << "cmd: " << cmd << oendl;
111
112 /* run findsmb & read output */
113 if ((pipe = popen(cmd.latin1(), "r")) == NULL) {
114 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
115 TextViewOutput->append(result);
116 return;
117 }
118 while(fgets(result, 256, pipe) != NULL) {
119 strcpy( match, result);
120 match[5]='\0';
121 break;
122 }
123 owarn << "match: " << match << oendl;
124
125 cmd = "/usr/bin/findsmb";
126 owarn <<"cmd: " << cmd << oendl;
127
128 TextViewOutput->append(cmd);
129
130 snprintf(lmhosts, 512, "echo '127.0.0.1 localhost'>/etc/samba/lmhosts");
131
132 if ((pipe2 = popen(lmhosts, "r")) == NULL) {
133 snprintf(result, 256, "Error: Can't run %s", lmhosts);
134 //TextViewOutput->append(result);
135 return;
136 }
137
138 /* run command & read output */
139 if ((pipe = popen(cmd.latin1(), "r")) == NULL) {
140 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
141 TextViewOutput->append(result);
142 return;
143 }
144
145 /* parse output and display in ListViewScan */
146 while(fgets(result, 256, pipe) != NULL) {
147 /* put result into TextViewOutput */
148 TextViewOutput->append(result);
149
150 if( strstr(result, match) != NULL ) {
151 char ip_addr[256], host[256], *ptr1;
152
153 strcpy( ip_addr, result);
154 ptr1 = strchr(ip_addr,' ');
155 strcpy( host, ptr1);
156 ip_addr[ptr1 - ip_addr]='\0';
157
158 for(i = 0; i < 256; i++) {
159 if(host[i]!=' ') {
160 strcpy( host, host + i);
161 break;
162 }
163 }
164 ptr1 = strchr(host,' ');
165 host[ptr1 - host] = '\0';
166
167 owarn << "add host: " << host << oendl;
168
169 CBHost->insertItem( host, -1);
170 snprintf( lmhosts, 512, "echo '%s %s'>>/etc/samba/lmhosts", ip_addr,host);
171
172 owarn << "lmhosts: " << lmhosts << oendl;
173
174 if ((pipe2 = popen(lmhosts, "r")) == NULL) {
175 snprintf(result, 256, "Error: Can't run %s", lmhosts);
176 return;
177 }
178 }
179 }
180
181 TextViewOutput->append("\n\n============================================\n");
182 LScan->setText("");
183 scanning = false;
184}
185
186void Qsmb::hostSelected(int index)
187{
188 owarn << "hostSelected" << oendl;
189 int i;
190
191 QListViewItem *element;
192 QListViewItem *parent;
193
194 QString text = CBHost->currentText();
195
196 if (scanning) return;
197 scanning = true;
198
199 QString cmd;
200 char result[256];
201
202 FILE *pipe;
203
204 LScan->setText("Scanning...");
205
206 if((const char *)username->text() == '\0')
207 cmd = "/usr/bin/smbclient -L //"+CBHost->currentText()+" -N 2>&1 |grep Disk";
208 else
209 cmd = "/usr/bin/smbclient -L //"+CBHost->currentText()+" -N -U"+username->text()+":"+password->text()+" 2>&1 |grep Disk";
210
211 for(i = 0; i < 512; i++) {
212 if(cmd[i]==':') {
213 cmd[i]='%';
214 break;
215 }
216 if(cmd[i]=='\0')
217 break;
218 }
219
220 owarn << "i="<< index << "cmd:" << cmd << oendl;
221
222 TextViewOutput->append(cmd);
223
224 /* run smbclient & read output */
225 if ((pipe = popen(cmd.latin1(), "r")) == NULL) {
226 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
227// cmd = "Error: Can't run "+cmd;
228 TextViewOutput->append(result);
229 return;
230 }
231
232 /* parse output and display in ListViewScan */
233 while(fgets(result, 256, pipe) != NULL) {
234 /* put result into TextViewOutput */
235 TextViewOutput->append(result);
236
237 if( strchr(result, '$') == NULL ) {
238 char share[256], *ptr1;
239
240 strcpy(share,result);
241 ptr1 = strchr(share,' ');
242 share[ptr1 - share]='\0';
243
244 owarn<< "add share: " << share << oendl;
245
246 if(top_element != NULL) {
247 bool found = false;
248 element = top_element;
249
250 while(element != NULL && !found) {
251 if(strcmp( element->text(0).ascii(), share)==0) {
252 parent = element;
253 found = true;
254 }
255 element = element->nextSibling();
256 }
257
258 if(!found) {
259 element = new QListViewItem(ListViewScan,share);
260 element->setOpen(true);
261 parent=element;
262 }
263 } else {
264 element = new QListViewItem(ListViewScan,share);
265 element->setOpen(true);
266 top_element = element;
267 parent = element;
268 }
269 }
270 }
271
272 TextViewOutput->append("\n\n============================================\n");
273 LScan->setText("");
274 scanning = false;
275}
276
277void Qsmb::DoIt()
278{
279 QListViewItem *element;
280 element = ListViewScan->selectedItem();
281 if(!element) {
282 QMessageBox::warning(this, tr("Error!!"),tr("<p><b>No</b> share selected!!</p>"));
283 return;
284 }
285
286 if (scanning) return;
287 scanning = true;
288
289 int i;
290
291 char share[512];
292 QString cmd;
293 QString cmd2;
294 char result[256];
295// QString result;
296 QString text = mountpt->currentText();
297
298 FILE *pipe,*pipe2;
299
300 LScan->setText("Mounting...");
301 qApp->processEvents();
302
303 cmd = "mkdir -p "+ text;
304
305 owarn<<"cmd: "<< cmd << oendl;
306
307 /* make sure mount exists! */
308 if ((pipe2 = popen(cmd.latin1(), "r")) == NULL) {
309
310 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
311 // result = "Error: Can't run " + cmd;
312 TextViewOutput->append(result);
313 return;
314 }
315
316 while(fgets(result, 256, pipe2) != NULL) {
317 /* put result into TextViewOutput */
318 TextViewOutput->append(result);
319 }
320
321
322 strcpy(share,(const char *)element->text(0));
323
324 for(i = 0; i < 256; i++) {
325 if(isalpha( share[i])) {
326 strcpy( share, share + i);
327 break;
328 }
329 }
330
331 cmd = "/usr/bin/smbmount //"+CBHost->currentText()+"/"+share+" "+mountpt->currentText()+" -U"+username->text()+":"+password->text();
332
333 for(i = 0; i < 512; i++) {
334 if(cmd[i]==':') {
335 cmd[i]='%';
336 break;
337 }
338 if(cmd[i]=='\0')
339 break;
340 }
341
342 owarn << "cmd: " << cmd << oendl;
343 TextViewOutput->append(cmd.latin1());
344
345
346 if(onbootBtn->isChecked()) {
347 owarn << "Saving Setting permanently..." << oendl;
348 cmd2 = "echo '" + cmd + "'>/opt/QtPalmtop/etc/samba.env";
349
350 /* run command & read output */
351 if ((pipe = popen(cmd2.latin1(), "r")) == NULL) {
352
353 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
354// result = "Error: Can't run "+ cmd;
355 //TextViewOutput->append(result);
356 return;
357 }
358 /* parse output and display in ListViewScan */
359 while(fgets(result, 256, pipe) != NULL) {
360 /* put result into TextViewOutput */
361 //TextViewOutput->append(result);
362 }
363 }
364
365 /* run command & read output */
366 if ((pipe = popen(cmd.latin1(), "r")) == NULL) {
367
368// result = "Error: Can't run "+ cmd;
369 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
370
371 TextViewOutput->append(result);
372 return;
373 }
374
375 /* parse output and display in ListViewScan */
376 while(fgets(result, 256, pipe) != NULL) {
377 /* put result into TextViewOutput */
378 TextViewOutput->append(result);
379 }
380 TextViewOutput->append("\n\n================CheckMounts==================\n");
381 LScan->setText("");
382
383 cmd = "/bin/mount 2>&1";
384 owarn << "cmd: " << cmd << oendl;
385
386 if ((pipe2 = popen(cmd.latin1(), "r")) == NULL) {
387
388 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
389// result = "Error: Can't run "+ cmd;
390
391 TextViewOutput->append(result);
392 return;
393 }
394 /* parse output and display in ListViewScan */
395 while(fgets(result, 256, pipe2) != NULL) {
396 /* put result into TextViewOutput */
397 TextViewOutput->append(result);
398 }
399
400 TextViewOutput->append("\n\n============================================\n");
401 scanning = false;
402}
diff --git a/noncore/net/opie-smb/qsmb.h b/noncore/net/opie-smb/qsmb.h
new file mode 100644
index 0000000..8fefe91
--- a/dev/null
+++ b/noncore/net/opie-smb/qsmb.h
@@ -0,0 +1,39 @@
1#ifndef QSMB_H
2#define QSMB_H
3
4#include "qsmbbase.h"
5
6#include <stdlib.h>
7#include <stdlib.h>
8#include <stdio.h>
9
10#include <qlistview.h>
11#include <pthread.h>
12
13class Qsmb : public FormQPESMBBase
14{
15 Q_OBJECT
16
17public:
18 static QString appName() { return QString::fromLatin1("opie-smb"); }
19 Qsmb( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
20 ~Qsmb();
21 void scan();
22 void DoIt();
23
24private:
25 QListViewItem *top_element;
26 QComboBox *hosts;
27 pthread_t tpid;
28 bool scanning;
29
30public slots:
31 void clear();
32 void scanClicked();
33 void hostSelected(int);
34 void DoItClicked();
35};
36void* runit(void *arg);
37void* runitm(void *arg);
38
39#endif // QSMB_H
diff --git a/noncore/net/opie-smb/qsmbbase.cpp b/noncore/net/opie-smb/qsmbbase.cpp
new file mode 100644
index 0000000..21cd306
--- a/dev/null
+++ b/noncore/net/opie-smb/qsmbbase.cpp
@@ -0,0 +1,146 @@
1/****************************************************************************
2** Form implementation generated from reading ui file 'qsmbbase.ui'
3**
4** Created: Thu Aug 11 19:30:44 2005
5** by: The User Interface Compiler (uic)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9#include "qsmbbase.h"
10
11#include <qcheckbox.h>
12#include <qcombobox.h>
13#include <qheader.h>
14#include <qlabel.h>
15#include <qlineedit.h>
16#include <qlistview.h>
17#include <qpushbutton.h>
18#include <qtabwidget.h>
19#include <qtextview.h>
20#include <qlayout.h>
21#include <qvariant.h>
22#include <qtooltip.h>
23#include <qwhatsthis.h>
24
25/*
26 * Constructs a FormQPESMBBase which is a child of 'parent', with the
27 * name 'name' and widget flags set to 'f'
28 */
29FormQPESMBBase::FormQPESMBBase( QWidget* parent, const char* name, WFlags fl )
30 : QWidget( parent, name, fl )
31{
32 if ( !name )
33 setName( "FormQPESMBBase" );
34 resize( 254, 352 );
35 QFont f( font() );
36 setFont( f );
37 setCaption( tr( "Opie Smb" ) );
38 FormQPESMBBaseLayout = new QGridLayout( this );
39 FormQPESMBBaseLayout->setSpacing( 2 );
40 FormQPESMBBaseLayout->setMargin( 0 );
41
42 TabWidget2 = new QTabWidget( this, "TabWidget2" );
43
44 tab = new QWidget( TabWidget2, "tab" );
45 tabLayout = new QGridLayout( tab );
46 tabLayout->setSpacing( 0 );
47 tabLayout->setMargin( 2 );
48
49 CBHost = new QComboBox( FALSE, tab, "CBHost" );
50
51 tabLayout->addMultiCellWidget( CBHost, 1, 1, 0, 3 );
52
53 mountpt = new QComboBox( FALSE, tab, "mountpt" );
54
55 tabLayout->addMultiCellWidget( mountpt, 4, 4, 1, 3 );
56
57 LScan = new QLabel( tab, "LScan" );
58 LScan->setText( tr( "" ) );
59
60 tabLayout->addWidget( LScan, 0, 3 );
61
62 textLabel1 = new QLabel( tab, "textLabel1" );
63 textLabel1->setText( tr( "mount pt:" ) );
64
65 tabLayout->addWidget( textLabel1, 4, 0 );
66
67 ListViewScan = new QListView( tab, "ListViewScan" );
68 ListViewScan->addColumn( tr( "Shares" ) );
69
70 tabLayout->addMultiCellWidget( ListViewScan, 2, 2, 0, 3 );
71
72 BtnScan = new QPushButton( tab, "BtnScan" );
73 BtnScan->setText( tr( "&Scan" ) );
74
75 tabLayout->addMultiCellWidget( BtnScan, 0, 0, 0, 1 );
76
77 BtnClear = new QPushButton( tab, "BtnClear" );
78 BtnClear->setText( tr( "&Clear" ) );
79
80 tabLayout->addWidget( BtnClear, 0, 2 );
81
82 onbootBtn = new QCheckBox( tab, "onbootBtn" );
83 onbootBtn->setText( tr( "Reconnect on boot" ) );
84
85 tabLayout->addMultiCellWidget( onbootBtn, 3, 3, 0, 2 );
86
87 DoItBtn = new QPushButton( tab, "DoItBtn" );
88 DoItBtn->setText( tr( "&Login" ) );
89
90 tabLayout->addMultiCellWidget( DoItBtn, 5, 5, 0, 1 );
91
92 Layout6 = new QGridLayout;
93 Layout6->setSpacing( 6 );
94 Layout6->setMargin( 0 );
95
96 Layout2 = new QHBoxLayout;
97 Layout2->setSpacing( 6 );
98 Layout2->setMargin( 0 );
99
100 pwdlabel = new QLabel( tab, "pwdlabel" );
101 pwdlabel->setText( tr( "password" ) );
102 Layout2->addWidget( pwdlabel );
103
104 password = new QLineEdit( tab, "password" );
105 Layout2->addWidget( password );
106
107 Layout6->addLayout( Layout2, 1, 0 );
108
109 Layout5 = new QHBoxLayout;
110 Layout5->setSpacing( 6 );
111 Layout5->setMargin( 0 );
112
113 usrlabel = new QLabel( tab, "usrlabel" );
114 usrlabel->setText( tr( "username" ) );
115 Layout5->addWidget( usrlabel );
116
117 username = new QLineEdit( tab, "username" );
118 Layout5->addWidget( username );
119
120 Layout6->addLayout( Layout5, 0, 0 );
121
122 tabLayout->addMultiCellLayout( Layout6, 5, 5, 2, 3 );
123 TabWidget2->insertTab( tab, tr( "Scan" ) );
124
125 tab_2 = new QWidget( TabWidget2, "tab_2" );
126 tabLayout_2 = new QGridLayout( tab_2 );
127 tabLayout_2->setSpacing( 6 );
128 tabLayout_2->setMargin( 11 );
129
130 TextViewOutput = new QTextView( tab_2, "TextViewOutput" );
131 TextViewOutput->setTextFormat( QTextView::PlainText );
132
133 tabLayout_2->addWidget( TextViewOutput, 0, 0 );
134 TabWidget2->insertTab( tab_2, tr( "SMB Output" ) );
135
136 FormQPESMBBaseLayout->addWidget( TabWidget2, 0, 0 );
137}
138
139/*
140 * Destroys the object and frees any allocated resources
141 */
142FormQPESMBBase::~FormQPESMBBase()
143{
144 // no need to delete child widgets, Qt does it all for us
145}
146
diff --git a/noncore/net/opie-smb/qsmbbase.h b/noncore/net/opie-smb/qsmbbase.h
new file mode 100644
index 0000000..3ee2f57
--- a/dev/null
+++ b/noncore/net/opie-smb/qsmbbase.h
@@ -0,0 +1,62 @@
1/****************************************************************************
2** Form interface generated from reading ui file 'qsmbbase.ui'
3**
4** Created: Thu Aug 11 19:30:41 2005
5** by: The User Interface Compiler (uic)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9#ifndef FORMQPESMBBASE_H
10#define FORMQPESMBBASE_H
11
12#include <qvariant.h>
13#include <qwidget.h>
14class QVBoxLayout;
15class QHBoxLayout;
16class QGridLayout;
17class QCheckBox;
18class QComboBox;
19class QLabel;
20class QLineEdit;
21class QListView;
22class QListViewItem;
23class QPushButton;
24class QTabWidget;
25class QTextView;
26
27class FormQPESMBBase : public QWidget
28{
29 Q_OBJECT
30
31public:
32 FormQPESMBBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
33 ~FormQPESMBBase();
34
35 QTabWidget* TabWidget2;
36 QWidget* tab;
37 QComboBox* CBHost;
38 QComboBox* mountpt;
39 QLabel* LScan;
40 QLabel* textLabel1;
41 QListView* ListViewScan;
42 QPushButton* BtnScan;
43 QPushButton* BtnClear;
44 QCheckBox* onbootBtn;
45 QPushButton* DoItBtn;
46 QLabel* pwdlabel;
47 QLineEdit* password;
48 QLabel* usrlabel;
49 QLineEdit* username;
50 QWidget* tab_2;
51 QTextView* TextViewOutput;
52
53protected:
54 QGridLayout* FormQPESMBBaseLayout;
55 QGridLayout* tabLayout;
56 QGridLayout* Layout6;
57 QHBoxLayout* Layout2;
58 QHBoxLayout* Layout5;
59 QGridLayout* tabLayout_2;
60};
61
62#endif // FORMQPESMBBASE_H
diff --git a/noncore/net/opie-smb/qsmbbase.ui b/noncore/net/opie-smb/qsmbbase.ui
new file mode 100644
index 0000000..35a1aec
--- a/dev/null
+++ b/noncore/net/opie-smb/qsmbbase.ui
@@ -0,0 +1,298 @@
1<!DOCTYPE UI><UI>
2<class>FormQPESMBBase</class>
3<widget>
4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>FormQPESMBBase</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>254</width>
15 <height>352</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>font</name>
20 <font>
21 </font>
22 </property>
23 <property stdset="1">
24 <name>caption</name>
25 <string>Opie Smb</string>
26 </property>
27 <property>
28 <name>layoutMargin</name>
29 </property>
30 <property>
31 <name>layoutSpacing</name>
32 </property>
33 <grid>
34 <property stdset="1">
35 <name>margin</name>
36 <number>0</number>
37 </property>
38 <property stdset="1">
39 <name>spacing</name>
40 <number>2</number>
41 </property>
42 <widget row="0" column="0" >
43 <class>QTabWidget</class>
44 <property stdset="1">
45 <name>name</name>
46 <cstring>TabWidget2</cstring>
47 </property>
48 <property>
49 <name>layoutMargin</name>
50 </property>
51 <property>
52 <name>layoutSpacing</name>
53 </property>
54 <widget>
55 <class>QWidget</class>
56 <property stdset="1">
57 <name>name</name>
58 <cstring>tab</cstring>
59 </property>
60 <attribute>
61 <name>title</name>
62 <string>Scan</string>
63 </attribute>
64 <grid>
65 <property stdset="1">
66 <name>margin</name>
67 <number>2</number>
68 </property>
69 <property stdset="1">
70 <name>spacing</name>
71 <number>0</number>
72 </property>
73 <widget row="1" column="0" rowspan="1" colspan="4" >
74 <class>QComboBox</class>
75 <property stdset="1">
76 <name>name</name>
77 <cstring>CBHost</cstring>
78 </property>
79 </widget>
80 <widget row="4" column="1" rowspan="1" colspan="3" >
81 <class>QComboBox</class>
82 <property stdset="1">
83 <name>name</name>
84 <cstring>mountpt</cstring>
85 </property>
86 </widget>
87 <widget row="0" column="3" >
88 <class>QLabel</class>
89 <property stdset="1">
90 <name>name</name>
91 <cstring>LScan</cstring>
92 </property>
93 <property stdset="1">
94 <name>text</name>
95 <string></string>
96 </property>
97 </widget>
98 <widget row="4" column="0" >
99 <class>QLabel</class>
100 <property stdset="1">
101 <name>name</name>
102 <cstring>textLabel1</cstring>
103 </property>
104 <property stdset="1">
105 <name>text</name>
106 <string>mount pt:</string>
107 </property>
108 </widget>
109 <widget row="2" column="0" rowspan="1" colspan="4" >
110 <class>QListView</class>
111 <column>
112 <property>
113 <name>text</name>
114 <string>Shares</string>
115 </property>
116 <property>
117 <name>clickable</name>
118 <bool>true</bool>
119 </property>
120 <property>
121 <name>resizeable</name>
122 <bool>true</bool>
123 </property>
124 </column>
125 <property stdset="1">
126 <name>name</name>
127 <cstring>ListViewScan</cstring>
128 </property>
129 </widget>
130 <widget row="0" column="0" rowspan="1" colspan="2" >
131 <class>QPushButton</class>
132 <property stdset="1">
133 <name>name</name>
134 <cstring>BtnScan</cstring>
135 </property>
136 <property stdset="1">
137 <name>text</name>
138 <string>&amp;Scan</string>
139 </property>
140 </widget>
141 <widget row="0" column="2" >
142 <class>QPushButton</class>
143 <property stdset="1">
144 <name>name</name>
145 <cstring>BtnClear</cstring>
146 </property>
147 <property stdset="1">
148 <name>text</name>
149 <string>&amp;Clear</string>
150 </property>
151 </widget>
152 <widget row="3" column="0" rowspan="1" colspan="3" >
153 <class>QCheckBox</class>
154 <property stdset="1">
155 <name>name</name>
156 <cstring>onbootBtn</cstring>
157 </property>
158 <property stdset="1">
159 <name>text</name>
160 <string>Reconnect on boot</string>
161 </property>
162 </widget>
163 <widget row="5" column="0" rowspan="1" colspan="2" >
164 <class>QPushButton</class>
165 <property stdset="1">
166 <name>name</name>
167 <cstring>DoItBtn</cstring>
168 </property>
169 <property stdset="1">
170 <name>text</name>
171 <string>&amp;Login</string>
172 </property>
173 </widget>
174 <widget row="5" column="2" rowspan="1" colspan="2" >
175 <class>QLayoutWidget</class>
176 <property stdset="1">
177 <name>name</name>
178 <cstring>Layout6</cstring>
179 </property>
180 <grid>
181 <property stdset="1">
182 <name>margin</name>
183 <number>0</number>
184 </property>
185 <property stdset="1">
186 <name>spacing</name>
187 <number>6</number>
188 </property>
189 <widget row="1" column="0" >
190 <class>QLayoutWidget</class>
191 <property stdset="1">
192 <name>name</name>
193 <cstring>Layout2</cstring>
194 </property>
195 <hbox>
196 <property stdset="1">
197 <name>margin</name>
198 <number>0</number>
199 </property>
200 <property stdset="1">
201 <name>spacing</name>
202 <number>6</number>
203 </property>
204 <widget>
205 <class>QLabel</class>
206 <property stdset="1">
207 <name>name</name>
208 <cstring>pwdlabel</cstring>
209 </property>
210 <property stdset="1">
211 <name>text</name>
212 <string>password</string>
213 </property>
214 </widget>
215 <widget>
216 <class>QLineEdit</class>
217 <property stdset="1">
218 <name>name</name>
219 <cstring>password</cstring>
220 </property>
221 </widget>
222 </hbox>
223 </widget>
224 <widget row="0" column="0" >
225 <class>QLayoutWidget</class>
226 <property stdset="1">
227 <name>name</name>
228 <cstring>Layout5</cstring>
229 </property>
230 <hbox>
231 <property stdset="1">
232 <name>margin</name>
233 <number>0</number>
234 </property>
235 <property stdset="1">
236 <name>spacing</name>
237 <number>6</number>
238 </property>
239 <widget>
240 <class>QLabel</class>
241 <property stdset="1">
242 <name>name</name>
243 <cstring>usrlabel</cstring>
244 </property>
245 <property stdset="1">
246 <name>text</name>
247 <string>username</string>
248 </property>
249 </widget>
250 <widget>
251 <class>QLineEdit</class>
252 <property stdset="1">
253 <name>name</name>
254 <cstring>username</cstring>
255 </property>
256 </widget>
257 </hbox>
258 </widget>
259 </grid>
260 </widget>
261 </grid>
262 </widget>
263 <widget>
264 <class>QWidget</class>
265 <property stdset="1">
266 <name>name</name>
267 <cstring>tab</cstring>
268 </property>
269 <attribute>
270 <name>title</name>
271 <string>SMB Output</string>
272 </attribute>
273 <grid>
274 <property stdset="1">
275 <name>margin</name>
276 <number>11</number>
277 </property>
278 <property stdset="1">
279 <name>spacing</name>
280 <number>6</number>
281 </property>
282 <widget row="0" column="0" >
283 <class>QTextView</class>
284 <property stdset="1">
285 <name>name</name>
286 <cstring>TextViewOutput</cstring>
287 </property>
288 <property stdset="1">
289 <name>textFormat</name>
290 <enum>PlainText</enum>
291 </property>
292 </widget>
293 </grid>
294 </widget>
295 </widget>
296 </grid>
297</widget>
298</UI>
diff --git a/noncore/settings/netsystemtime/formattabwidget.cpp b/noncore/settings/netsystemtime/formattabwidget.cpp
index 7d01bff..a037881 100644
--- a/noncore/settings/netsystemtime/formattabwidget.cpp
+++ b/noncore/settings/netsystemtime/formattabwidget.cpp
diff --git a/noncore/tools/calc2/binary/binary.pro b/noncore/tools/calc2/binary/binary.pro
index 1348d00..9cbb0ff 100644
--- a/noncore/tools/calc2/binary/binary.pro
+++ b/noncore/tools/calc2/binary/binary.pro
@@ -1,17 +1,15 @@
1#TEMPLATE = lib 1TEMPLATE = lib
2#CONFIG -= moc 2CONFIG += qt
3#CONFIG += qt 3INTERFACES += binary.ui
4## Input 4HEADERS = binaryimpl.h \
5#INTERFACES += binary.ui 5 binaryfactory.h
6#HEADERS = binaryimpl.h \ 6SOURCES = binaryimpl.cpp \
7 # binaryfactory.h 7 binaryfactory.cpp
8#SOURCES = binaryimpl.cpp \ 8INCLUDEPATH += $(OPIEDIR)/include \
9 # binaryfactory.cpp 9 $(OPIEDIR)/calc2
10#INCLUDEPATH += $(OPIEDIR)/include \ 10DEPENDPATH += $(OPIEDIR)/include
11 # $(OPIEDIR)/calc2 11DESTDIR = $(OPIEDIR)/plugins/calculator
12#DEPENDPATH += $(OPIEDIR)/include 12TARGET = binary
13#DESTDIR = $(OPIEDIR)/plugins/calculator 13
14#TARGET = binary
15#
16 14
17include( $(OPIEDIR)/include.pro ) 15include( $(OPIEDIR)/include.pro )
diff --git a/noncore/tools/calc2/binary/binaryfactory.cpp b/noncore/tools/calc2/binary/binaryfactory.cpp
index 110334f..bccc9ca 100644
--- a/noncore/tools/calc2/binary/binaryfactory.cpp
+++ b/noncore/tools/calc2/binary/binaryfactory.cpp
@@ -22,7 +22,7 @@
22 22
23#include "binaryfactory.h" 23#include "binaryfactory.h"
24#include "binaryimpl.h" 24#include "binaryimpl.h"
25#include <engine.h> 25#include "../engine.h"
26 26
27QWidget *BinaryInterface::getPlugin ( Engine *e, QWidget *parent ) { 27QWidget *BinaryInterface::getPlugin ( Engine *e, QWidget *parent ) {
28 if ( !input ) 28 if ( !input )
diff --git a/noncore/tools/calc2/binary/binaryfactory.h b/noncore/tools/calc2/binary/binaryfactory.h
index e015384..237a926 100644
--- a/noncore/tools/calc2/binary/binaryfactory.h
+++ b/noncore/tools/calc2/binary/binaryfactory.h
@@ -22,8 +22,8 @@
22#define BINARYIMPL_H 22#define BINARYIMPL_H
23 23
24#include "binaryimpl.h" 24#include "binaryimpl.h"
25#include <plugininterface.h> 25#include "../plugininterface.h"
26#include <engine.h> 26#include "../engine.h"
27 27
28class BinaryInterface : public CalcInterface 28class BinaryInterface : public CalcInterface
29{ 29{
diff --git a/noncore/tools/calc2/binary/binaryimpl.cpp b/noncore/tools/calc2/binary/binaryimpl.cpp
index ffc56ad..ecbf232 100644
--- a/noncore/tools/calc2/binary/binaryimpl.cpp
+++ b/noncore/tools/calc2/binary/binaryimpl.cpp
@@ -19,7 +19,7 @@
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "binaryimpl.h" 21#include "binaryimpl.h"
22#include <instruction.h> 22#include "../instruction.h"
23 23
24class iXOR : public Instruction { 24class iXOR : public Instruction {
25public: 25public:
diff --git a/noncore/tools/calc2/binary/binaryimpl.h b/noncore/tools/calc2/binary/binaryimpl.h
index bf9e3a7..7bf123a 100644
--- a/noncore/tools/calc2/binary/binaryimpl.h
+++ b/noncore/tools/calc2/binary/binaryimpl.h
@@ -21,7 +21,7 @@
21#define FORMBINARYINPUTIMPL 21#define FORMBINARYINPUTIMPL
22 22
23#include "binary.h" 23#include "binary.h"
24#include <engine.h> 24#include "../engine.h"
25 25
26class FormBinaryImpl : public FormBinary { 26class FormBinaryImpl : public FormBinary {
27Q_OBJECT 27Q_OBJECT
diff --git a/noncore/tools/calc2/calc.cpp b/noncore/tools/calc2/calc.cpp
index c7656bf..8c50c2c 100644
--- a/noncore/tools/calc2/calc.cpp
+++ b/noncore/tools/calc2/calc.cpp
@@ -68,7 +68,6 @@ LCD->setSegmentStyle(QLCDNumber::Filled);
68 for (it = list.begin (); it != list.end (); ++it) { 68 for (it = list.begin (); it != list.end (); ++it) {
69 CalcInterface *iface = 0; 69 CalcInterface *iface = 0;
70 QLibrary *lib = new QLibrary (path + "/" + *it); 70 QLibrary *lib = new QLibrary (path + "/" + *it);
71
72 Plugin plugin; 71 Plugin plugin;
73 plugin.pluginWidget = 0; 72 plugin.pluginWidget = 0;
74 73
diff --git a/noncore/tools/calc2/simple/simple.pro b/noncore/tools/calc2/simple/simple.pro
index 2312f99..dde5e7d 100644
--- a/noncore/tools/calc2/simple/simple.pro
+++ b/noncore/tools/calc2/simple/simple.pro
@@ -1,14 +1,12 @@
1#TEMPLATE = lib 1TEMPLATE = lib
2#CONFIG -= moc 2CONFIG += qt
3#CONFIG += qt 3INTERFACES += simple.ui
4## Input 4HEADERS = simpleimpl.h simplefactory.h stdinstructions.h
5#INTERFACES += simple.ui 5SOURCES = simpleimpl.cpp simplefactory.cpp
6#HEADERS = simpleimpl.h simplefactory.h stdinstructions.h 6INCLUDEPATH += $(OPIEDIR)/include \
7#SOURCES = simpleimpl.cpp simplefactory.cpp 7 $(OPIEDIR)/calc2
8#INCLUDEPATH += $(OPIEDIR)/include \ 8DEPENDPATH += $(OPIEDIR)/include
9 # $(OPIEDIR)/calc2 9DESTDIR = $(OPIEDIR)/plugins/calculator
10#DEPENDPATH += $(OPIEDIR)/include 10
11#DESTDIR = $(OPIEDIR)/plugins/calculator
12#
13 11
14include( $(OPIEDIR)/include.pro ) 12include( $(OPIEDIR)/include.pro )
diff --git a/noncore/tools/calc2/simple/simplefactory.cpp b/noncore/tools/calc2/simple/simplefactory.cpp
index 515418f..52b090b 100644
--- a/noncore/tools/calc2/simple/simplefactory.cpp
+++ b/noncore/tools/calc2/simple/simplefactory.cpp
@@ -22,7 +22,7 @@
22 22
23#include "simplefactory.h" 23#include "simplefactory.h"
24#include "simpleimpl.h" 24#include "simpleimpl.h"
25#include <engine.h> 25#include "../engine.h"
26 26
27QWidget *SimpleInterface::getPlugin ( Engine *e, QWidget *parent ) { 27QWidget *SimpleInterface::getPlugin ( Engine *e, QWidget *parent ) {
28 if ( !input ) 28 if ( !input )
diff --git a/noncore/tools/calc2/simple/simplefactory.h b/noncore/tools/calc2/simple/simplefactory.h
index e1022fd..460c2b9 100644
--- a/noncore/tools/calc2/simple/simplefactory.h
+++ b/noncore/tools/calc2/simple/simplefactory.h
@@ -22,8 +22,8 @@
22#define BINARYIMPL_H 22#define BINARYIMPL_H
23 23
24#include "simpleimpl.h" 24#include "simpleimpl.h"
25#include <plugininterface.h> 25#include "../plugininterface.h"
26#include <engine.h> 26#include "../engine.h"
27 27
28class SimpleInterface : public CalcInterface 28class SimpleInterface : public CalcInterface
29{ 29{
diff --git a/noncore/tools/calc2/simple/simpleimpl.cpp b/noncore/tools/calc2/simple/simpleimpl.cpp
index f71f000..447cbdf 100644
--- a/noncore/tools/calc2/simple/simpleimpl.cpp
+++ b/noncore/tools/calc2/simple/simpleimpl.cpp
@@ -22,7 +22,7 @@
22#include <qlcdnumber.h> 22#include <qlcdnumber.h>
23 23
24#include "simpleimpl.h" 24#include "simpleimpl.h"
25#include <stdinstructions.h> 25#include "../stdinstructions.h"
26 26
27void FormSimpleImpl::CEClicked() { 27void FormSimpleImpl::CEClicked() {
28 engine->hardReset(); 28 engine->hardReset();
diff --git a/noncore/tools/calc2/simple/simpleimpl.h b/noncore/tools/calc2/simple/simpleimpl.h
index a2db154..b7b83e2 100644
--- a/noncore/tools/calc2/simple/simpleimpl.h
+++ b/noncore/tools/calc2/simple/simpleimpl.h
@@ -25,8 +25,8 @@
25#include <qlcdnumber.h> 25#include <qlcdnumber.h>
26 26
27#include "simple.h" 27#include "simple.h"
28#include "engine.h" 28#include "../engine.h"
29#include "instruction.h" 29#include "../instruction.h"
30 30
31class FormSimpleImpl:public FormSimple { 31class FormSimpleImpl:public FormSimple {
32Q_OBJECT 32Q_OBJECT