summaryrefslogtreecommitdiff
path: root/noncore
authorchicken <chicken>2004-03-01 18:52:44 (UTC)
committer chicken <chicken>2004-03-01 18:52:44 (UTC)
commit54a73e15350ea3cc4886a81572cef6e7876be26a (patch) (side-by-side diff)
treec76d739875a0b90d69394f1894e30b8345c7b23c /noncore
parent707d84768f4a3b4ada7435ba4c7451feaa11666c (diff)
downloadopie-54a73e15350ea3cc4886a81572cef6e7876be26a.zip
opie-54a73e15350ea3cc4886a81572cef6e7876be26a.tar.gz
opie-54a73e15350ea3cc4886a81572cef6e7876be26a.tar.bz2
fix includes
Diffstat (limited to 'noncore') (more/less context) (show whitespace changes)
-rw-r--r--noncore/applets/autorotateapplet/autorotate.cpp8
-rw-r--r--noncore/applets/memoryapplet/swapfile.cpp4
-rw-r--r--noncore/applets/networkapplet/networkapplet.cpp6
-rw-r--r--noncore/applets/notesapplet/notes.cpp5
-rw-r--r--noncore/applets/wirelessapplet/advancedconfig.cpp1
-rw-r--r--noncore/applets/wirelessapplet/wireless.cpp5
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp10
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp11
-rw-r--r--noncore/apps/checkbook/cfg.cpp3
-rw-r--r--noncore/apps/checkbook/checkbook.cpp1
-rw-r--r--noncore/apps/checkbook/configuration.cpp4
-rw-r--r--noncore/apps/checkbook/mainwindow.cpp4
-rw-r--r--noncore/apps/checkbook/tabledef.cpp2
-rw-r--r--noncore/apps/checkbook/transaction.cpp1
-rw-r--r--noncore/apps/confedit/editwidget.cpp8
-rw-r--r--noncore/apps/confedit/listviewitemconffile.cpp1
-rw-r--r--noncore/apps/confedit/listviewitemconfigentry.cpp1
-rw-r--r--noncore/apps/confedit/mainwindow.cpp9
-rw-r--r--noncore/apps/keyz-cfg/main.cpp2
-rw-r--r--noncore/apps/keyz-cfg/zkb.cpp1
-rw-r--r--noncore/apps/keyz-cfg/zkbnames.cpp1
-rw-r--r--noncore/apps/opie-bartender/bac.cpp3
-rw-r--r--noncore/apps/opie-bartender/bartender.cpp11
-rw-r--r--noncore/apps/opie-bartender/inputDialog.cpp4
-rw-r--r--noncore/apps/opie-bartender/newdrinks.cpp7
-rw-r--r--noncore/apps/opie-bartender/searchresults.cpp9
-rw-r--r--noncore/apps/opie-bartender/showdrinks.cpp9
27 files changed, 1 insertions, 130 deletions
diff --git a/noncore/applets/autorotateapplet/autorotate.cpp b/noncore/applets/autorotateapplet/autorotate.cpp
index e7891c8..5152904 100644
--- a/noncore/applets/autorotateapplet/autorotate.cpp
+++ b/noncore/applets/autorotateapplet/autorotate.cpp
@@ -1,78 +1,70 @@
/*
* copyright : (c) 2003 by Greg Gilbert
* email : greg@treke.net
* based on the cardmon applet by Max Reiss
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
*************************************************************************/
#include "autorotate.h"
/* OPIE */
#include <opie2/odevice.h>
#include <qpe/applnk.h>
#include <qpe/config.h>
#include <qpe/resource.h>
/* QT */
-#include <qapplication.h>
-#include <qfile.h>
-#include <qcopchannel_qws.h>
-#include <qmessagebox.h>
#include <qpainter.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qtextstream.h>
using namespace Opie;
AutoRotate::AutoRotate(QWidget * parent):QWidget(parent)
{
setFixedWidth( AppLnk::smallIconSize() );
setFixedHeight( AppLnk::smallIconSize() );
enabledPm.convertFromImage( Resource::loadImage("autorotate/rotate").smoothScale( height(), width() ) );
disabledPm.convertFromImage( Resource::loadImage("autorotate/norotate").smoothScale( height(), width() ) );
repaint(true);
popupMenu = 0;
show();
}
AutoRotate::~AutoRotate()
{
if (popupMenu) {
delete popupMenu;
}
}
void AutoRotate::mousePressEvent(QMouseEvent *)
{
QPopupMenu *menu = new QPopupMenu(this);
menu->insertItem( isRotateEnabled()? "Disable Rotation" : "Enable Rotation" ,1 );
QPoint p = mapToGlobal(QPoint(0, 0));
QSize s = menu->sizeHint();
int opt = menu->exec(QPoint(p.x() + (width() / 2) - (s.width() / 2), p.y() - s.height()), 0);
if (opt==1)
{
setRotateEnabled( !isRotateEnabled() );
repaint(true);
}
delete menu;
}
void AutoRotate::paintEvent(QPaintEvent *)
{
QPainter p(this);
p.drawPixmap( 0, 0, isRotateEnabled()? enabledPm : disabledPm );
}
void AutoRotate::setRotateEnabled(bool status)
diff --git a/noncore/applets/memoryapplet/swapfile.cpp b/noncore/applets/memoryapplet/swapfile.cpp
index 06746a7..7483592 100644
--- a/noncore/applets/memoryapplet/swapfile.cpp
+++ b/noncore/applets/memoryapplet/swapfile.cpp
@@ -1,89 +1,85 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "swapfile.h"
#include <qlabel.h>
#include <qtimer.h>
-#include <qfile.h>
-#include <qtextstream.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qhbuttongroup.h>
#include <qradiobutton.h>
#include <qlineedit.h>
#include <qprogressbar.h>
#include <qcombobox.h>
#include <qvgroupbox.h>
#include <qhbox.h>
#include <qmessagebox.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <qfile.h>
-#include <qtextstream.h>
#include <qcopchannel_qws.h>
#include <qpe/resource.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/vfs.h>
#include <mntent.h>
#include <unistd.h>
#include <sys/types.h>
Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f )
: QWidget( parent, name, f )
{
// are we running as root?
isRoot = geteuid() == 0;
QVBoxLayout* vb = new QVBoxLayout(this, 5);
QHButtonGroup* cfsdRBG = new QHButtonGroup(tr("Swapfile location"), this);
cfsdRBG->setRadioButtonExclusive(true);
vb->addWidget(cfsdRBG);
ramRB = new QRadioButton(tr("RAM"), cfsdRBG);
cfRB = new QRadioButton(tr("CF Card"), cfsdRBG);
sdRB = new QRadioButton(tr("SD Card"), cfsdRBG);
QHBox *hb1 = new QHBox(this);
hb1->setSpacing(5);
swapPath1 = new QLineEdit(hb1);
swapPath1->setEnabled(false);
QPushButton* swapOn = new QPushButton(tr(" On "), hb1);
QPushButton* swapOff = new QPushButton(tr(" Off "), hb1);
vb->addWidget(hb1);
QVGroupBox* box1 = new QVGroupBox(tr("Manage Swapfile"), this);
vb->addWidget(box1);
QHBox *hb2 = new QHBox(box1);
hb2->setSpacing(5);
QPushButton* mkSwap = new QPushButton(tr("Generate"), hb2);
QPushButton* rmSwap = new QPushButton(tr("Remove"), hb2);
QHBox *hb3 = new QHBox(box1);
hb3->setSpacing(5);
swapSize = new QComboBox(hb3);
diff --git a/noncore/applets/networkapplet/networkapplet.cpp b/noncore/applets/networkapplet/networkapplet.cpp
index 9a08568..955ed2e 100644
--- a/noncore/applets/networkapplet/networkapplet.cpp
+++ b/noncore/applets/networkapplet/networkapplet.cpp
@@ -1,98 +1,92 @@
/*
                This file is part of the Opie Project
=. (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
.=l.
           .>+-=
 _;:,     .>    :=|. This program is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This program is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; Library General Public License for more
++=   -.     .`     .: details.
 :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "networkapplet.h"
/* OPIE */
#include <opie2/odebug.h>
#include <opie2/onetwork.h>
#include <opie2/otaskbarapplet.h>
#include <qpe/applnk.h>
-#include <qpe/qlibrary.h>
#include <qpe/resource.h>
#include <qpainter.h>
/* QT */
-#include <qhostaddress.h>
-#include <qimage.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <qlineedit.h>
#include <qobjectlist.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
#include <assert.h>
IfaceUpDownButton::IfaceUpDownButton( QWidget* parent, const char* name )
:QToolButton( parent, name )
{
_iface = ONetwork::instance()->interface( name );
assert( _iface );
setToggleButton( true );
//setAutoRaise( true );
setOnIconSet( QIconSet( Resource::loadPixmap( "up" ) ) );
setOffIconSet( QIconSet( Resource::loadPixmap( "down" ) ) );
setOn( _iface->isUp() );
//setFixedWidth( 16 );
connect( this, SIGNAL( clicked() ), this, SLOT( clicked() ) );
}
IfaceUpDownButton::~IfaceUpDownButton()
{
}
void IfaceUpDownButton::clicked()
{
_iface->setUp( isOn() );
setOn( _iface->isUp() ); // it might not have worked...
repaint();
}
IfaceIPAddress::IfaceIPAddress( QWidget* parent, const char* name )
:QLineEdit( parent, name )
{
setFont( QFont( "fixed" ) );
_iface = ONetwork::instance()->interface( name );
setFixedWidth( 105 );
setText( _iface->ipV4Address() );
connect( this, SIGNAL( returnPressed() ), this, SLOT( returnPressed() ) );
}
IfaceIPAddress::~IfaceIPAddress()
{
}
void IfaceIPAddress::returnPressed()
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp
index e2b0c2a..7b8bdd9 100644
--- a/noncore/applets/notesapplet/notes.cpp
+++ b/noncore/applets/notesapplet/notes.cpp
@@ -1,78 +1,75 @@
/**********************************************************************
** Copyright (C) 2002 L.J. Potter <llornkcor@handhelds.org>
** All rights reserved.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "notes.h"
#include <qapplication.h>
#include <stdlib.h>
#include <qstringlist.h>
#include <qpe/filemanager.h>
-#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
#include <qpe/timestring.h>
-#include <qpe/resource.h>
-#include <qpe/config.h>
#include <qpe/applnk.h>
-#include <qpe/config.h>
#include <qpe/ir.h>
+#include <qpe/config.h>
// #include <qsocket.h>
// #include <qclipboard.h>
#include <qmultilineedit.h>
#include <qlistbox.h>
#include <qpopupmenu.h>
#include <qmessagebox.h>
#include <qdir.h>
#include <qfile.h>
#include <qpoint.h>
#include <qpushbutton.h>
#include <qpainter.h>
#include <qlayout.h>
#include <qframe.h>
#include <qpixmap.h>
#include <qstring.h>
#include <qtimer.h>
/* XPM */
static char * notes_xpm[] = {
"16 16 11 1",
" c None",
". c #000000",
"+ c #7F7F7F",
"@ c #BFBFBF",
"# c #BFC1FF",
"$ c #FF0000",
"% c #FFFFFF",
"& c #00037F",
"* c #0006FF",
"= c #0005BF",
"- c #7F0000",
" .. ",
" .. ",
" ... ",
" .+ ",
" .@. ",
" . .+ ",
" ..#.@. ",
" ..###.+.. ",
" ..###$...##.. ",
"..###$$$%+$$##&.",
".*=####$-###&=&.",
".=**=###==&=&=..",
" ..=**=#&=&=.. ",
" ..=*=&=.. ",
" ..=.. ",
diff --git a/noncore/applets/wirelessapplet/advancedconfig.cpp b/noncore/applets/wirelessapplet/advancedconfig.cpp
index 97b008d..aba0fee 100644
--- a/noncore/applets/wirelessapplet/advancedconfig.cpp
+++ b/noncore/applets/wirelessapplet/advancedconfig.cpp
@@ -1,55 +1,54 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer
** <mickey@tm.informatik.uni-frankfurt.de>
** http://www.Vanille.de
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "advancedconfig.h"
#include <qpe/config.h>
-#include <qwidget.h>
#include <qcheckbox.h>
AdvancedConfig::AdvancedConfig( QWidget* parent, const char* name, bool modal, WFlags fl )
: AdvancedConfigBase( parent, name, modal, fl )
{
Config cfg( "qpe" );
cfg.setGroup( "Wireless" );
bool rocESSID = cfg.readBoolEntry( "renew_dhcp_on_essid_change", false );
bool rocFREQ = cfg.readBoolEntry( "renew_dhcp_on_freq_change", false );
bool rocAP = cfg.readBoolEntry( "renew_dhcp_on_ap_change", false );
bool rocMODE = cfg.readBoolEntry( "renew_dhcp_on_mode_change", false );
cbESSID->setChecked( rocESSID );
cbFrequency->setChecked( rocFREQ );
cbAccessPoint->setChecked( rocAP );
cbMODE->setChecked( rocMODE );
}
AdvancedConfig::~AdvancedConfig()
{
}
void AdvancedConfig::accept()
{
Config cfg( "qpe" );
cfg.setGroup( "Wireless" );
cfg.writeEntry( "renew_dhcp_on_essid_change", cbESSID->isChecked() );
cfg.writeEntry( "renew_dhcp_on_freq_change", cbFrequency->isChecked() );
cfg.writeEntry( "renew_dhcp_on_ap_change", cbAccessPoint->isChecked() );
cfg.writeEntry( "renew_dhcp_on_mode_change", cbMODE->isChecked() );
AdvancedConfigBase::accept();
}
diff --git a/noncore/applets/wirelessapplet/wireless.cpp b/noncore/applets/wirelessapplet/wireless.cpp
index cee789c..9ce6618 100644
--- a/noncore/applets/wirelessapplet/wireless.cpp
+++ b/noncore/applets/wirelessapplet/wireless.cpp
@@ -1,90 +1,85 @@
/**********************************************************************
** Copyright (C) 2002-2004 Michael 'Mickey' Lauer <mickey@vanille.de>
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "wireless.h"
#include "mgraph.h"
#include "advancedconfig.h"
#include "connect0.xpm"
#include "connect1.xpm"
#include "connect2.xpm"
#include "connect3.xpm"
#include "connect4.xpm"
#include "connect5.xpm"
#include "nowireless.xpm"
/* OPIE */
#include <opie2/onetwork.h>
#include <opie2/otaskbarapplet.h>
-#include <qpe/qpeapplication.h>
#include <qpe/config.h>
/* QT */
-#include <qpoint.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qpainter.h>
#include <qlabel.h>
#include <qslider.h>
#include <qbuttongroup.h>
#include <qlayout.h>
-#include <qframe.h>
-#include <qpixmap.h>
-#include <qstring.h>
#include <qfile.h>
#include <qtextstream.h>
/* STD */
#include <sys/types.h>
#include <signal.h>
#define STYLE_BARS 0
#define STYLE_ANTENNA 1
//#define MDEBUG
#undef MDEBUG
WirelessControl::WirelessControl( WirelessApplet *applet, QWidget *parent, const char *name )
: QFrame( parent, name, WStyle_StaysOnTop | WType_Popup ), applet( applet )
{
readConfig();
writeConfigEntry( "UpdateFrequency", updateFrequency );
writeConfigEntry( "DisplayStyle", displayStyle );
setFrameStyle( QFrame::PopupPanel | QFrame::Raised );
QGridLayout *grid = new QGridLayout( this, 3, 2, 6, 2, "top layout" );
/* status label */
statusLabel = new QLabel( this, "statuslabel" );
QString text( "Wireless Status:<br>"
"*** Unknown ***<br>"
"Card not inserted ?<br>"
"Or Sharp ROM ?<br>"
"CELL: 00:00:00:00:00:00" );
/* QString text( "Station: Unknown<br>"
"ESSID: Unknown<br>"
"MODE: Unknown<br>"
"FREQ: Unknown<br>"
"CELL: AA:BB:CC:DD:EE:FF" ); */
statusLabel->setText( text );
statusLabel->setFixedSize( statusLabel->sizeHint() );
grid->addWidget( statusLabel, 0, 0 );
/* visualization group box */
QButtonGroup* group = new QButtonGroup( 1, Qt::Horizontal, "Visualization", this );
QRadioButton* r1 = new QRadioButton( "Color Bars", group );
QRadioButton* r2 = new QRadioButton( "Antenna", group );
r1->setFocusPolicy( QWidget::NoFocus );
r2->setFocusPolicy( QWidget::NoFocus );
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 5148172..c44d387 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -1,85 +1,75 @@
/***************************************************************************
AdvancedFm.cpp
-------------------
** Created: Sat Mar 9 23:33:09 2002
copyright : (C) 2002 by ljp
email : ljp@llornkcor.com
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#define DEVELOPERS_VERSION
#include "advancedfm.h"
-#include <qpe/filemanager.h>
-#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qpe/mimetype.h>
#include <qpe/applnk.h>
-#include <qpe/ir.h>
#include <qpe/resource.h>
#include <qpe/menubutton.h>
-#include <qdatetime.h>
-#include <qfile.h>
#include <qcombobox.h>
#include <qpopupmenu.h>
#include <qlistview.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qimage.h>
#include <qmessagebox.h>
#include <qlineedit.h>
-#include <qpe/qpemessagebox.h>
#include <sys/stat.h>
#include <time.h>
#include <dirent.h>
#include <fcntl.h>
#include <sys/vfs.h>
#include <mntent.h>
#ifdef NOQUICKLAUNCH
AdvancedFm::AdvancedFm( )
#else
AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags )
#endif
: QMainWindow( ) {
init();
renameBox = 0;
unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
initConnections();
whichTab=1;
rePopulate();
currentPathCombo->setFocus();
channel = new QCopChannel( "QPE/Application/advancedfm", this );
connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
this, SLOT( qcopReceive(const QCString&, const QByteArray&)) );
}
AdvancedFm::~AdvancedFm() {
}
void AdvancedFm::cleanUp() {
QString sfile=QDir::homeDirPath();
if(sfile.right(1) != "/")
sfile+="/._temp";
else
sfile+="._temp";
QFile file( sfile);
if(file.exists())
file.remove();
}
void AdvancedFm::tabChanged(QWidget *) {
// qWarning("tab changed");
QString path = CurrentDir()->canonicalPath();
currentPathCombo->lineEdit()->setText( path );
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 18bbd43..9ad1146 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -1,82 +1,71 @@
/***************************************************************************
AdvancedFm.cpp
-------------------
** Created: Sat Mar 9 23:33:09 2002
copyright : (C) 2002 by ljp
email : ljp@llornkcor.com
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include "advancedfm.h"
#include "output.h"
#include "filePermissions.h"
#include <qpe/lnkproperties.h>
#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
-#include <qpe/qcopenvelope_qws.h>
#include <qpe/applnk.h>
-#include <qpe/ir.h>
#include <qmessagebox.h>
-#include <qmultilineedit.h>
-#include <qstring.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qcombobox.h>
#include <qpopupmenu.h>
-#include <qtabwidget.h>
-#include <qtoolbutton.h>
-#include <qlineedit.h>
#include <qlistview.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <dirent.h>
#include <sys/sendfile.h>
#include <fcntl.h>
void AdvancedFm::doDirChange() {
QString pathItem = CurrentView()->currentItem()->text(0);
if( pathItem == "../") {
ListClicked( CurrentView()->currentItem());
} else {
if( pathItem.find(" -> ",0,TRUE) != -1)
pathItem = dealWithSymName((const QString&)pathItem)+"/";
// qWarning(pathItem);
gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) );
}
}
void AdvancedFm::showMenuHidden() {
if (b) {
CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
} else {
CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
}
b = !b;
populateView();
}
void AdvancedFm::showHidden() {
if (b) {
CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
} else {
CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
}
populateView();
}
diff --git a/noncore/apps/checkbook/cfg.cpp b/noncore/apps/checkbook/cfg.cpp
index 0d5d9ed..24fa4cb 100644
--- a/noncore/apps/checkbook/cfg.cpp
+++ b/noncore/apps/checkbook/cfg.cpp
@@ -1,82 +1,79 @@
/*
                This file is part of the OPIE Project
=.
             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org>
           .>+-=
 _;:,     .>    :=|. This file is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This file is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
..}^=.=       =       ; Public License for more details.
++=   -.     .`     .:
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <stdio.h>
-#include <qstring.h>
-#include <qstringlist.h>
#include <qwidget.h>
-#include <qpe/resource.h>
#include <qpe/config.h>
#include "cfg.h"
// --- Cfg --------------------------------------------------------------------
Cfg::Cfg()
{
_currencySymbol="$";
_showLocks=FALSE;
_showBalances=FALSE;
_pCategories=new CategoryList();
_bDirty=false;
}
// --- readStringList ---------------------------------------------------------
// Reads the entries for the control from a configuration file and returns
// them in a StringList. Later this list can be used to create the control. It
// is assumed, that the group is already set. Key is used to enumerate the
// entries.
void Cfg::readStringList(Config &cfg, const char *sKey, QStringList &lst)
{
QString sEntry;
int iCount;
// read count of elements
sEntry.sprintf("%s_Count", sKey);
iCount=cfg.readNumEntry(sEntry, 0);
// read entries
for(int i=1; i<=iCount; i++) {
sEntry.sprintf("%s%d", sKey, i);
QString sType=cfg.readEntry(sEntry);
if( sType!=NULL )
lst.append(sType);
}
}
// --- readConfig -------------------------------------------------------------
// Reads the member data from the given config file. It will also set the group
// "Config"
void Cfg::readConfig(Config &config)
{
// set group
config.setGroup( "Config" );
// read scalars
_currencySymbol = config.readEntry( "CurrencySymbol", "$" );
diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp
index 4ca764f..26b2533 100644
--- a/noncore/apps/checkbook/checkbook.cpp
+++ b/noncore/apps/checkbook/checkbook.cpp
@@ -1,84 +1,83 @@
/*
                This file is part of the OPIE Project
=.
             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org>
           .>+-=
 _;:,     .>    :=|. This file is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This file is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
..}^=.=       =       ; Public License for more details.
++=   -.     .`     .:
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "checkbook.h"
#include "cbinfo.h"
#include "transaction.h"
#include "traninfo.h"
#include "graph.h"
#include "graphinfo.h"
#include "password.h"
-#include "mainwindow.h"
#include "cfg.h"
#include <qpe/qpeapplication.h>
#include <qpe/qpemessagebox.h>
#include <qpe/resource.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qmultilineedit.h>
#include <qpushbutton.h>
#include <qwhatsthis.h>
#include <qpopupmenu.h>
#define COL_ID 0
#define COL_SORTDATE 1
#define COL_NUM 2
#define COL_DATE 3
#define COL_DESC 4
#define COL_AMOUNT 5
#define COL_BAL 6
// --- Checkbook --------------------------------------------------------------
Checkbook::Checkbook( QWidget *parent, CBInfo *i, Cfg *cfg )
: QDialog( parent, 0, TRUE, WStyle_ContextHelp )
{
info = i;
_pCfg=cfg;
// Title bar
if ( info->name() != "" )
{
QString tempstr = info->name();
tempstr.append( " - " );
tempstr.append( tr( "Checkbook" ) );
setCaption( tempstr );
}
else
{
setCaption( tr( "New checkbook" ) );
}
// Setup layout to make everything pretty
QVBoxLayout *layout = new QVBoxLayout( this );
layout->setMargin( 2 );
diff --git a/noncore/apps/checkbook/configuration.cpp b/noncore/apps/checkbook/configuration.cpp
index dfae446..872d9b2 100644
--- a/noncore/apps/checkbook/configuration.cpp
+++ b/noncore/apps/checkbook/configuration.cpp
@@ -1,90 +1,86 @@
/*
                This file is part of the OPIE Project
=.
             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org>
           .>+-=
 _;:,     .>    :=|. This file is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This file is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
..}^=.=       =       ; Public License for more details.
++=   -.     .`     .:
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "configuration.h"
-#include "mainwindow.h"
#include "listedit.h"
-#include "tabledef.h"
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qwhatsthis.h>
#include <qlistview.h>
-#include <qpushbutton.h>
#include <qtabwidget.h>
-#include <qpe/resource.h>
Configuration::Configuration( QWidget *parent, Cfg &cfg )
: QDialog( parent, 0, TRUE, WStyle_ContextHelp )
{
setCaption( tr( "Configure Checkbook" ) );
// Setup layout to make everything pretty
QVBoxLayout *layout = new QVBoxLayout( this );
layout->setMargin( 2 );
layout->setSpacing( 4 );
// Setup tabs for all info
_mainWidget = new QTabWidget( this );
layout->addWidget( _mainWidget );
// Settings tab
_mainWidget->addTab( initSettings(cfg), tr( "&Settings" ) );
// Account Types tab
ColumnDef *d;
_listEditTypes=new ListEdit(_mainWidget, "TYPES" );
d=new ColumnDef( tr("Type"), (ColumnDef::ColumnType)(ColumnDef::typeString | ColumnDef::typeUnique), tr("New Account Type"));
_listEditTypes->addColumnDef( d );
_listEditTypes->addData( cfg.getAccountTypes() );
_mainWidget->addTab( _listEditTypes, tr( "&Account Types" ) );
// Categories tab
_listEditCategories=new ListEdit(_mainWidget, "CATEGORIES" );
_listEditCategories->addColumnDef( new ColumnDef( tr("Category"), (ColumnDef::ColumnType)(ColumnDef::typeString | ColumnDef::typeUnique), tr("New Category")) );
d=new ColumnDef( tr("Type"), ColumnDef::typeList, tr("Expense") );
d->addColumnValue( tr("Expense") );
d->addColumnValue( tr("Income") );
_listEditCategories->addColumnDef( d );
QStringList lst=cfg.getCategories();
_listEditCategories->addData( lst );
_mainWidget->addTab( _listEditCategories, tr( "&Categories" ) );
// Payees tab
_listEditPayees=new ListEdit(_mainWidget, "PAYEES");
_listEditPayees->addColumnDef( new ColumnDef( tr("Payee"), (ColumnDef::ColumnType)(ColumnDef::typeString | ColumnDef::typeUnique), tr("New Payee")) );
_listEditPayees->addData( cfg.getPayees() );
_mainWidget->addTab( _listEditPayees, tr("&Payees") );
}
Configuration::~Configuration()
{
}
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp
index 60aea42..d0fac3b 100644
--- a/noncore/apps/checkbook/mainwindow.cpp
+++ b/noncore/apps/checkbook/mainwindow.cpp
@@ -1,95 +1,91 @@
/*
                This file is part of the OPIE Project
=.
             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org>
           .>+-=
 _;:,     .>    :=|. This file is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This file is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
..}^=.=       =       ; Public License for more details.
++=   -.     .`     .:
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "mainwindow.h"
#include "cbinfo.h"
#include "configuration.h"
#include "password.h"
#include "checkbook.h"
-#include "listedit.h"
#include <qpe/config.h>
-#include <qpe/global.h>
#include <qpe/qpeapplication.h>
#include <qpe/qpemessagebox.h>
#include <qpe/qpetoolbar.h>
#include <qpe/resource.h>
#include <qmenubar.h>
#include <qaction.h>
-#include <qcheckbox.h>
#include <qdir.h>
-#include <qlineedit.h>
#include <qwhatsthis.h>
MainWindow::MainWindow( QWidget* parent, const char* name, WFlags /*fl*/ )
: QMainWindow( parent, name, WStyle_ContextHelp )
{
setCaption( tr( "Checkbook" ) );
cbDir = Global::applicationFileName( "checkbook", "" );
lockIcon = Resource::loadPixmap( "locked" );
// Load configuration options
Config config( "checkbook" );
_cfg.readConfig( config );
// Build menu and tool bars
setToolBarsMovable( FALSE );
QToolBar *bar = new QToolBar( this );
bar->setHorizontalStretchable( TRUE );
QMenuBar *mb = new QMenuBar( bar );
mb->setMargin( 0 );
QPopupMenu *popup = new QPopupMenu( this );
bar = new QToolBar( this );
QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 );
a->setWhatsThis( tr( "Click here to create a new checkbook.\n\nYou also can select New from the Checkbook menu." ) );
connect( a, SIGNAL( activated() ), this, SLOT( slotNew() ) );
a->addTo( popup );
a->addTo( bar );
actionOpen = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null,
0, this, 0 );
actionOpen->setWhatsThis( tr( "Select a checkbook and then click here to edit it.\n\nYou also can select Edit from the Checkbook menu, or click and hold on a checkbook name." ) );
connect( actionOpen, SIGNAL( activated() ), this, SLOT( slotEdit() ) );
actionOpen->addTo( popup );
actionOpen->addTo( bar );
actionDelete = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null,
0, this, 0 );
actionDelete->setWhatsThis( tr( "Select a checkbook and then click here delete it.\n\nYou also can select Delete from the Checkbook menu." ) );
connect( actionDelete, SIGNAL( activated() ), this, SLOT( slotDelete() ) );
actionDelete->addTo( popup );
actionDelete->addTo( bar );
popup->insertSeparator();
diff --git a/noncore/apps/checkbook/tabledef.cpp b/noncore/apps/checkbook/tabledef.cpp
index 13edded..9a42308 100644
--- a/noncore/apps/checkbook/tabledef.cpp
+++ b/noncore/apps/checkbook/tabledef.cpp
@@ -1,76 +1,74 @@
/*
                This file is part of the OPIE Project
=.
             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org>
           .>+-=
 _;:,     .>    :=|. This file is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This file is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
..}^=.=       =       ; Public License for more details.
++=   -.     .`     .:
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "tabledef.h"
-#include <qstring.h>
-#include <qpe/resource.h>
// --- ColumnDef --------------------------------------------------------------
ColumnDef::ColumnDef(const char *sName, ColumnType type, const char *sNewValue)
{
_sName=sName;
_type=type;
_sNewValue=sNewValue;
}
// --- addColumnValue ---------------------------------------------------------
void ColumnDef::addColumnValue(const QString &sValue)
{
if( (_type & 0x00ffffff) !=typeList )
qDebug("Column %s is not a list", (const char *)_sName);
else
_valueList.append(sValue);
}
void ColumnDef::addColumnValue(const char *sValue)
{
if( (_type & 0x00ffffff)!=typeList )
qDebug("Column %s is not a list", (const char *)_sName);
else
_valueList.append(sValue);
}
// --- TableDef ---------------------------------------------------------------
TableDef::TableDef(const char *sName)
{
_sName=sName;
_vColumns.setAutoDelete(TRUE);
}
// --- ~TableDef --------------------------------------------------------------
TableDef::~TableDef()
{
}
// --- addColumnDef -----------------------------------------------------------
void TableDef::addColumnDef(ColumnDef *pDef)
{
_vColumns.append(pDef);
}
diff --git a/noncore/apps/checkbook/transaction.cpp b/noncore/apps/checkbook/transaction.cpp
index 9379da0..a72a48b 100644
--- a/noncore/apps/checkbook/transaction.cpp
+++ b/noncore/apps/checkbook/transaction.cpp
@@ -1,83 +1,82 @@
/*
                This file is part of the OPIE Project
=.
             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org>
           .>+-=
 _;:,     .>    :=|. This file is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This file is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
..}^=.=       =       ; Public License for more details.
++=   -.     .`     .:
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "transaction.h"
#include "traninfo.h"
#include "cfg.h"
#include "checkbook.h"
#include <qpe/datebookmonth.h>
-#include <qpe/resource.h>
#include <qbuttongroup.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qmultilineedit.h>
#include <qradiobutton.h>
#include <qwhatsthis.h>
Transaction::Transaction( QWidget *parent, bool bNew, const QString &acctname,
TranInfo *info, Cfg *pCfg )
: QDialog( parent, 0, TRUE, WStyle_ContextHelp )
{
QString tempstr = tr( "Transaction for " );
tempstr.append( acctname );
setCaption( tempstr );
_bNew=bNew;
tran = info;
_pCfg=pCfg;
QVBoxLayout *vb = new QVBoxLayout( this );
QScrollView *sv = new QScrollView( this );
vb->addWidget( sv, 0, 0 );
sv->setResizePolicy( QScrollView::AutoOneFit );
sv->setFrameStyle( QFrame::NoFrame );
QWidget *container = new QWidget( sv->viewport() );
sv->addChild( container );
QGridLayout *layout = new QGridLayout( container );
layout->setSpacing( 2 );
layout->setMargin( 4 );
// Withdrawal/Deposit
QButtonGroup *btngrp = new QButtonGroup( container );
btngrp->setColumnLayout(0, Qt::Vertical );
btngrp->layout()->setSpacing( 0 );
btngrp->layout()->setMargin( 0 );
btngrp->setMaximumWidth( 220 );
QGridLayout *layout2 = new QGridLayout( btngrp->layout() );
layout2->setSpacing( 2 );
layout2->setMargin( 2 );
withBtn = new QRadioButton( tr( "Withdrawal" ), btngrp );
QWhatsThis::add( withBtn, tr( "Select whether the transaction is a withdrawal or deposit here." ) );
layout2->addWidget( withBtn, 0, 0 );
diff --git a/noncore/apps/confedit/editwidget.cpp b/noncore/apps/confedit/editwidget.cpp
index f7dc408..21f69c7 100644
--- a/noncore/apps/confedit/editwidget.cpp
+++ b/noncore/apps/confedit/editwidget.cpp
@@ -1,61 +1,53 @@
#include "editwidget.h"
#include <qlabel.h>
#include <qlineedit.h>
-#include <qpushbutton.h>
#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
-#include <qpopupmenu.h>
-#include <qaction.h>
-#include "listviewitemconfigentry.h"
EditWidget::EditWidget( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
EditWidgetLayout = new QGridLayout( this );
EditWidgetLayout->setSpacing( 0 );
EditWidgetLayout->setMargin( 0 );
// setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Maximum));//, sizePolicy().hasHeightForWidth() ) );
TextLabelFileName = new QLabel( this, "TextLabelFileName" );
TextLabelFileName->setText( tr( "File Name:" ) );
EditWidgetLayout->addWidget( TextLabelFileName, 0, 0 );
TextFileName = new QLabel( this, "TextFileName" );
EditWidgetLayout->addWidget( TextFileName, 0, 1 );
TextLabelGroup = new QLabel( this, "TextLabelGroup" );
TextLabelGroup->setText( tr( "Group:" ) );
EditWidgetLayout->addWidget( TextLabelGroup, 1, 0 );
LineEditGroup = new QLineEdit( this, "LineEditGroup" );
EditWidgetLayout->addWidget( LineEditGroup, 1, 1 );
TextLabelKey = new QLabel( this, "TextLabelKey" );
TextLabelKey->setText( tr( "Key:" ) );
EditWidgetLayout->addWidget( TextLabelKey, 2, 0 );
LineEditKey = new QLineEdit( this, "LineEditKey" );
EditWidgetLayout->addWidget( LineEditKey, 2, 1 );
TextLabelValue = new QLabel( this, "TextLabelValue" );
TextLabelValue->setText( tr( "Value:" ) );
EditWidgetLayout->addWidget( TextLabelValue, 3, 0 );
LineEditValue = new QLineEdit( this, "LineEditValue" );
EditWidgetLayout->addWidget( LineEditValue, 3, 1 );
// layoutType(Nothing);
}
EditWidget::~EditWidget()
{
}
void EditWidget::layoutType(int t)
{
switch (t)
{
case Entry:
diff --git a/noncore/apps/confedit/listviewitemconffile.cpp b/noncore/apps/confedit/listviewitemconffile.cpp
index ce6504c..1ff2c44 100644
--- a/noncore/apps/confedit/listviewitemconffile.cpp
+++ b/noncore/apps/confedit/listviewitemconffile.cpp
@@ -1,62 +1,61 @@
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
#include "listviewitemconffile.h"
#include <qmessagebox.h>
#include <qtextstream.h>
-#include <qstring.h>
#include "listviewitemconfigentry.h"
#define tr QObject::tr
ListViewItemConfFile::ListViewItemConfFile(QFileInfo *file, QListView *parent)
: ListViewItemConf(parent), _valid(false)
{
confFileInfo = file;
// parseFile();
displayText();
}
ListViewItemConfFile::~ListViewItemConfFile()
{
}
void ListViewItemConfFile::displayText()
{
setText(0,(_changed?"*":"")+confFileInfo->fileName());
}
QString ListViewItemConfFile::fileName()
{
return confFileInfo->fileName();
}
void ListViewItemConfFile::parseFile()
{
//qDebug("ListViewItemConfFile::parseFile BEGIN");
QFile confFile(confFileInfo->absFilePath());
if(! confFile.open(IO_ReadOnly))
QMessageBox::critical(0,tr("Could not open"),tr("The file ")+confFileInfo->fileName()+tr(" could not be opened."),1,0);
QTextStream t( &confFile );
QString s;
QString group;
ListViewItemConfigEntry *groupItem;
ListViewItemConfigEntry *item;
while ( !t.atEnd() )
{
s = t.readLine().stripWhiteSpace();
//qDebug( "line: >%s<\n", s.latin1() );
if (s.contains("<?xml"))
{
_valid = false;
break;
}else
if ( s[0] == '[' && s[s.length()-1] == ']' )
diff --git a/noncore/apps/confedit/listviewitemconfigentry.cpp b/noncore/apps/confedit/listviewitemconfigentry.cpp
index 5ef9f61..0970125 100644
--- a/noncore/apps/confedit/listviewitemconfigentry.cpp
+++ b/noncore/apps/confedit/listviewitemconfigentry.cpp
@@ -1,60 +1,59 @@
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
// (c) 2002 Patrick S. Vogtp <tille@handhelds.org>
#include "listviewitemconfigentry.h"
-#include "listviewitemconffile.h"
#include <qtextstream.h>
ListViewItemConfigEntry::ListViewItemConfigEntry(ListViewItemConfFile *parent, QString group, QString key)
: ListViewItemConf(parent)
{
_fileItem = parent;
_file = parent->fileName();
_group = group;
setKey(key);
_groupOrig = group;
_keyOrig = _key;
_valueOrig = _value;
}
ListViewItemConfigEntry::~ListViewItemConfigEntry()
{
}
bool ListViewItemConfigEntry::isGroup()
{
return _key.isEmpty();
}
bool ListViewItemConfigEntry::isKey()
{
return !_key.isEmpty();
}
QString ListViewItemConfigEntry::getFile()
{
return _file;
}
void ListViewItemConfigEntry::setGroup(QString g)
{
if (g==_group) return;
_group = g;
changed();
}
QString ListViewItemConfigEntry::getGroup()
{
return _group;
}
void ListViewItemConfigEntry::setKey(QString key)
{
int pos = key.find("=");
diff --git a/noncore/apps/confedit/mainwindow.cpp b/noncore/apps/confedit/mainwindow.cpp
index 4fe45ba..5f7ad50 100644
--- a/noncore/apps/confedit/mainwindow.cpp
+++ b/noncore/apps/confedit/mainwindow.cpp
@@ -1,76 +1,67 @@
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
#include "mainwindow.h"
-#include <qaction.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qtoolbutton.h>
-#include <qstring.h>
#include <qlabel.h>
-#include <qfile.h>
-#include <qpushbutton.h>
#include <qlayout.h>
#include <qlineedit.h>
-#include <qcursor.h>
#include "listviewconfdir.h"
-#include "listviewitemconf.h"
#include "listviewitemconfigentry.h"
MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
QMainWindow( parent, name, f ), _currentItem(0), _fileItem(0)
{
setCaption( tr("Conf File Editor") );
// setBaseSize( qApp->globalStrut() );
setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) );
mainLayout = new QVBoxLayout( this );
mainLayout->setSpacing( 0 );
mainLayout->setMargin( 0 );
qDebug("creating settingList");
settingList = new ListViewConfDir( QDir::homeDirPath() + "/Settings", this, "settingslist");
settingList->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));//, sizePolicy().hasHeightForWidth() ) );
mainLayout->addWidget( settingList, 0);
qDebug("creating editor");
editor = new EditWidget(this);
editor->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Maximum));//, sizePolicy().hasHeightForWidth() ) );
mainLayout->addWidget( editor, 1 );
editor->layoutType( ListViewItemConf::File );
makeMenu();
connect(settingList, SIGNAL( pressed(QListViewItem*) ),
this, SLOT(setCurrent(QListViewItem*)));
connect( settingList, SIGNAL( clicked( QListViewItem* ) ),
this, SLOT( stopTimer( QListViewItem* ) ) );
connect( editor->LineEditGroup, SIGNAL( textChanged(const QString&) ),
SLOT( groupChanged(const QString&) ) );
connect( editor->LineEditKey, SIGNAL( textChanged(const QString&) ),
SLOT( keyChanged(const QString&) ) );
connect( editor->LineEditValue, SIGNAL( textChanged(const QString&) ),
SLOT( valueChanged(const QString&) ) );
setCurrent(0);
editor->layoutType(EditWidget::File);
}
void MainWindow::makeMenu()
{
popupTimer = new QTimer(this);
diff --git a/noncore/apps/keyz-cfg/main.cpp b/noncore/apps/keyz-cfg/main.cpp
index 264db20..55cc23e 100644
--- a/noncore/apps/keyz-cfg/main.cpp
+++ b/noncore/apps/keyz-cfg/main.cpp
@@ -1,24 +1,22 @@
#include <stdio.h>
#include <qpe/qpeapplication.h>
-#include <qpe/qcopenvelope_qws.h>
#include <qmainwindow.h>
-#include "cfgfile.h"
#include "cfgdlg.h"
int main( int argc, char **argv ) {
QPEApplication app(argc, argv);
CfgFile cfile;
CfgParser cp;
cp.load(QPEApplication::qpeDir()+"/share/zkb/zkb.xml", cfile);
QMainWindow m;
CfgDlg c(&m, &cfile, &app);
app.showMainWidget(&m);
m.hide();
c.showMaximized();
int ret = app.exec();
return ret;
}
diff --git a/noncore/apps/keyz-cfg/zkb.cpp b/noncore/apps/keyz-cfg/zkb.cpp
index abe1f5f..f315d4b 100644
--- a/noncore/apps/keyz-cfg/zkb.cpp
+++ b/noncore/apps/keyz-cfg/zkb.cpp
@@ -1,49 +1,48 @@
-#include <qnamespace.h>
#include "zkb.h"
#include <stdio.h>
// Implementation of Action class
Action::Action():state(0), keycode(0), unicode(0), flags(0) {
}
Action::Action(State* s, ushort kc, ushort uni, int f):
state(s), keycode(kc), unicode(uni), flags(f) {
}
Action::~Action() {
}
State* Action::getState() const {
return state;
}
void Action::setState(State* s) {
state = s;
setDefined(true);
}
bool Action::hasEvent() const {
return flags & Event;
}
void Action::setEvent(bool e) {
flags = (flags & ~Event) | ((e) ? Event : 0);
if (e) {
setDefined(true);
} else {
if (state == 0) {
setDefined(false);
}
}
}
bool Action::isDefined() const {
return flags & Defined;
}
void Action::setDefined(bool d) {
flags = (flags & ~Defined) | ((d) ? Defined : 0);
}
int Action::getKeycode() const {
diff --git a/noncore/apps/keyz-cfg/zkbnames.cpp b/noncore/apps/keyz-cfg/zkbnames.cpp
index c20a114..b2180ba 100644
--- a/noncore/apps/keyz-cfg/zkbnames.cpp
+++ b/noncore/apps/keyz-cfg/zkbnames.cpp
@@ -1,50 +1,49 @@
#include <qmap.h>
-#include <qstring.h>
#include "zkbnames.h"
QString Null_String((const char*) 0);
// Implementation of KeyNames
static struct {
int key;
char *name;
} Key_Names[] = {
{ 32, "Space" },
{ 39, "Apostrophe" },
{ 44, "Comma" },
{ 46, "Period" },
{ 47, "Slash" },
{ 65, "A" },
{ 66, "B" },
{ 67, "C" },
{ 68, "D" },
{ 69, "E" },
{ 70, "F" },
{ 71, "G" },
{ 72, "H" },
{ 73, "I" },
{ 74, "J" },
{ 75, "K" },
{ 76, "L" },
{ 77, "M" },
{ 78, "N" },
{ 79, "O" },
{ 80, "P" },
{ 81, "Q" },
{ 82, "R" },
{ 83, "S" },
{ 84, "T" },
{ 85, "U" },
{ 86, "V" },
{ 87, "W" },
{ 88, "X" },
{ 89, "Y" },
{ 90, "Z" },
{ 4096, "Cancel" },
{ 4097, "Tab" },
{ 4099, "Backspace" },
{ 4100, "Enter" },
{ 4114, "Left" },
{ 4115, "Up" },
{ 4116, "Right" },
diff --git a/noncore/apps/opie-bartender/bac.cpp b/noncore/apps/opie-bartender/bac.cpp
index ac8a83e..c97a253 100644
--- a/noncore/apps/opie-bartender/bac.cpp
+++ b/noncore/apps/opie-bartender/bac.cpp
@@ -1,70 +1,67 @@
/****************************************************************************
**
** Created: Sun Jul 21 19:00:14 2002
** by: L.J. Potter <ljp@llornkcor.com>
** copyright : (C) 2002 by ljp
email : ljp@llornkcor.com
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include "bac.h"
#include <qcombobox.h>
#include <qlabel.h>
#include <qlcdnumber.h>
#include <qpushbutton.h>
#include <qspinbox.h>
#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
BacDialog::BacDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "BacDialog" );
setCaption( tr( "Blood Alcohol Estimator" ) );
Layout7 = new QVBoxLayout( this);
Layout7->setSpacing( 6 );
Layout7->setMargin( 0 );
Layout1 = new QHBoxLayout;
Layout1->setSpacing( 6 );
Layout1->setMargin( 0 );
NumberSpinBox = new QSpinBox( this, "NumberSpinBox" );
Layout1->addWidget( NumberSpinBox );
TextLabel1 = new QLabel(this, "TextLabel1" );
TextLabel1->setText( tr( "Number of Drinks Consumed" ) );
Layout1->addWidget( TextLabel1 );
Layout7->addLayout( Layout1 );
Layout2 = new QHBoxLayout;
Layout2->setSpacing( 6 );
Layout2->setMargin( 0 );
WeightSpinBox = new QSpinBox( this, "WeightSpinBox" );
Layout2->addWidget( WeightSpinBox );
WeightSpinBox->setMaxValue(500);
TextLabel2 = new QLabel( this, "TextLabel2" );
TextLabel2->setText( tr( "Weight" ) );
Layout2->addWidget( TextLabel2 );
Layout7->addLayout( Layout2 );
Layout3 = new QHBoxLayout;
Layout3->setSpacing( 6 );
Layout3->setMargin( 0 );
TimeSpinBox = new QSpinBox( this, "TimeSpinBox" );
Layout3->addWidget( TimeSpinBox );
TimeSpinBox->setMaxValue(24);
TextLabel3 = new QLabel( this, "TextLabel3" );
TextLabel3->setText( tr( "Period of Time (hours)" ) );
Layout3->addWidget( TextLabel3 );
Layout7->addLayout( Layout3 );
diff --git a/noncore/apps/opie-bartender/bartender.cpp b/noncore/apps/opie-bartender/bartender.cpp
index 740478f..3c010e9 100644
--- a/noncore/apps/opie-bartender/bartender.cpp
+++ b/noncore/apps/opie-bartender/bartender.cpp
@@ -1,94 +1,83 @@
/****************************************************************************
**
** Created: Sat Jul 20 08:10:53 2002
** by: L.J. Potter <ljp@llornkcor.com>
** copyright : (C) 2002 by ljp
email : ljp@llornkcor.com
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include "bartender.h"
-#include "newdrinks.h"
#include "showdrinks.h"
#include "inputDialog.h"
#include "searchresults.h"
#include "bac.h"
#include <qpe/qpetoolbar.h>
#include <qmenubar.h>
//#include <opie2/colorpopupmenu.h>
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
-#include <qcstring.h>
#include <qlineedit.h>
#include <qdir.h>
#include <qpushbutton.h>
#include <qlistbox.h>
-#include <qstringlist.h>
#include <qmultilineedit.h>
#include <qmessagebox.h>
-#include <qfile.h>
#include <qtextstream.h>
-#include <qfile.h>
#include <qaction.h>
#include <qheader.h>
#include <qlistview.h>
-#include <qwidget.h>
#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qimage.h>
-#include <qpixmap.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
: QMainWindow( parent, name, fl ) {
if ( !name )
setName( "Bartender" );
QGridLayout *layout = new QGridLayout( this );
layout->setSpacing( 2);
layout->setMargin( 2);
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
setCaption( tr( "Bartender" ) );
ToolBar1 = new QToolBar( this, "ToolBar1" );
ToolBar1->setFixedHeight(22);
layout->addMultiCellWidget( ToolBar1, 0, 0, 0, 4 );
QMenuBar *menuBar = new QMenuBar( ToolBar1 );
QPopupMenu *fileMenu;
fileMenu = new QPopupMenu( this);
menuBar->insertItem( tr("File"), fileMenu );
fileMenu->insertItem(tr("New Drink"));
fileMenu->insertItem(tr("Open Drink"));
fileMenu->insertItem(tr("Find by Drink Name"));
fileMenu->insertItem(tr("Find by Alcohol"));
QPopupMenu *editMenu;
editMenu = new QPopupMenu( this);
menuBar->insertItem( tr("Edit"), editMenu );
editMenu->insertItem(tr("edit"));
connect( fileMenu, SIGNAL( activated(int) ), this, SLOT( fileMenuActivated(int) ));
connect( editMenu, SIGNAL( activated(int) ), this, SLOT( editMenuActivated(int) ));
QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), "New", 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
a->addTo( ToolBar1 );
a = new QAction( tr( "Open" ), Resource::loadPixmap( "bartender/bartender_sm" ), "open", 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( openCurrentDrink() ) );
diff --git a/noncore/apps/opie-bartender/inputDialog.cpp b/noncore/apps/opie-bartender/inputDialog.cpp
index 4f4cb84..29643ff 100644
--- a/noncore/apps/opie-bartender/inputDialog.cpp
+++ b/noncore/apps/opie-bartender/inputDialog.cpp
@@ -1,47 +1,43 @@
/****************************************************************************
inputDialog.cpp
-------------------
** Created: Sat Mar 9 23:33:09 2002
copyright : (C) 2002 by ljp
email : ljp@llornkcor.com
** by: L.J. Potter <ljp@llornkcor.com>
** copyright : (C) 2002 by ljp
email : ljp@llornkcor.com
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include "inputDialog.h"
#include <qlineedit.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "InputDialog" );
resize( 234, 50 );
setMaximumSize( QSize( 240, 50 ) );
setCaption( tr(name ) );
LineEdit1 = new QLineEdit( this, "LineEdit1" );
LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) );
}
InputDialog::~InputDialog()
{
inputText = LineEdit1->text();
}
void InputDialog::setInputText(const QString &string)
{
LineEdit1->setText( string);
}
diff --git a/noncore/apps/opie-bartender/newdrinks.cpp b/noncore/apps/opie-bartender/newdrinks.cpp
index 86bcc3c..a7ada3a 100644
--- a/noncore/apps/opie-bartender/newdrinks.cpp
+++ b/noncore/apps/opie-bartender/newdrinks.cpp
@@ -1,67 +1,60 @@
/****************************************************************************
** Created: Sat Jul 20 08:23:27 2002
** by: L.J. Potter <ljp@llornkcor.com>
** copyright : (C) 2002 by ljp
email : ljp@llornkcor.com
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include "newdrinks.h"
-#include <qpe/resource.h>
-#include <qaction.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qmultilineedit.h>
-#include <qpushbutton.h>
-#include <qwidget.h>
#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
New_Drink::New_Drink( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
QString drinkName = name;
if ( !name )
setName( drinkName );
setCaption( drinkName);
Layout5 = new QGridLayout( this);
Layout5->setSpacing( 6 );
Layout5->setMargin( 4 );
// Layout4 = new QHBoxLayout;
// Layout4->setSpacing( 6 );
// Layout4->setMargin( 4 );
TextLabel1 = new QLabel( this, "TextLabel1" );
TextLabel1->setText( tr( "Name" ) );
Layout5->addMultiCellWidget( TextLabel1, 0, 0, 0, 0);
LineEdit1 = new QLineEdit( this, "LineEdit1" );
Layout5->addMultiCellWidget( LineEdit1, 0, 0, 1, 2);
TextLabel2 = new QLabel( this, "TextLabel2" );
TextLabel2->setText( tr( "Ingredients" ) );
Layout5->addMultiCellWidget( TextLabel2, 1, 1, 0, 0);
MultiLineEdit1 = new QMultiLineEdit( this, "MultiLineEdit1" );
Layout5->addMultiCellWidget( MultiLineEdit1, 2, 2, 0, 2);
}
/*
* Destroys the object and frees any allocated resources
*/
New_Drink::~New_Drink()
{
// no need to delete child widgets, Qt does it all for us
}
diff --git a/noncore/apps/opie-bartender/searchresults.cpp b/noncore/apps/opie-bartender/searchresults.cpp
index 1a82c6c..4900d1f 100644
--- a/noncore/apps/opie-bartender/searchresults.cpp
+++ b/noncore/apps/opie-bartender/searchresults.cpp
@@ -1,52 +1,43 @@
/****************************************************************************
** Created: Sat Jul 20 08:23:27 2002
** by: L.J. Potter <ljp@llornkcor.com>
** copyright : (C) 2002 by ljp
email : ljp@llornkcor.com
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include "searchresults.h"
-#include <qpe/resource.h>
-#include <qaction.h>
-#include <qlabel.h>
-#include <qlineedit.h>
#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qwidget.h>
#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
Search_Results::Search_Results( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl ) {
if ( !name )
setName( drinkName);
drinkName = name;
setCaption( drinkName );
Layout5 = new QGridLayout( this );
Layout5->setSpacing( 6 );
Layout5->setMargin( 4 );
ListBox1 = new QListBox( this, "ListBox1" );
Layout5->addMultiCellWidget( ListBox1, 0, 1, 0, 3 );
connect( ListBox1, SIGNAL( clicked( QListBoxItem *)), SLOT( listSelected( QListBoxItem *)) );
}
Search_Results::~Search_Results() {
}
void Search_Results::listSelected(QListBoxItem *) {
QDialog::accept();
}
diff --git a/noncore/apps/opie-bartender/showdrinks.cpp b/noncore/apps/opie-bartender/showdrinks.cpp
index 745f7db..dcfce16 100644
--- a/noncore/apps/opie-bartender/showdrinks.cpp
+++ b/noncore/apps/opie-bartender/showdrinks.cpp
@@ -1,56 +1,47 @@
/****************************************************************************
** Created: Sat Jul 20 08:23:27 2002
** by: L.J. Potter <ljp@llornkcor.com>
** copyright : (C) 2002 by ljp
email : ljp@llornkcor.com
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include "showdrinks.h"
-#include "bartender.h"
-#include <qpe/resource.h>
-#include <qaction.h>
-#include <qlabel.h>
-#include <qlineedit.h>
#include <qmultilineedit.h>
#include <qpushbutton.h>
-#include <qwidget.h>
#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
//extern Bartender *bart;
Show_Drink::Show_Drink( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl ) {
if ( !name )
setName( drinkName);
drinkName = name;
setCaption( drinkName );
Layout5 = new QGridLayout( this);
Layout5->setSpacing( 6 );
Layout5->setMargin( 4 );
editDrinkButton = new QPushButton( tr("Edit"), this,"editBtn");
Layout5->addMultiCellWidget( editDrinkButton, 0, 0, 0, 0 );
connect(editDrinkButton, SIGNAL(clicked()), this, SLOT(slotEditDrink()));
MultiLineEdit1 = new QMultiLineEdit( this, "MultiLineEdit1" );
MultiLineEdit1->setWordWrap(QMultiLineEdit::WidgetWidth);
Layout5->addMultiCellWidget( MultiLineEdit1, 1, 3, 0, 3 );
}
Show_Drink::~Show_Drink() {
}
void Show_Drink::slotEditDrink() {
reject();
}