summaryrefslogtreecommitdiff
path: root/noncore
authorclem <clem>2004-06-17 23:11:25 (UTC)
committer clem <clem>2004-06-17 23:11:25 (UTC)
commitd177fbbcdabe8568b394bc2a16ecc5895a4b659a (patch) (side-by-side diff)
tree9b8a98b949e3425c5512db166e1ca959ec8a9cfb /noncore
parent237ab9ee408f861a0fb8c9f988cfcaa5db033dd1 (diff)
downloadopie-d177fbbcdabe8568b394bc2a16ecc5895a4b659a.zip
opie-d177fbbcdabe8568b394bc2a16ecc5895a4b659a.tar.gz
opie-d177fbbcdabe8568b394bc2a16ecc5895a4b659a.tar.bz2
replaced tr( "" ) by "" (in order not to pollute the .ts translation files)
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/memoryapplet/swapfile.cpp2
-rw-r--r--noncore/apps/zsafe/scqtfiledlg.cpp6
-rw-r--r--noncore/apps/zsafe/zsafe.cpp8
-rw-r--r--noncore/multimedia/powerchord/powerchordbase.cpp12
-rw-r--r--noncore/net/mail/mainwindow.cpp2
-rw-r--r--noncore/settings/mediummount/mediumglobal.cc2
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp2
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp2
8 files changed, 18 insertions, 18 deletions
diff --git a/noncore/applets/memoryapplet/swapfile.cpp b/noncore/applets/memoryapplet/swapfile.cpp
index a71078f..96010c8 100644
--- a/noncore/applets/memoryapplet/swapfile.cpp
+++ b/noncore/applets/memoryapplet/swapfile.cpp
@@ -6,193 +6,193 @@
** 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"
/* OPIE */
#include <opie2/odebug.h>
#include <qpe/resource.h>
using namespace Opie::Core;
/* QT */
#include <qfile.h>
#include <qtextstream.h>
#include <qlabel.h>
#include <qtimer.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 <qcopchannel_qws.h>
/* STD */
#include <stdio.h>
#include <stdlib.h>
#include <string.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);
swapSize->insertStringList(QStringList::split(",", tr("2 Mb,4 Mb,6 Mb,8 Mb")));
mkswapProgress = new QProgressBar(3, hb3);
mkswapProgress->setCenterIndicator(true);
QHBox *hb4 = new QHBox(this);
hb4->setSpacing(5);
swapStatusIcon = new QLabel(hb4);
- swapStatus = new QLabel(tr(""), hb4);
+ swapStatus = new QLabel("", hb4);
hb4->setStretchFactor(swapStatus, 99);
vb->addWidget(hb4);
connect(swapOn, SIGNAL(clicked()), this, SLOT(swapon()));
connect(swapOff, SIGNAL(clicked()), this, SLOT(swapoff()));
connect(cfRB, SIGNAL(clicked()), this, SLOT(cfsdchecked()));
connect(sdRB, SIGNAL(clicked()), this, SLOT(cfsdchecked()));
connect(ramRB, SIGNAL(clicked()), this, SLOT(cfsdchecked()));
connect(mkSwap, SIGNAL(clicked()), this, SLOT(makeswapfile()));
connect(rmSwap, SIGNAL(clicked()), this, SLOT(removeswapfile()));
cfRB->setEnabled(FALSE);
sdRB->setEnabled(FALSE);
QCopChannel *pcmciaChannel = new QCopChannel("QPE/Card", this);
connect(pcmciaChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&)));
QCopChannel *sdChannel = new QCopChannel("QPE/Card", this);
connect(sdChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&)));
cardInPcmcia0 = FALSE;
cardInPcmcia1 = FALSE;
cardInSd = FALSE;
Swapfile::status();
Swapfile::getStatusPcmcia();
Swapfile::getStatusSd();
}
int Swapfile::exec(const QString& arg)
{
return system((!isRoot ? "sudo " : "") + arg);
}
Swapfile::~Swapfile()
{
}
void Swapfile::cardnotify(const QCString & msg, const QByteArray &)
{
if (msg == "stabChanged()")
{
getStatusPcmcia();
}
else if (msg == "mtabChanged()")
{
getStatusSd();
}
}
void Swapfile::getStatusPcmcia()
{
bool cardWas0 = cardInPcmcia0; // remember last state
bool cardWas1 = cardInPcmcia1;
QString fileName;
// one of these 3 files should exist
if (QFile::exists("/var/run/stab")) {
fileName = "/var/run/stab";
} else if (QFile::exists("/var/state/pcmcia/stab")) {
fileName = "/var/state/pcmcia/stab";
} else {
fileName = "/var/lib/pcmcia/stab";
}
QFile f(fileName);
if (f.open(IO_ReadOnly)) {
QStringList list;
QTextStream stream(&f);
QString streamIn;
streamIn = stream.read();
list = QStringList::split("\n", streamIn);
for (QStringList::Iterator line = list.begin(); line != list.end();
line++) {
if ((*line).startsWith("Socket 0:")) {
if ((*line).startsWith("Socket 0: empty") && cardInPcmcia0) {
cardInPcmcia0 = FALSE;
} else if (!(*line).startsWith("Socket 0: empty")
&& !cardInPcmcia0) {
cardInPcmcia0 = TRUE;
}
} else if ((*line).startsWith("Socket 1:")) {
if ((*line).startsWith("Socket 1: empty") && cardInPcmcia1) {
cardInPcmcia1 = FALSE;
} else if (!(*line).startsWith("Socket 1: empty")
&& !cardInPcmcia1) {
cardInPcmcia1 = TRUE;
}
}
}
f.close();
if (cardWas0 != cardInPcmcia0 || cardWas1 != cardInPcmcia1) {
diff --git a/noncore/apps/zsafe/scqtfiledlg.cpp b/noncore/apps/zsafe/scqtfiledlg.cpp
index c67bbd5..f036101 100644
--- a/noncore/apps/zsafe/scqtfiledlg.cpp
+++ b/noncore/apps/zsafe/scqtfiledlg.cpp
@@ -38,216 +38,216 @@ static const char* const image0_data[] = {
static const char* const image1_data[] = {
"24 16 4 1",
". c None",
"a c #008080",
"b c #808080",
"# c #ff0000",
"........................",
"........................",
"...####..........####...",
"...#####........#####...",
"....######.....#####a...",
".....######...#####ba...",
".....aa###########bba...",
"....aaaaa#######aabba...",
"...aaabbb######bbbbba...",
"..aaaabb########bbbba...",
"...aaa############bba...",
"....a######aaa#####aa...",
"....######.....######...",
"...#####a........####...",
"...####aa.........###...",
"........................"};
static const char* const image2_data[] = {
"17 15 4 1",
"# c #000000",
". c #dcdcdc",
"a c #ffff00",
"b c #ffffff",
".................",
"............#....",
".................",
"............#....",
".........#.....#.",
"....####..#.#.#..",
"...#abab#..#.#...",
"..##########..#.#",
"..#babababab##...",
"..#ababababa#.#..",
"..#babababab#..#.",
"..#ababababa#....",
"..#babababab#....",
"..#ababababa#....",
"..###########...."};
/*
* Constructs a ScQtFileDlg which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
ScQtFileDlg::ScQtFileDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
QPixmap image0( ( const char** ) image0_data );
QPixmap image1( ( const char** ) image1_data );
QPixmap image2( ( const char** ) image2_data );
if ( !name )
setName( "ScQtFileDlg" );
resize( 196, 279 );
if (!name)
setCaption( tr( "FileDlg" ) );
else
setCaption(name);
ScQtFileDlgLayout = new QVBoxLayout( this );
ScQtFileDlgLayout->setSpacing( 6 );
ScQtFileDlgLayout->setMargin( 11 );
Layout5 = new QVBoxLayout;
Layout5->setSpacing( 6 );
Layout5->setMargin( 0 );
Layout4 = new QVBoxLayout;
Layout4->setSpacing( 6 );
Layout4->setMargin( 0 );
Layout3 = new QHBoxLayout;
Layout3->setSpacing( 6 );
Layout3->setMargin( 0 );
TypeComboBox = new QComboBox( FALSE, this, "TypeComboBox" );
TypeComboBox->setEditable( TRUE );
TypeComboBox->setInsertionPolicy( QComboBox::AtBottom );
TypeComboBox->setAutoCompletion( FALSE );
TypeComboBox->setDuplicatesEnabled( FALSE );
QToolTip::add( TypeComboBox, tr( "file type filter" ) );
QWhatsThis::add( TypeComboBox, tr( "ComboBox FileTypeFilter\n"
"\n"
"edit or select the filter" ) );
Layout3->addWidget( TypeComboBox );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout3->addItem( spacer );
OkButton = new QToolButton( this, "OkButton" );
- OkButton->setText( tr( "" ) );
+ OkButton->setText( "" );
OkButton->setPixmap( image0 );
OkButton->setUsesBigPixmap( FALSE );
QToolTip::add( OkButton, tr( "confirms the selection and closes the form" ) );
QWhatsThis::add( OkButton, tr( "OKButton" ) );
Layout3->addWidget( OkButton );
CancelButton = new QToolButton( this, "CancelButton" );
- CancelButton->setText( tr( "" ) );
+ CancelButton->setText( "" );
CancelButton->setPixmap( image1 );
CancelButton->setUsesBigPixmap( FALSE );
QToolTip::add( CancelButton, tr( "cancels the selection and closes the form" ) );
QWhatsThis::add( CancelButton, tr( "CancelButton" ) );
Layout3->addWidget( CancelButton );
Layout4->addLayout( Layout3 );
Layout3_2 = new QHBoxLayout;
Layout3_2->setSpacing( 6 );
Layout3_2->setMargin( 0 );
FNameLineEdit = new QLineEdit( this, "FNameLineEdit" );
QToolTip::add( FNameLineEdit, tr( "shows the selected filename" ) );
QWhatsThis::add( FNameLineEdit, tr( "Filename LineEdit\n"
"\n"
"shows the selected file\n"
"and allows the direct filename\n"
"edit" ) );
Layout3_2->addWidget( FNameLineEdit );
MkDirButton = new QToolButton( this, "MkDirButton" );
- MkDirButton->setText( tr( "" ) );
+ MkDirButton->setText( "" );
MkDirButton->setPixmap( image2 );
MkDirButton->setUsesBigPixmap( FALSE );
QToolTip::add( MkDirButton, tr( "confirms the selection and closes the form" ) );
QWhatsThis::add( MkDirButton, tr( "OKButton" ) );
Layout3_2->addWidget( MkDirButton );
Layout4->addLayout( Layout3_2 );
DirComboBox = new QComboBox( FALSE, this, "DirComboBox" );
DirComboBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, DirComboBox->sizePolicy().hasHeightForWidth() ) );
DirComboBox->setEditable( TRUE );
DirComboBox->setDuplicatesEnabled( FALSE );
QWhatsThis::add( DirComboBox, tr( "ComboBox Directory \n"
"edit or select the directories name" ) );
Layout4->addWidget( DirComboBox );
Layout5->addLayout( Layout4 );
ListView = new QListView( this, "ListView" );
ListView->addColumn( tr( "Name" ) );
ListView->addColumn( tr( "size" ) );
ListView->addColumn( tr( "type" ) );
ListView->setRootIsDecorated( TRUE );
QToolTip::add( ListView, tr( "directory listview" ) );
QWhatsThis::add( ListView, tr( "Directory ListView\n"
"\n"
"shows the list of dirs and files" ) );
Layout5->addWidget( ListView );
ScQtFileDlgLayout->addLayout( Layout5 );
// signals and slots connections
connect( OkButton, SIGNAL( clicked() ), this, SLOT( slotOK() ) );
connect( DirComboBox, SIGNAL( activated(int) ), this, SLOT( slotDirComboBoxChanged(int) ) );
connect( TypeComboBox, SIGNAL( activated(int) ), this, SLOT( slotTypeComboBoxChanged(int) ) );
connect( CancelButton, SIGNAL( clicked() ), this, SLOT( slotCancel() ) );
connect( ListView, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( slotSelectionChanged(QListViewItem*) ) );
connect( ListView, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( slotSelectionChanged(QListViewItem*) ) );
connect( ListView, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( slotDoubleClicked(QListViewItem*) ) );
connect( FNameLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( slotFileTextChanged(const QString&) ) );
connect( FNameLineEdit, SIGNAL( returnPressed() ), this, SLOT( slotOK() ) );
connect( MkDirButton, SIGNAL( clicked() ), this, SLOT( slotMkDir() ) );
}
/*
* Destroys the object and frees any allocated resources
*/
ScQtFileDlg::~ScQtFileDlg()
{
// no need to delete child widgets, Qt does it all for us
}
void ScQtFileDlg::slotCancel()
{
owarn << "ScQtFileDlg::slotCancel(): Not implemented yet!" << oendl;
}
void ScQtFileDlg::slotDirComboBoxChanged( int )
{
owarn << "ScQtFileDlg::slotDirComboBoxChanged( int ): Not implemented yet!" << oendl;
}
void ScQtFileDlg::slotDoubleClicked(QListViewItem *)
{
owarn << "ScQtFileDlg::slotDoubleClicked(QListViewItem *): Not implemented yet!" << oendl;
}
void ScQtFileDlg::slotFileTextChanged( const QString & )
{
owarn << "ScQtFileDlg::slotFileTextChanged( const QString & ): Not implemented yet!" << oendl;
}
void ScQtFileDlg::slotMkDir()
{
owarn << "ScQtFileDlg::slotMkDir(): Not implemented yet!" << oendl;
}
void ScQtFileDlg::slotOK()
{
owarn << "ScQtFileDlg::slotOK(): Not implemented yet!" << oendl;
}
void ScQtFileDlg::slotSelectionChanged(QListViewItem *)
{
owarn << "ScQtFileDlg::slotSelectionChanged(QListViewItem *): Not implemented yet!" << oendl;
}
void ScQtFileDlg::slotTypeComboBoxChanged( int )
{
owarn << "ScQtFileDlg::slotTypeComboBoxChanged( int ): Not implemented yet!" << oendl;
}
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp
index ca3ff52..189453e 100644
--- a/noncore/apps/zsafe/zsafe.cpp
+++ b/noncore/apps/zsafe/zsafe.cpp
@@ -494,211 +494,211 @@ ZSafe::ZSafe( QWidget* parent, const char* name, bool modal, WFlags fl )
{
if ( !QDir( zsafeAppDirPath ).exists() )
{
//FIXME: Pending someone to look into why QDir.mkdir does not work as expected
QString cmdline = QString().sprintf( "mkdir -p %s", (const char*) zsafeAppDirPath );
::system( cmdline );
}
if ( !QDir( zsafeAppDirPath ).exists() )
{
QMessageBox::critical( 0, "ZSafe", tr("Can't create application data directory.\nZSafe will now exit."));
exitZs (1);
}
}
// set the default filename
filename = zsafeAppDirPath + "/passwords.zsf";
// save the current filename to the config file
conf->writeEntry(APP_KEY+"document", filename);
saveConf();
//if (filename == "INVALIDPWD")
//filename = "";
QString ti = filename.right (filename.length() - filename.findRev ('/') - 1);
#ifdef WIN32
this->setCaption("Qt ZSafe: " + ti);
#else
this->setCaption("ZSafe: " + ti);
#endif
selectedItem = NULL;
lastSearchedCategory = NULL;
lastSearchedItem = NULL;
lastSearchedName = "";
lastSearchedUsername = "";
lastSearchedComment = "";
infoForm = new InfoForm();
categoryDialog = NULL;
// add a menu bar
QMenuBar *menu = new QMenuBar( this );
// add file menu
// QPopupMenu *file = new QPopupMenu( this );
file = new QPopupMenu( this );
// #ifdef DESKTOP
file->insertItem( new_img, tr("&New document"), this, SLOT(newDocument()) );
file->insertItem( folder_open_img, tr("&Open document"), this, SLOT(loadDocument()) );
file->insertItem( save_img, tr("&Save document as .."), this, SLOT(saveDocumentAs()) );
file->insertSeparator();
// #endif
file->insertItem( save_img, tr("&Save document"), this, SLOT(saveDocumentWithoutPwd()) );
file->insertItem( save_img, tr("S&ave document with new Password"), this,
SLOT(saveDocumentWithPwd()) );
file->insertSeparator();
file->insertItem( export_img, tr("&Export text file"), this, SLOT(writeAllEntries()) );
file->insertItem( import_img, tr("&Import text file"), this, SLOT(readAllEntries()) );
file->insertItem( trash_img, tr("&Remove text file"), this, SLOT(removeAsciiFile()) );
file->insertSeparator();
file->insertItem( expand_img, tr("&Open entries expanded"), this,
SLOT(setExpandFlag()), 0, 'o');
file->setItemChecked('o', expandTree);
file->insertSeparator();
file->insertItem( quit_icon_img, tr("E&xit"), this, SLOT(quitMe()) );
menu->insertItem( tr("&File"), file );
QPopupMenu *cat = new QPopupMenu( this );
cat->insertItem( new_img, tr("&New"), this, SLOT(addCategory()) );
cat->insertItem( edit_img, tr("&Edit"), this, SLOT(editCategory()) );
cat->insertItem( trash_img, tr("&Delete"), this, SLOT(delCategory()) );
menu->insertItem( tr("&Category"), cat );
QPopupMenu *it = new QPopupMenu( this );
it->insertItem( cut_img, tr("&Cut"), this, SLOT(cutItem()) );
it->insertItem( copy_img, tr("C&opy"), this, SLOT(copyItem()) );
it->insertItem( paste_img, tr("&Paste"), this, SLOT(pasteItem()) );
it->insertSeparator();
it->insertItem( new_img, tr("&New"), this, SLOT(newPwd()) );
it->insertItem( edit_img, tr("&Edit"), this, SLOT(editPwd()) );
it->insertItem( trash_img, tr("&Delete"), this, SLOT(deletePwd()) );
it->insertItem( find_img, tr("&Search"), this, SLOT(findPwd()) );
menu->insertItem( tr("&Entry"), it );
QPopupMenu *help = new QPopupMenu( this );
help->insertItem( help_icon_img, tr("&About"), this, SLOT(about()) );
menu->insertItem( tr("&Help"), help );
// toolbar icons
New = new QToolButton( menu, "New" );
New->setGeometry( QRect( DeskW-84, 2, 20, 20 ) );
New->setMouseTracking( TRUE );
- New->setText( tr( "" ) );
+ New->setText( "" );
New->setPixmap( new_img );
QToolTip::add( New, tr( "New entry" ) );
Edit = new QToolButton( menu, "Edit" );
Edit->setGeometry( QRect( DeskW-64, 2, 20, 20 ) );
- Edit->setText( tr( "" ) );
+ Edit->setText( "" );
Edit->setPixmap( edit_img );
QToolTip::add( Edit, tr( "Edit category or entry" ) );
Delete = new QToolButton( menu, "Delete" );
Delete->setGeometry( QRect( DeskW-44, 2, 20, 20 ) );
- Delete->setText( tr( "" ) );
+ Delete->setText( "" );
Delete->setPixmap( trash_img );
QToolTip::add( Delete, tr( "Delete category or entry" ) );
Find = new QToolButton( menu, "Find" );
Find->setGeometry( QRect( DeskW-24, 2, 20, 20 ) );
- Find->setText( tr( "" ) );
+ Find->setText( "" );
Find->setPixmap( find_img );
QToolTip::add( Find, tr( "Find entry" ) );
/*
QBoxLayout * h = new QHBoxLayout( this );
h->addWidget (menu);
h->addWidget (New);
h->addWidget (Edit);
h->addWidget (Delete);
h->addWidget (Find);
*/
ListView = new ZListView( this, "ListView" );
ListView->addColumn( tr( "Name" ) );
ListView->addColumn( tr( "Field 2" ) );
ListView->addColumn( tr( "Field 3" ) );
ListView->addColumn( tr( "Comment" ) );
ListView->addColumn( tr( "Field 4" ) );
ListView->addColumn( tr( "Field 5" ) );
ListView->setAllColumnsShowFocus(TRUE);
#ifdef DESKTOP
ListView->setResizePolicy(QScrollView::AutoOneFit);
// ListView->setGeometry( QRect( 0, 22, this->width(), this->height() - 30 ) );
#else
ListView->setResizePolicy(QScrollView::AutoOneFit);
// ListView->setGeometry( QRect( 0, 22,
// this->width(), this->height() - 30 ) );
// ListView->setMaximumSize( QSize( 440, 290 ) );
#endif
ListView->setVScrollBarMode( QListView::Auto );
QBoxLayout * l = new QVBoxLayout( this );
l->addWidget (menu);
l->addWidget (ListView);
#ifndef DESKTOP
// start a timer (100 ms) to load the default document
docuTimer.start( 100, true );
connect( &docuTimer, SIGNAL(timeout()), SLOT( slotLoadDocu() ) );
raiseFlag = true;
connect( &raiseTimer, SIGNAL(timeout()), SLOT( slotRaiseTimer() ) );
#else
// open the default document
openDocument(filename);
#endif
// signals and slots connections for QTollButton
connect( New, SIGNAL( clicked() ), this, SLOT( newPwd() ) );
connect( Edit, SIGNAL( clicked() ), this, SLOT( editPwd() ) );
connect( Delete, SIGNAL( clicked() ), this, SLOT( deletePwd() ) );
connect( Find, SIGNAL( clicked() ), this, SLOT( findPwd() ) );
// signals and slots connections for QListView
connect( ListView, SIGNAL( selectionChanged(QListViewItem*) ),
this, SLOT( listViewSelected(QListViewItem*) ) );
connect( ListView, SIGNAL( doubleClicked(QListViewItem*) ),
this, SLOT( showInfo(QListViewItem*) ) );
connect( ListView, SIGNAL( returnPressed(QListViewItem*) ),
this, SLOT( showInfo(QListViewItem*) ) );
}
const QColor *ZSafe::evenRowColor = &Qt::white;
// const QColor *ZSafe::oddRowColor = &Qt::lightGray;
const QColor *ZSafe::oddRowColor = new QColor(216,240,255);
/*
* Destroys the object and frees any allocated resources
*/
ZSafe::~ZSafe()
{
// no need to delete child widgets, Qt does it all for us
quitMe();
}
// load the default document
void ZSafe::slotLoadDocu()
{
openDocument (filename);
}
void ZSafe::deletePwd()
{
if (!selectedItem)
return;
if (!isCategory(selectedItem))
{
switch( QMessageBox::information( this, tr("ZSafe"),
tr("Do you want to delete?"),
tr("&Delete"), tr("D&on't Delete"),
0 // Enter == button 0
) ) { // Escape == button 2
case 0: // Delete clicked, Alt-S or Enter pressed.
// Delete
modified = true;
diff --git a/noncore/multimedia/powerchord/powerchordbase.cpp b/noncore/multimedia/powerchord/powerchordbase.cpp
index 98fe3f7..f0d1487 100644
--- a/noncore/multimedia/powerchord/powerchordbase.cpp
+++ b/noncore/multimedia/powerchord/powerchordbase.cpp
@@ -105,228 +105,228 @@ PowerchordBase::PowerchordBase( QWidget* parent, const char* name, WFlags fl )
chordfret->insertItem( tr( "1st" ) );
chordfret->insertItem( tr( "2nd" ) );
chordfret->insertItem( tr( "3rd" ) );
chordfret->insertItem( tr( "4th" ) );
chordfret->insertItem( tr( "5th" ) );
chordfret->insertItem( tr( "6th" ) );
chordfret->insertItem( tr( "7th" ) );
chordfret->insertItem( tr( "8th" ) );
chordfret->insertItem( tr( "9th" ) );
chordfret->insertItem( tr( "10th" ) );
chordfret->insertItem( tr( "11th" ) );
chordfret->insertItem( tr( "12th" ) );
chordfret->insertItem( tr( "13th" ) );
chordfret->insertItem( tr( "14th" ) );
chordfret->insertItem( tr( "15th" ) );
chordfret->insertItem( tr( "16th" ) );
chordfret->setGeometry( QRect( 90, 0, 55, 21 ) ); //cxm less 5 width
chordnote = new QComboBox( FALSE, tab, "chordnote" );
chordnote->insertItem( tr( "C" ) );
chordnote->insertItem( tr( "C#" ) );
chordnote->insertItem( tr( "D" ) );
chordnote->insertItem( tr( "Eb" ) );
chordnote->insertItem( tr( "E" ) );
chordnote->insertItem( tr( "F" ) );
chordnote->insertItem( tr( "F#" ) );
chordnote->insertItem( tr( "G" ) );
chordnote->insertItem( tr( "G#" ) );
chordnote->insertItem( tr( "A" ) );
chordnote->insertItem( tr( "Bb" ) );
chordnote->insertItem( tr( "B" ) );
chordnote->setGeometry( QRect( 0, 0, 40, 21 ) );
chordnote->setCurrentItem( 9 );
QWidget* privateLayoutWidget = new QWidget( tab, "Layout1" );
privateLayoutWidget->setGeometry( QRect( 5, 232, 160, 20 ) );
Layout1 = new QHBoxLayout( privateLayoutWidget );
Layout1->setSpacing( 6 );
Layout1->setMargin( 0 );
s1_1 = new QLabel( privateLayoutWidget, "s1_1" );
s1_1->setText( tr( "E" ) );
s1_1->setAlignment( int( QLabel::AlignCenter ) );
Layout1->addWidget( s1_1 );
s1_2 = new QLabel( privateLayoutWidget, "s1_2" );
s1_2->setText( tr( "A" ) );
s1_2->setAlignment( int( QLabel::AlignCenter ) );
Layout1->addWidget( s1_2 );
s1_3 = new QLabel( privateLayoutWidget, "s1_3" );
s1_3->setText( tr( "E" ) );
s1_3->setAlignment( int( QLabel::AlignCenter ) );
Layout1->addWidget( s1_3 );
s1_4 = new QLabel( privateLayoutWidget, "s1_4" );
s1_4->setText( tr( "A" ) );
s1_4->setAlignment( int( QLabel::AlignCenter ) );
Layout1->addWidget( s1_4 );
s1_5 = new QLabel( privateLayoutWidget, "s1_5" );
s1_5->setText( tr( "C#" ) );
s1_5->setAlignment( int( QLabel::AlignCenter ) );
Layout1->addWidget( s1_5 );
s1_6 = new QLabel( privateLayoutWidget, "s1_6" );
s1_6->setText( tr( "E" ) );
s1_6->setAlignment( int( QLabel::AlignCenter ) );
Layout1->addWidget( s1_6 );
// sound_label = new QLabel( tab, "sound_label" );
// sound_label->setGeometry( QRect( 185, 160, 32, 17 ) );
// sound_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, sound_label->sizePolicy().hasHeightForWidth() ) );
// sound_label->setPixmap( image0 );
// sound_label->pixmap()->setMask(*image0.mask());
// sound_label->setScaledContents( TRUE );
// sound_label->setBackgroundMode( QWidget::PaletteButton );
// sound_label->setBackgroundColor(this->backgroundColor());
// sound_label->setPalette( QPalette( QColor( 232, 227, 215) ) );
Frame6 = new QFrame( tab, "Frame6" );
Frame6->setGeometry( QRect( 170, 145, 66, 10 ) );
Frame6->setFrameShape( QFrame::HLine );
Frame6->setFrameShadow( QFrame::Raised );
chordshow_label = new QLabel( tab, "chordshow_label" );
chordshow_label->setGeometry( QRect( 185, 60, 32, 17 ) );
// chordshow_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, chordshow_label->sizePolicy().hasHeightForWidth() ) );
chordshow_label->setFrameShape( QLabel::NoFrame );
chordshow_label->setPixmap( image1 );
chordshow_label->setScaledContents( TRUE );
// chordshow_label->setBackgroundMode( QWidget::PaletteButton );
transport_rec = new QPushButton( tab, "transport_rec" );
transport_rec->setGeometry( QRect( 170, 80, 30, 30 ) );
- transport_rec->setText( tr( "" ) );
+ transport_rec->setText( "" );
transport_rec->setPixmap( image2 );
play_sound = new QPushButton( tab, "play_sound" );
play_sound->setGeometry( QRect( 170, 180, 60, 55 ) );
- play_sound->setText( tr( "" ) );
+ play_sound->setText( "" );
play_sound->setPixmap( image3 );
Frame6_2 = new QFrame( tab, "Frame6_2" );
Frame6_2->setGeometry( QRect( 170, 45, 66, 10 ) );
Frame6_2->setFrameShape( QFrame::HLine );
Frame6_2->setFrameShadow( QFrame::Raised );
transport_play = new QPushButton( tab, "transport_play" );
transport_play->setEnabled( FALSE );
transport_play->setGeometry( QRect( 200, 80, 30, 30 ) );
- transport_play->setText( tr( "" ) );
+ transport_play->setText( "" );
transport_play->setPixmap( image3 );
transport_rew = new QPushButton( tab, "transport_rew" );
transport_rew->setEnabled( FALSE );
transport_rew->setGeometry( QRect( 170, 110, 30, 30 ) );
- transport_rew->setText( tr( "" ) );
+ transport_rew->setText( "" );
transport_rew->setPixmap( image4 );
transport_fwd = new QPushButton( tab, "transport_fwd" );
transport_fwd->setEnabled( FALSE );
transport_fwd->setGeometry( QRect( 200, 110, 30, 30 ) );
- transport_fwd->setText( tr( "" ) );
+ transport_fwd->setText( "" );
transport_fwd->setPixmap( image5 );
chordname = new QLabel( tab, "chordname" );
chordname->setGeometry( QRect( 146, 0, 90, 20 ) ); //cxm moved l 5
chordname->setText( tr( "A" ) );
chordname->setAlignment( int( QLabel::AlignCenter ) );
- QToolTip::add( chordname, tr( "" ) );
+ QToolTip::add( chordname, "" );
synth = new gs();
tuner = new gt();
frets = new FretBoard( tab, "frets" );
frets->setGeometry( QRect( 0, 20, 168, 210 ) );
tabs->insertTab( tab, tr( "Guitar" ) );
tab_2 = new QWidget( tabs, "tab_2" );
optlab2 = new QLabel( tab_2, "optlab2" );
optlab2->setGeometry( QRect( 9, 58, 120, 41 ) );
optlab2->setText( tr( "Alternative tunings are possible" ) );
optlab2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) );
span = new QComboBox( FALSE, tab_2, "span" );
span->insertItem( tr( "2" ) );
span->insertItem( tr( "3" ) );
span->insertItem( tr( "4" ) );
span->insertItem( tr( "5" ) );
span->insertItem( tr( "6" ) );
span->setGeometry( QRect( 180, 20, 50, 21 ) );
span->setCurrentItem( 1 );
TextLabel1 = new QLabel( tab_2, "TextLabel1" );
TextLabel1->setGeometry( QRect( 3, 109, 226, 140 ) );
TextLabel1->setText( tr( QString::fromUtf8( "©2002 Camilo Mesias\n"
"camilo@mesias.co.uk\n"
"Version 0.0.7 beta" ) ) );
TextLabel1->setAlignment( int( QLabel::AlignBottom | QLabel::AlignLeft ) );
tuning = new QComboBox( FALSE, tab_2, "tuning" );
tuning->insertItem( tr( "EADGBE" ) );
tuning->insertItem( tr( "EBEG#BE" ) );
tuning->insertItem( tr( "EAEAC#E" ) );
tuning->insertItem( tr( "EADF#BE" ) );
tuning->insertItem( tr( "EADGCF" ) );
tuning->insertItem( tr( "DADGAD" ) );
tuning->insertItem( tr( "DGCGCD" ) );
tuning->insertItem( tr( "DADF#AD" ) );
tuning->insertItem( tr( "DADGBE" ) );
tuning->insertItem( tr( "DGDGBD" ) );
tuning->insertItem( tr( "DADACD" ) );
tuning->insertItem( tr( "CGCGAE" ) );
tuning->insertItem( tr( "FADGBE" ) );
tuning->insertItem( tr( "G minor" ) );
tuning->setGeometry( QRect( 140, 70, 91, 21 ) );
optlab1 = new QLabel( tab_2, "optlab1" );
optlab1->setGeometry( QRect( 8, 8, 160, 40 ) );
optlab1->setText( tr( "Span: the greatest number of frets over which you want chords to be generated" ) );
optlab1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) );
tabs->insertTab( tab_2, tr( "Options" ) );
Tuner = new QWidget( tabs, "Tuner" );
Frame4 = new QFrame( Tuner, "Frame4" );
Frame4->setGeometry( QRect( 0, 0, 230, 126 ) );
Frame4->setFrameShape( QFrame::Box );
Frame4->setFrameShadow( QFrame::Raised );
vu = new VUMeter( Frame4, "vu" );
vu->setGeometry( QRect( 5, 5, 220, 115 ) );
tuner_note = new QComboBox( FALSE, Tuner, "tuner_note" );
tuner_note->insertItem( tr( "auto" ) );
tuner_note->insertItem( tr( "E" ) );
tuner_note->insertItem( tr( "D" ) );
tuner_note->insertItem( tr( "G" ) );
tuner_note->insertItem( tr( "A" ) );
tuner_note->insertItem( tr( "B" ) );
tuner_note->insertItem( tr( "C" ) );
tuner_note->insertItem( tr( "F" ) );
tuner_note->setGeometry( QRect( 5, 160, 90, 20 ) );
Frame8 = new QFrame( Tuner, "Frame8" );
Frame8->setGeometry( QRect( -2, 188, 231, 10 ) );
Frame8->setFrameShape( QFrame::HLine );
Frame8->setFrameShadow( QFrame::Raised );
tuner_start = new QPushButton( Tuner, "tuner_start" );
tuner_start->setGeometry( QRect( 100, 155, 91, 30 ) );
tuner_start->setText( tr( "Start" ) );
tuner_lab1 = new QLabel( Tuner, "tuner_lab1" );
tuner_lab1->setGeometry( QRect( 10, 130, 100, 21 ) );
tuner_lab1->setText( tr( "Tuner operation" ) );
tuner_lab2 = new QLabel( Tuner, "tuner_lab2" );
tuner_lab2->setGeometry( QRect( 10, 200, 100, 16 ) );
tuner_lab2->setText( tr( "Pitch calibration" ) );
tuner_calib_note = new QComboBox( FALSE, Tuner, "tuner_calib_note" );
tuner_calib_note->insertItem( tr( "A" ) );
tuner_calib_note->insertItem( tr( "C" ) );
tuner_calib_note->setGeometry( QRect( 5, 225, 90, 21 ) );
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index 979b73a..6252fc2 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -4,193 +4,193 @@
#include <qtimer.h>
#include <qlayout.h>
#include <opie2/odebug.h>
#include <qpe/qpeapplication.h>
#include "defines.h"
#include "mainwindow.h"
using namespace Opie::Core;
MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
: QMainWindow( parent, name, flags )
{
setCaption( tr( "Mail" ) );
setToolBarsMovable( false );
toolBar = new QToolBar( this );
menuBar = new QMenuBar( toolBar );
mailMenu = new QPopupMenu( menuBar );
menuBar->insertItem( tr( "Mail" ), mailMenu );
settingsMenu = new QPopupMenu( menuBar );
menuBar->insertItem( tr( "Settings" ), settingsMenu );
addToolBar( toolBar );
toolBar->setHorizontalStretchable( true );
QLabel *spacer = new QLabel( toolBar );
spacer->setBackgroundMode( QWidget::PaletteButton );
toolBar->setStretchableWidget( spacer );
composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL,
0, 0, this );
composeMail->addTo( toolBar );
composeMail->addTo( mailMenu );
sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED,
0, 0, this );
sendQueued->addTo( toolBar );
sendQueued->addTo( mailMenu );
/*
syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC,
0, 0, this );
syncFolders->addTo( toolBar );
syncFolders->addTo( mailMenu );
*/
showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS,
0, 0, this, 0, true );
showFolders->addTo( toolBar );
showFolders->addTo( mailMenu );
showFolders->setOn( true );
connect(showFolders, SIGNAL( toggled(bool) ),
SLOT( slotShowFolders(bool) ) );
/*
searchMails = new QAction( tr( "Search mails" ), QIconSet( Resource::loadPixmap("find") ),
0, 0, this );
searchMails->addTo( toolBar );
searchMails->addTo( mailMenu );
*/
deleteMails = new QAction(tr("Delete Mail"), QIconSet( Resource::loadPixmap("trash")), 0, 0, this);
deleteMails->addTo( toolBar );
deleteMails->addTo( mailMenu );
connect( deleteMails, SIGNAL( activated() ),
SLOT( slotDeleteMail() ) );
editSettings = new QAction( tr( "Edit settings" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) ,
0, 0, this );
editSettings->addTo( settingsMenu );
connect( editSettings, SIGNAL( activated() ),
SLOT( slotEditSettings() ) );
editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) ,
0, 0, this );
editAccounts->addTo( settingsMenu );
//setCentralWidget( view );
QVBox* wrapperBox = new QVBox( this );
setCentralWidget( wrapperBox );
QWidget *view = new QWidget( wrapperBox );
layout = new QBoxLayout ( view, QBoxLayout::LeftToRight );
folderView = new AccountView( view );
folderView->header()->hide();
folderView->setRootIsDecorated( true );
folderView->addColumn( tr( "Mailbox" ) );
layout->addWidget( folderView );
mailView = new QListView( view );
- mailView->addColumn( tr( "" ) );
+ mailView->addColumn( "" );
mailView->addColumn( tr( "Subject" ),QListView::Manual );
mailView->addColumn( tr( "Sender" ),QListView::Manual );
mailView->addColumn( tr( "Size" ),QListView::Manual);
mailView->addColumn( tr( "Date" ));
mailView->setAllColumnsShowFocus(true);
mailView->setSorting(-1);
statusWidget = new StatusWidget( wrapperBox );
statusWidget->hide();
layout->addWidget( mailView );
layout->setStretchFactor( folderView, 1 );
layout->setStretchFactor( mailView, 2 );
slotAdjustLayout();
QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
connect( mailView, SIGNAL( mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ),this,
SLOT( mailLeftClicked(int,QListViewItem*,const QPoint&,int) ) );
connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
// Added by Stefan Eilers to allow starting by addressbook..
// copied from old mail2
#if !defined(QT_NO_COP)
connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ),
this, SLOT( appMessage(const QCString&,const QByteArray&) ) );
#endif
QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
}
MainWindow::~MainWindow()
{
}
void MainWindow::appMessage(const QCString &, const QByteArray &)
{
odebug << "appMessage not reached" << oendl;
}
void MainWindow::slotAdjustLayout() {
QWidget *d = QApplication::desktop();
if ( d->width() < d->height() ) {
layout->setDirection( QBoxLayout::TopToBottom );
} else {
layout->setDirection( QBoxLayout::LeftToRight );
}
}
void MainWindow::slotAdjustColumns()
{
bool hidden = folderView->isHidden();
if ( hidden ) folderView->show();
folderView->setColumnWidth( 0, folderView->visibleWidth() );
if ( hidden ) folderView->hide();
mailView->setColumnWidth( 0, 10 );
mailView->setColumnWidth( 1, mailView->visibleWidth() - 130 );
mailView->setColumnWidth( 2, 80 );
mailView->setColumnWidth( 3, 50 );
mailView->setColumnWidth( 4, 50 );
}
void MainWindow::slotEditSettings()
{
}
void MainWindow::slotShowFolders( bool )
{
odebug << "slotShowFolders not reached" << oendl;
}
void MainWindow::refreshMailView(const QValueList<RecMailP>&)
{
odebug << "refreshMailView not reached" << oendl;
}
void MainWindow::mailLeftClicked(int, QListViewItem *,const QPoint&,int )
{
odebug << "mailLeftClicked not reached" << oendl;
}
void MainWindow::displayMail()
{
odebug << "displayMail not reached" << oendl;
}
diff --git a/noncore/settings/mediummount/mediumglobal.cc b/noncore/settings/mediummount/mediumglobal.cc
index 0c6cf12..621784e 100644
--- a/noncore/settings/mediummount/mediumglobal.cc
+++ b/noncore/settings/mediummount/mediumglobal.cc
@@ -1,138 +1,138 @@
#include "mediumglobal.h"
/* OPIE */
#include <opie2/odebug.h>
using namespace Opie::Core;
#include <qpe/config.h>
/* QT */
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qabstractlayout.h> // spacer item
#include <qlayout.h>
#include <qframe.h>
#include <qgroupbox.h>
#include <qwhatsthis.h>
using namespace MediumMountSetting;
/* TRANSLATOR MediumMountSetting::MediumGlobalWidget */
MediumGlobalWidget::MediumGlobalWidget(QWidget *wid, const char *name )
: QWidget( wid, name, WStyle_ContextHelp )
{
m_config = 0;
initGUI();
readConfig();
}
void MediumGlobalWidget::initGUI()
{
m_layout = new QVBoxLayout(this );
m_layout->setMargin( 4 );
// m_layout->setSpacing( 10 );
m_label = new QLabel( this );
m_label->setTextFormat( Qt::RichText );
- m_label->setText( tr("") );
+ m_label->setText( "" );
QWhatsThis::add( this, tr("If a medium gets inserted into this device Opie "
"tries to search the medium for Documents. On "
"large mediums this can take some time. You can choose "
"if Opie should scan for Documents globally or on a "
"per medium level. You're also able to reconfigure "
"each medium.") );
m_layout->addWidget( m_label );
m_check = new QCheckBox( tr("Enable medium checking" ), this );
connect( m_check, SIGNAL(stateChanged(int) ),
this, SLOT(slotEnableChecking() ) );
m_layout->addWidget(m_check );
m_frame = new QFrame(this, "Frame" );
m_frame->setFrameShape( QFrame::Box );
m_frame->setFrameShadow( QFrame::Sunken );
m_box = new QVBoxLayout( m_frame );
m_box->setMargin( 5 );
m_useglobal = new QCheckBox( tr("Use global settings"), m_frame );
connect( m_useglobal, SIGNAL( stateChanged(int) ),
this, SLOT( slotGlobalChanged() ) );
m_box->addWidget( m_useglobal );
m_global = new QGroupBox( tr("Which media files"), m_frame );
m_frameLay = new QGridLayout(m_global, 4, 3 );
m_frameLay->setMargin( 10 );
QSpacerItem *item2 = new QSpacerItem( 5, 8,
QSizePolicy::Fixed,
QSizePolicy::Fixed );
m_audio = new QCheckBox( tr("Audio"), m_global );
m_all = new QCheckBox( tr("All") , m_global );
m_image = new QCheckBox( tr("Image"), m_global );
m_text = new QCheckBox( tr("Text") , m_global );
m_video = new QCheckBox( tr("Video"), m_global );
connect(m_all, SIGNAL(stateChanged(int) ),
this, SLOT(slotAllChanged() ) );
m_frameLay->addItem( item2, 0, 0 );
m_frameLay->addWidget( m_audio, 1, 0 );
m_frameLay->addWidget( m_image, 2, 0 );
m_frameLay->addWidget( m_all, 3, 0 );
m_frameLay->addWidget( m_text, 1, 2 );
m_frameLay->addWidget( m_video, 2, 2 );
m_frameLay->addRowSpacing( 0, 8 );
m_frameLay->addColSpacing( 1, 2 );
m_box->addWidget( m_global );
m_layout->addWidget( m_frame );
QSpacerItem *item1 = new QSpacerItem( 1, 24,
QSizePolicy::Fixed,
QSizePolicy::Expanding );
m_layout->addItem( item1 );
}
void MediumGlobalWidget::readConfig()
{
if( m_config == 0 )
m_config = new Config("medium" );
m_config->setGroup("main");
m_useglobal->setChecked( m_config->readBoolEntry("global", false ) );
m_check->setChecked( m_config->readBoolEntry("use", true ) );
m_config->setGroup("mimetypes" );
m_all->setChecked ( m_config->readBoolEntry("all", false ) );
m_audio->setChecked( m_config->readBoolEntry("audio", true ) );
m_video->setChecked( m_config->readBoolEntry("video", true ) );
m_text->setChecked ( m_config->readBoolEntry("text", true ) );
m_image->setChecked( m_config->readBoolEntry("image", true ) );
slotAllChanged();
slotEnableChecking();
slotGlobalChanged();
if( m_all->isChecked() ){
m_video->setEnabled( false );
m_text->setEnabled( false );
m_audio->setEnabled( false );
m_image->setEnabled( false );
}
}
void MediumGlobalWidget::writeConfig()
{
m_config->setGroup( "main" );
m_config->writeEntry("global", m_useglobal->isChecked() );
m_config->writeEntry("use", m_check->isChecked() );
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index f283119..84187d2 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -34,147 +34,147 @@ static const char* const image0_data[] = {
"...aaa...#.##.#.",
"....aa..#..#..#.",
".....a.....#.##.",
"..........#..#..",
"............##.."};
static const char* const image1_data[] = {
"16 16 3 1",
". c None",
"# c #000000",
"a c #ff0000",
"................",
"................",
"................",
".....#..........",
"....##..........",
"...###...a...a..",
"######..aaa.aaa.",
"######...aaaaa..",
"######....aaa...",
"######...aaaaa..",
"######..aaa.aaa.",
"...###...a...a..",
"....##..........",
".....#..........",
"................",
"................"};
/*
* Constructs a SoundSettingsBase which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl )
: QMainWindow( parent, name, fl )
{
QPixmap image0( ( const char** ) image0_data );
QPixmap image1( ( const char** ) image1_data );
if ( !name )
setName( "SoundSettingsBase" );
// resize(255,301);
setCaption( tr( "Vmemo Settings" ) );
SoundSettingsBaseLayout = new QGridLayout( this );
SoundSettingsBaseLayout->setSpacing( 4 );
SoundSettingsBaseLayout->setMargin( 4 );
QHBoxLayout *Layout11;
Layout11 = new QHBoxLayout;
Layout11->setSpacing( 4 );
Layout11->setMargin( 0 );
stereoCheckBox = new QCheckBox( this, "stereoCheckBox" );
stereoCheckBox->setText( tr( "Stereo" ) );
Layout11->addWidget( stereoCheckBox );
sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" );
sixteenBitCheckBox->setText( tr( "16 bit" ) );
Layout11->addWidget( sixteenBitCheckBox );
AlertCheckBox = new QCheckBox( this, "AlertCheckBox" );
AlertCheckBox->setText( tr( "Visual Alerts" ) );
Layout11->addWidget( AlertCheckBox );
SoundSettingsBaseLayout->addLayout( Layout11, 0, 0);
sampleRateLabel = new QLabel(this, "sampleRateLabel" );
sampleRateLabel->setText( tr( "Sample Rate:" ) );
SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0, 1);
sampleRate = new QComboBox( FALSE,this, "sampleRate" );
sampleRate->insertItem( tr( "8000" ) );
sampleRate->insertItem( tr( "11025" ) );
sampleRate->insertItem( tr( "22050" ) );
sampleRate->insertItem( tr( "33075" ) );
sampleRate->insertItem( tr( "44100" ) );
SoundSettingsBaseLayout->addMultiCellWidget( sampleRate, 2, 2, 0, 0, 1 );
TextLabel1 = new QLabel( this, "TextLabel1" );
TextLabel1->setText( tr( "Recording Directory:" ) );
SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0, 1);
LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" );
SoundSettingsBaseLayout->addMultiCellWidget( LocationComboBox, 4, 4, 0, 8, 1);
QLabel *TextLabelKey;
TextLabelKey = new QLabel( this, "TextLabelKey" );
TextLabelKey->setText( tr( "Recording Key:" ) );
SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0, 1);
keyComboBox = new QComboBox( FALSE, this, "keyComboBox" );
- keyComboBox->insertItem( tr( "" ) );
+ keyComboBox->insertItem( "" );
keyComboBox->insertItem( tr( "Taskbar Icon" ) );
keyComboBox->insertItem( tr( "Key_Record" ) );
keyComboBox->insertItem( tr( "Key_Space" ) );
keyComboBox->insertItem( tr( "Key_Home" ) );
keyComboBox->insertItem( tr( "Key_Calender" ) );
keyComboBox->insertItem( tr( "Key_Contacts" ) );
keyComboBox->insertItem( tr( "Key_Menu" ) );
keyComboBox->insertItem( tr( "Key_Mail" ) );
SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 0 ,1);
keyLabel= new QLabel( this, "keyLabel" );
SoundSettingsBaseLayout->addMultiCellWidget( keyLabel , 6, 6, 0, 2, 3);
QLabel *timeLimitLabel;
timeLimitLabel= new QLabel( this, "timeLimitLabel" );
timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) );
SoundSettingsBaseLayout->addMultiCellWidget( timeLimitLabel , 7, 7, 0, 0, 1);
timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" );
timeLimitComboBox->insertItem( tr( "30" ) );
timeLimitComboBox->insertItem( tr( "20" ) );
timeLimitComboBox->insertItem( tr( "15" ) );
timeLimitComboBox->insertItem( tr( "10" ) );
timeLimitComboBox->insertItem( tr( "5" ) );
timeLimitComboBox->insertItem( tr( "Unlimited" ) );
SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox , 8, 8, 0, 0, 1);
restartCheckBox= new QCheckBox( this, "restartCheck" );
restartCheckBox->setText( tr( "Restart Opie if needed" ) );
SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1);
adpcmCheckBox = new QCheckBox( this, "adpcmCheck" );
adpcmCheckBox->setText( tr( "Use ADPCM compression" ) );
SoundSettingsBaseLayout->addMultiCellWidget( adpcmCheckBox , 10, 10, 0, 0, 1);
QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
SoundSettingsBaseLayout->addItem( spacer4, 10, 0 );
}
/*
* Destroys the object and frees any allocated resources
*/
SoundSettingsBase::~SoundSettingsBase()
{
// no need to delete child widgets, Qt does it all for us
}
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 7f1c0b8..1719ed8 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -179,193 +179,193 @@ void MainWindow::makeMenu()
connect( findEdit, SIGNAL( textChanged(const QString&) ),
this, SLOT( displayList() ) );
a = new QAction( tr( "Clear Find" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), findEdit, SLOT( clear() ) );
a->addTo( findBar );
a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) );
a->addTo( findBar );
findAction = new QAction( tr( "Filter" ), QString::null, 0, this, 0 );
connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) );
findAction->setToggleAction( true );
findAction->addTo( viewMenu );
//SEARCH
searchBar = new QToolBar(this);
addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
label = new QLabel( tr("Search: "), searchBar );
// label->setBackgroundMode( PaletteForeground );
searchBar->setHorizontalStretchable( TRUE );
searchEdit = new QLineEdit( searchBar, "seachEdit" );
searchBar->setStretchableWidget( searchEdit );
// connect( searchEdit, SIGNAL( textChanged(const QString&) ),
// this, SLOT( displayList() ) );
a = new QAction( tr( "Clear Search" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), searchEdit, SLOT( clear() ) );
a->addTo( searchBar );
searchCommit = new QAction( tr( "Do Search" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 );
connect( searchCommit, SIGNAL( activated() ), SLOT( remotePackageQuery() ) );
searchCommit->addTo( searchBar );
a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( searchClose() ) );
a->addTo( searchBar );
searchAction = new QAction( tr( "Search" ), QString::null, 0, this, 0 );
connect( searchAction, SIGNAL( toggled(bool) ), this, SLOT( searchShow(bool) ) );
searchAction->setToggleAction( true );
searchAction->addTo( viewMenu );
//DEST
destBar = new QToolBar(this);
addToolBar( destBar, "Destination", QMainWindow::Top, TRUE );
label = new QLabel( tr("Destination: "), destBar );
// label->setBackgroundMode( PaletteForeground );
destBar->setHorizontalStretchable( TRUE );
destination = new QComboBox( false, destBar );
destination->insertStringList( settings->getDestinationNames() );
setComboName(destination,settings->getDestinationName());
connect( destination, SIGNAL(activated(int)),
settings, SLOT(activeDestinationChange(int)) );
// space->setBackgroundMode( PaletteForeground );
CheckBoxLink = new QCheckBox( tr("Link"), destBar);
// CheckBoxLink->setBackgroundMode( PaletteForeground );
CheckBoxLink->setChecked( settings->createLinks() );
connect( CheckBoxLink, SIGNAL(toggled(bool)),
settings, SLOT(linkEnabled(bool)) );
destAction = new QAction( tr( "Destinations" ), QString::null, 0, this, 0 );
connect( destAction, SIGNAL( toggled(bool) ), SLOT( destShow(bool) ) );
a = new QAction( tr( "Close Destinations" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), SLOT( destClose() ) );
a->addTo( destBar );
destBar->setStretchableWidget( CheckBoxLink );
destAction->setToggleAction( true );
destAction->addTo( viewMenu );
// helpMenu
helpMenu->insertSeparator();
a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 );
a->addTo( helpMenu );
helpMenu->insertSeparator();
a = new QAction( tr( "Install" ),
Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 );
a->addTo( helpMenu );
a = new QAction( tr( "Remove" ),
Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 );
a->addTo( helpMenu );
helpMenu->insertSeparator();
a = new QAction( tr( "Package Status" ), QString::null, 0, this, 0 );
a->addTo( helpMenu );
helpMenu->insertSeparator();
a = new QAction( tr( "New version, installed" ),
Resource::loadPixmap( "oipkg/installed" ), QString::null, 0, this, 0 );
a->addTo( helpMenu );
a = new QAction( tr( "New version, not installed" ),
Resource::loadPixmap( "oipkg/uninstalled" ), QString::null, 0, this, 0 );
a->addTo( helpMenu );
a = new QAction( tr( "Old version, installed" ),
Resource::loadPixmap( "oipkg/installedOld" ), QString::null, 0, this, 0 );
a->addTo( helpMenu );
a = new QAction( tr( "Old version, not installed" ),
Resource::loadPixmap( "oipkg/uninstalledOld" ), QString::null, 0, this, 0 );
a->addTo( helpMenu );
a = new QAction( tr( "Old version, new version installed" ),
Resource::loadPixmap( "oipkg/uninstalledOldinstalledNew" ), QString::null, 0, this, 0 );
a->addTo( helpMenu );
a = new QAction( tr( "New version, old version installed" ),
Resource::loadPixmap( "oipkg/uninstalledInstalledOld" ), QString::null, 0, this, 0 );
a->addTo( helpMenu );
-// a = new QAction( tr( "" ),
+// a = new QAction( "",
// Resource::loadPixmap( "oipkg/" ), QString::null, 0, this, 0 );
// a->addTo( helpMenu );
// configure the menus
Config cfg( "oipkg", Config::User );
cfg.setGroup( "gui" );
findShow( cfg.readBoolEntry( "findBar", true ) );
searchShow( cfg.readBoolEntry( "searchBar", true ) );
sectionShow( cfg.readBoolEntry( "sectionBar", true ) );
destShow( cfg.readBoolEntry( "destBar", false ) );
setComboName(section,cfg.readEntry("default_section"));
sectionChanged();
}
MainWindow::~MainWindow()
{
Config cfg( "oipkg", Config::User );
cfg.setGroup( "gui" );
cfg.writeEntry( "findBar", !findBar->isHidden() );
cfg.writeEntry( "searchBar", !searchBar->isHidden() );
cfg.writeEntry( "sectionBar", !sectionBar->isHidden() );
cfg.writeEntry( "destBar", !destBar->isHidden() );
cfg.writeEntry( "default_section", section->currentText() );
}
void MainWindow::runIpkg()
{
packageListServers.allPackages();
ipkg->loadList( &packageListSearch );
ipkg->loadList( &packageListDocLnk );
ipkg->loadList( &packageListServers );
ipkg->commit();
ipkg->clearLists();
// ##### If we looked in the list of files, we could send out accurate
// ##### messages. But we don't bother yet, and just do an "all".
QCopEnvelope e("QPE/System", "linkChanged(QString)");
QString lf = QString::null;
e << lf;
displayList();
}
void MainWindow::updateList()
{
packageListServers.clear();
packageListSearch.clear();
packageListDocLnk.clear();
ipkg->update();
packageListServers.update();
packageListSearch.update();
packageListDocLnk.update();
}
void MainWindow::filterList()
{
QString f = "";
if ( findAction->isOn() ) f = findEdit->text();
packageListServers.filterPackages( f );
}
void MainWindow::displayList()
{
filterList();
listViewPackages->display();
}
void MainWindow::sectionChanged()
{
disconnect( section, SIGNAL( activated(int) ),
this, SLOT( sectionChanged() ) );
disconnect( subsection, SIGNAL(activated(int) ),
this, SLOT( subSectionChanged() ) );
subsection->clear();
packageListServers.setSection( section->currentText() );
setSubSections();
connect( section, SIGNAL( activated(int) ),
this, SLOT( sectionChanged() ) );
connect( subsection, SIGNAL(activated(int) ),
this, SLOT( subSectionChanged() ) );
displayList();
}
void MainWindow::subSectionChanged()
{
disconnect( section, SIGNAL( activated(int) ),
this, SLOT( sectionChanged() ) );
disconnect( subsection, SIGNAL(activated(int) ),
this, SLOT( subSectionChanged() ) );
packageListServers.setSubSection( subsection->currentText() );
connect( section, SIGNAL( activated(int) ),
this, SLOT( sectionChanged() ) );
connect( subsection, SIGNAL(activated(int) ),
this, SLOT( subSectionChanged() ) );
displayList();