summaryrefslogtreecommitdiff
path: root/core/pim
Side-by-side diff
Diffstat (limited to 'core/pim') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp2
-rw-r--r--core/pim/addressbook/abview.cpp8
-rw-r--r--core/pim/addressbook/addressbook.cpp20
-rw-r--r--core/pim/addressbook/contacteditor.cpp60
-rw-r--r--core/pim/datebook/datebook.cpp36
-rw-r--r--core/pim/datebook/datebookday.cpp16
-rw-r--r--core/pim/datebook/datebookdayallday.cpp2
-rw-r--r--core/pim/datebook/datebookdayheaderimpl.cpp4
-rw-r--r--core/pim/datebook/datebooksettings.cpp2
-rw-r--r--core/pim/datebook/datebookweek.cpp4
-rw-r--r--core/pim/datebook/datebookweekheaderimpl.cpp2
-rw-r--r--core/pim/datebook/datebookweeklst.cpp28
-rw-r--r--core/pim/datebook/dateentryimpl.cpp20
-rw-r--r--core/pim/datebook/repeatentry.cpp4
-rw-r--r--core/pim/datebook2/mainwindow.cpp12
-rw-r--r--core/pim/osearch/mainwindow.cpp2
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginwidget.cpp4
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp4
-rw-r--r--core/pim/today/plugins/mail/mailpluginwidget.cpp4
-rw-r--r--core/pim/today/today.cpp4
-rw-r--r--core/pim/today/todayconfig.cpp2
-rw-r--r--core/pim/todo/mainwindow.cpp2
-rw-r--r--core/pim/todo/otaskeditor.cpp2
-rw-r--r--core/pim/todo/tableview.cpp16
-rw-r--r--core/pim/todo/taskeditoralarms.cpp4
-rw-r--r--core/pim/todo/taskeditorstatus.cpp12
26 files changed, 137 insertions, 139 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp
index f7bff58..29f4383 100644
--- a/core/pim/addressbook/abtable.cpp
+++ b/core/pim/addressbook/abtable.cpp
@@ -106,49 +106,49 @@ void AbPickItem::setContentFromEditor( QWidget *w )
}
#endif
/*!
\class AbTable abtable.h
\brief QTable based class for showing a list of entries
*/
AbTable::AbTable( const QValueList<int> order, QWidget *parent, const char *name )
: QTable( parent, name ),
lastSortCol( -1 ),
asc( TRUE ),
intFields( order ),
enablePainting( true ),
columnVisible( true ),
countNested( 0 )
{
// qWarning("C'tor start");
setSelectionMode( NoSelection );
init();
setSorting( TRUE );
- connect( this, SIGNAL(clicked(int,int,int,const QPoint &)),
+ connect( this, SIGNAL(clicked(int,int,int,const QPoint&)),
this, SLOT(itemClicked(int,int)) );
// contactList.clear();
// qWarning("C'tor end");
}
AbTable::~AbTable()
{
}
void AbTable::init()
{
// :SX showChar = '\0';
setNumRows( 0 );
setNumCols( 2 );
horizontalHeader()->setLabel( 0, tr( "Full Name" ));
horizontalHeader()->setLabel( 1, tr( "Contact" ));
setLeftMargin( 0 );
verticalHeader()->hide();
columnVisible = true;
}
void AbTable::setContacts( const OContactAccess::List& viewList )
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 670cdb0..8d61582 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -56,52 +56,52 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ):
m_contactdb = new OContactAccess ( "addressbook", 0l, 0l, false );
m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available
mCat.load( categoryFileName() );
// Create Layout and put WidgetStack into it.
QVBoxLayout *vb = new QVBoxLayout( this );
m_viewStack = new QWidgetStack( this );
vb->addWidget( m_viewStack );
// Creat TableView
QVBox* tableBox = new QVBox( m_viewStack );
m_abTable = new AbTable( m_orderedFields, tableBox, "table" );
m_abTable->setCurrentCell( 0, 0 );
m_abTable->setFocus();
// Add TableView to WidgetStack and raise it
m_viewStack -> addWidget( tableBox , TableView );
// Create CardView and add it to WidgetStack
QVBox* cardBox = new QVBox( m_viewStack );
m_ablabel = new AbLabel( cardBox, "CardView");
m_viewStack -> addWidget( cardBox , CardView );
// Connect views to me
- connect ( m_abTable, SIGNAL( signalSwitch( void ) ),
- this, SLOT( slotSwitch( void ) ) );
- connect ( m_ablabel, SIGNAL( signalOkPressed( void ) ),
- this, SLOT( slotSwitch( void ) ) );
+ connect ( m_abTable, SIGNAL( signalSwitch(void) ),
+ this, SLOT( slotSwitch(void) ) );
+ connect ( m_ablabel, SIGNAL( signalOkPressed(void) ),
+ this, SLOT( slotSwitch(void) ) );
load();
}
AbView::~AbView()
{
m_contactdb -> save();
delete m_contactdb;
if ( m_storedDB ){
m_storedDB -> save();
delete m_storedDB;
}
}
void AbView::setView( Views view )
{
qWarning("AbView::setView( Views view )");
m_curr_View = view;
load();
}
void AbView::addEntry( const OContact &newContact )
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 9cf55b3..8a5f9d5 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -114,71 +114,71 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
actionNew = a;
connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) );
a->addTo( edit );
a->addTo( listTools );
a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null,
0, this, 0 );
actionEdit = a;
connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) );
a->addTo( edit );
a->addTo( listTools );
a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null,
0, this, 0 );
actionTrash = a;
connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) );
a->addTo( edit );
a->addTo( listTools );
// make it possible to go directly to businesscard via qcop call
//#if defined(Q_WS_QWS) // Why this ? (se)
#if !defined(QT_NO_COP)
QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this );
- connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)),
- this, SLOT ( appMessage(const QCString &, const QByteArray &) ) );
+ connect (addressChannel, SIGNAL( received(const QCString&,const QByteArray&)),
+ this, SLOT ( appMessage(const QCString&,const QByteArray&) ) );
#endif
// #endif
a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ),
QString::null, 0, this, 0 );
actionFind = a;
connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) );
a->addTo( edit );
a->addTo( listTools );
// Much better search widget, taken from QTReader.. (se)
searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE );
searchBar->setHorizontalStretchable( TRUE );
searchBar->hide();
searchEdit = new QLineEdit( searchBar, "searchEdit" );
// QFont f("unifont", 16 /*, QFont::Bold*/);
// searchEdit->setFont( f );
searchBar->setStretchableWidget( searchEdit );
- connect( searchEdit, SIGNAL( returnPressed( ) ),
- this, SLOT( slotFind( ) ) );
+ connect( searchEdit, SIGNAL( returnPressed() ),
+ this, SLOT( slotFind() ) );
a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) );
a->addTo( searchBar );
a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) );
a->addTo( searchBar );
a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "addressbook/sendmail" ),
QString::null, 0, this, 0 );
//a->setEnabled( FALSE ); we got support for it now :) zecke
actionMail = a;
connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) );
a->addTo( edit );
a->addTo( listTools );
if ( Ir::supported() ) {
a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null,
0, this, 0 );
actionBeam = a;
connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) );
a->addTo( edit );
a->addTo( listTools );
@@ -205,78 +205,78 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
actionPersonal = a;
connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) );
a->addTo( edit );
#ifdef __DEBUG_RELEASE
// Remove this function for public Release ! This is only
// for debug purposes ..
a = new QAction( tr( "Save all Data"), QString::null, 0, 0 );
connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) );
a->addTo( edit );
#endif
a = new QAction( tr( "Config" ), Resource::loadPixmap( "SettingsIcon" ), QString::null,
0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) );
a->addTo( edit );
// Create Views
listContainer = new QWidget( this );
QVBoxLayout *vb = new QVBoxLayout( listContainer );
m_abView = new AbView( listContainer, m_config.orderList() );
vb->addWidget( m_abView );
// abList->setHScrollBarMode( QScrollView::AlwaysOff );
- connect( m_abView, SIGNAL( signalViewSwitched ( int ) ),
- this, SLOT( slotViewSwitched( int ) ) );
+ connect( m_abView, SIGNAL( signalViewSwitched(int) ),
+ this, SLOT( slotViewSwitched(int) ) );
QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) );
// m_abView->load(); // Already done by c'tor .
// Letter Picker
pLabel = new LetterPicker( listContainer );
connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char)));
connect(m_abView, SIGNAL( signalClearLetterPicker() ), pLabel, SLOT( clear() ) );
vb->addWidget( pLabel );
// All Categories into view-menu..
populateCategories();
// Fontsize
defaultFont = new QFont( m_abView->font() );
slotSetFont(m_config.fontSize());
m_curFontSize = m_config.fontSize();
setCentralWidget(listContainer);
// qDebug("adressbook contrsuction: t=%d", t.elapsed() );
connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) );
connect( qApp, SIGNAL( reload() ), this, SLOT( reload() ) );
- connect( qApp, SIGNAL( appMessage(const QCString &, const QByteArray &) ),
- this, SLOT( appMessage(const QCString &, const QByteArray &) ) );
+ connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ),
+ this, SLOT( appMessage(const QCString&,const QByteArray&) ) );
isLoading = false;
}
void AddressbookWindow::slotConfig()
{
ConfigDlg* dlg = new ConfigDlg( this, "Config" );
dlg -> setConfig( m_config );
if ( QPEApplication::execDialog( dlg ) ) {
qWarning ("Config Dialog accepted!");
m_config = dlg -> getConfig();
if ( m_curFontSize != m_config.fontSize() ){
qWarning("Font was changed!");
m_curFontSize = m_config.fontSize();
emit slotSetFont( m_curFontSize );
}
m_abView -> setListOrder( m_config.orderList() );
}
delete dlg;
}
@@ -574,49 +574,49 @@ void AddressbookWindow::slotBeam()
beamFilename );
OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
OContactAccess::List allList = access->allRecords();
OContactAccess::List::Iterator it = allList.begin(); // Just take first
c = *it;
delete access;
} else {
unlink( beamfile ); // delete if exists
mkdir("/tmp/obex/", 0755);
c = m_abView -> currentEntry();
OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
beamfile );
OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
access->add( c );
access->save();
delete access;
beamFilename = beamfile;
}
qWarning("Beaming: %s", beamFilename.latin1() );
Ir *ir = new Ir( this );
- connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
+ connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
QString description = c.fullName();
ir->send( beamFilename, description, "text/x-vCard" );
}
void AddressbookWindow::beamDone( Ir *ir )
{
delete ir;
unlink( beamfile );
}
static void parseName( const QString& name, QString *first, QString *middle,
QString * last )
{
int comma = name.find ( "," );
QString rest;
if ( comma > 0 ) {
*last = name.left( comma );
comma++;
while ( comma < int(name.length()) && name[comma] == ' ' )
comma++;
rest = name.mid( comma );
@@ -652,49 +652,49 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
QString name, email;
stream >> name >> email;
OContact cnt;
QString fn, mn, ln;
parseName( name, &fn, &mn, &ln );
// qDebug( " %s - %s - %s", fn.latin1(), mn.latin1(), ln.latin1() );
cnt.setFirstName( fn );
cnt.setMiddleName( mn );
cnt.setLastName( ln );
cnt.insertEmails( email );
cnt.setDefaultEmail( email );
cnt.setFileAs();
m_abView -> addEntry( cnt );
// :SXm_abView()->init( cnt );
editEntry( EditEntry );
} else if ( msg == "beamBusinessCard()" ) {
QString beamFilename = addressbookPersonalVCardName();
if ( !QFile::exists( beamFilename ) )
return; // can't beam a non-existent file
Ir *ir = new Ir( this );
- connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
+ connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
QString description = "mycard.vcf";
ir->send( beamFilename, description, "text/x-vCard" );
} else if ( msg == "show(int)" ) {
raise();
QDataStream stream(data,IO_ReadOnly);
int uid;
stream >> uid;
qWarning( "Showing uid: %d" , uid );
// Deactivate Personal View..
if ( actionPersonal->isOn() ){
actionPersonal->setOn( false );
slotPersonalView();
}
// Reset category and show as card..
m_abView -> setShowByCategory( QString::null );
m_abView -> setCurrentUid( uid );
slotViewSwitched ( AbView::CardView );
needShow = true;
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index b1eb042..8acf570 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -514,74 +514,74 @@ void ContactEditor::init() {
gl = new QGridLayout( container, 1, 2, 2, 4 );
int counter = 0;
// Birthday
QHBox* hBox = new QHBox( container );
l = new QLabel( tr("Birthday"), container );
gl->addWidget( l, counter, 0 );
QPopupMenu* m1 = new QPopupMenu( container );
birthdayPicker = new DateBookMonth( m1, 0, TRUE );
m1->insertItem( birthdayPicker );
birthdayButton= new QToolButton( hBox, "buttonStart" );
birthdayButton->setPopup( m1 );
birthdayButton->setPopupDelay(0);
QPushButton* deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ),
tr( "Delete" ),
hBox, 0 );
gl->addWidget( hBox, counter , 1 );
- connect( birthdayPicker, SIGNAL( dateClicked( int, int, int ) ),
- this, SLOT( slotBirthdayDateChanged( int, int, int ) ) );
+ connect( birthdayPicker, SIGNAL( dateClicked(int,int,int) ),
+ this, SLOT( slotBirthdayDateChanged(int,int,int) ) );
connect( deleteButton, SIGNAL( clicked() ), this, SLOT( slotRemoveBirthday() ) );
++counter;
// Anniversary
hBox = new QHBox( container );
l = new QLabel( tr("Anniversary"), container );
gl->addWidget( l, counter, 0 );
m1 = new QPopupMenu( container );
anniversaryPicker = new DateBookMonth( m1, 0, TRUE );
m1->insertItem( anniversaryPicker );
anniversaryButton= new QToolButton( hBox, "buttonStart" );
anniversaryButton->setPopup( m1 );
anniversaryButton->setPopupDelay(0);
deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ),
tr( "Delete" ),
hBox, 0 );
gl->addWidget( hBox, counter , 1 );
- connect( anniversaryPicker, SIGNAL( dateClicked( int, int, int ) ),
- this, SLOT( slotAnniversaryDateChanged( int, int, int ) ) );
+ connect( anniversaryPicker, SIGNAL( dateClicked(int,int,int) ),
+ this, SLOT( slotAnniversaryDateChanged(int,int,int) ) );
connect( deleteButton, SIGNAL( clicked() ), this, SLOT( slotRemoveAnniversary() ) );
++counter;
// Gender
l = new QLabel( tr("Gender"), container );
gl->addWidget( l, counter, 0 );
cmbGender = new QComboBox( container );
cmbGender->insertItem( "", 0 );
cmbGender->insertItem( tr("Male"), 1);
cmbGender->insertItem( tr("Female"), 2);
gl->addWidget( cmbGender, counter, 1 );
++counter;
// Create Labels and lineedit fields for every dynamic entry
QStringList::ConstIterator it = slDynamicEntries.begin();
QMap<QString, int> mapStrToID = OContactFields::untrFieldsToId();
QMap<int, QString> mapIdToStr = OContactFields::idToTrFields();
for (i = counter; it != slDynamicEntries.end(); i++, ++it ) {
if (((*it) == "Anniversary") ||
((*it) == "Birthday")|| ((*it) == "Gender")) continue;
@@ -623,74 +623,74 @@ void ContactEditor::init() {
gl->addWidget( l, 2, 0 );
txtLastName = new QLineEdit( dlgName );
gl->addWidget( txtLastName, 2, 1 );
// l = new QLabel( tr("Suffix"), dlgName );
// gl->addWidget( l, 3, 0 );
// txtSuffix = new QLineEdit( dlgName );
// gl->addWidget( txtSuffix, 3, 1 );
space = new QSpacerItem(1,1,
QSizePolicy::Maximum,
QSizePolicy::MinimumExpanding );
gl->addItem( space, 4, 0 );
cmbChooserField1->insertStringList( trlChooserNames );
cmbChooserField2->insertStringList( trlChooserNames );
cmbChooserField3->insertStringList( trlChooserNames );
cmbChooserField4->insertStringList( trlChooserNames );
cmbChooserField1->setCurrentItem( 0 );
cmbChooserField2->setCurrentItem( 1 );
cmbChooserField3->setCurrentItem( 2 );
connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) );
- connect( txtFullName, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotFullNameChange(const QString &)) );
- connect( txtSuffix, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotSuffixChange(const QString &)) );
- connect( txtOrganization, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotOrganizationChange(const QString &)) );
- connect( txtChooserField1, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotChooser1Change(const QString &)) );
- connect( txtChooserField2, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotChooser2Change(const QString &)) );
- connect( txtChooserField3, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotChooser3Change(const QString &)) );
- connect( txtChooserField4, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotChooser4Change(const QString &)) );
- connect( txtAddress, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotAddressChange(const QString &)) );
- connect( txtCity, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotCityChange(const QString &)) );
- connect( txtState, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotStateChange(const QString &)) );
- connect( txtZip, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotZipChange(const QString &)) );
- connect( cmbCountry, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotCountryChange(const QString &)) );
- connect( cmbCountry, SIGNAL(activated(const QString &)),
- this, SLOT(slotCountryChange(const QString &)) );
+ connect( txtFullName, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotFullNameChange(const QString&)) );
+ connect( txtSuffix, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotSuffixChange(const QString&)) );
+ connect( txtOrganization, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotOrganizationChange(const QString&)) );
+ connect( txtChooserField1, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotChooser1Change(const QString&)) );
+ connect( txtChooserField2, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotChooser2Change(const QString&)) );
+ connect( txtChooserField3, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotChooser3Change(const QString&)) );
+ connect( txtChooserField4, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotChooser4Change(const QString&)) );
+ connect( txtAddress, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotAddressChange(const QString&)) );
+ connect( txtCity, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotCityChange(const QString&)) );
+ connect( txtState, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotStateChange(const QString&)) );
+ connect( txtZip, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotZipChange(const QString&)) );
+ connect( cmbCountry, SIGNAL(textChanged(const QString&)),
+ this, SLOT(slotCountryChange(const QString&)) );
+ connect( cmbCountry, SIGNAL(activated(const QString&)),
+ this, SLOT(slotCountryChange(const QString&)) );
connect( cmbChooserField1, SIGNAL(activated(int)),
this, SLOT(slotCmbChooser1Change(int)) );
connect( cmbChooserField2, SIGNAL(activated(int)),
this, SLOT(slotCmbChooser2Change(int)) );
connect( cmbChooserField3, SIGNAL(activated(int)),
this, SLOT(slotCmbChooser3Change(int)) );
connect( cmbChooserField4, SIGNAL(activated(int)),
this, SLOT(slotCmbChooser4Change(int)) );
connect( cmbAddress, SIGNAL(activated(int)),
this, SLOT(slotAddressTypeChange(int)) );
new QPEDialogListener(this);
setPersonalView ( m_personalView );
qWarning("init() END");
}
void ContactEditor::defaultEmailChanged(int i){
qDebug("defaultEmailChanged");
// was sollte das ? (se)
// int index = cmbChooserField1->currentItem();
// slChooserValues[index] = cmbDefaultEmail->text(i);
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index af26302..3934411 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -140,58 +140,58 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
a->addTo( sub_bar );
// a->addTo( view );
a->setToggleAction( TRUE );
monthAction = a;
sub_bar->addSeparator();
a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), QString::null, 0, this, 0 );
connect( a, SIGNAL(activated()), this, SLOT(slotFind()) );
a->addTo( sub_bar );
a = new QAction( tr( "Edit..." ), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( slotSettings() ) );
a->addTo( sub_bar );
if(defaultView==DAY) viewDay();
if(defaultView==WEEK) needEvilHack=true; // viewWeek();
if(defaultView==WEEKLST) viewWeekLst();
if(defaultView==MONTH) viewMonth();
connect( qApp, SIGNAL(clockChanged(bool)), this, SLOT(changeClock(bool)) );
connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(changeWeek(bool)) );
#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
- connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), this, SLOT(appMessage(const QCString&, const QByteArray&)) );
+ connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&)), this, SLOT(appMessage(const QCString&,const QByteArray&)) );
#endif
// listen on QPE/System
#if defined(Q_WS_QWS)
#if !defined(QT_NO_COP)
QCopChannel *channel = new QCopChannel( "QPE/System", this );
- connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) );
+ connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) );
channel = new QCopChannel( "QPE/Datebook", this );
- connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) );
+ connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) );
#endif
#endif
qDebug("done t=%d", t.elapsed() );
connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) );
connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) );
/*
* Here is a problem description:
* When Weekview is the default view
* a DateBookWeekView get's created
* redraw() get's called. So what?
* Remember that we're still in the c'tor
* and no final layout has happened? Ok
* now all Events get arranged. Their x
* position get's determined by a QHeader
* position. But the QHeader isn't layouted or
* at the right position. redraw() is a slot
* so we'll call it then via a singleShot
* from view()
*/
if( needEvilHack ){
QTimer::singleShot( 500, this, SLOT(viewWeek()) );
}
@@ -496,102 +496,102 @@ void DateBook::removeEvent( const Event &e )
void DateBook::addEvent( const Event &e )
{
QDate d = e.start().date();
initDay();
dayView->setDate( d );
}
void DateBook::showDay( int year, int month, int day )
{
QDate d(year, month, day);
view(DAY,d);
}
void DateBook::initDay()
{
if ( !dayView ) {
dayView = new DateBookDay( ampm, onMonday, db, views, "day view" );
views->addWidget( dayView, DAY );
dayView->setJumpToCurTime( bJumpToCurTime );
dayView->setStartViewTime( startTime );
dayView->setRowStyle( rowStyle );
connect( this, SIGNAL( newEvent() ), dayView, SLOT( redraw() ) );
connect( dayView, SIGNAL( newEvent() ), this, SLOT( fileNew() ) );
- connect( dayView, SIGNAL( removeEvent( const Event & ) ), this, SLOT( removeEvent( const Event & ) ) );
- connect( dayView, SIGNAL( editEvent( const Event & ) ), this, SLOT( editEvent( const Event & ) ) );
- connect( dayView, SIGNAL( duplicateEvent( const Event & ) ), this, SLOT( duplicateEvent( const Event & ) ) );
- connect( dayView, SIGNAL( beamEvent( const Event & ) ), this, SLOT( beamEvent( const Event & ) ) );
- connect( dayView, SIGNAL(sigNewEvent(const QString &)), this, SLOT(slotNewEventFromKey(const QString &)) );
+ connect( dayView, SIGNAL( removeEvent(const Event&) ), this, SLOT( removeEvent(const Event&) ) );
+ connect( dayView, SIGNAL( editEvent(const Event&) ), this, SLOT( editEvent(const Event&) ) );
+ connect( dayView, SIGNAL( duplicateEvent(const Event&) ), this, SLOT( duplicateEvent(const Event&) ) );
+ connect( dayView, SIGNAL( beamEvent(const Event&) ), this, SLOT( beamEvent(const Event&) ) );
+ connect( dayView, SIGNAL(sigNewEvent(const QString&)), this, SLOT(slotNewEventFromKey(const QString&)) );
}
}
void DateBook::initWeek()
{
if ( !weekView ) {
weekView = new DateBookWeek( ampm, onMonday, db, views, "week view" );
weekView->setStartViewTime( startTime );
views->addWidget( weekView, WEEK );
- connect( weekView, SIGNAL( showDate( int, int, int ) ), this, SLOT( showDay( int, int, int ) ) );
+ connect( weekView, SIGNAL( showDate(int,int,int) ), this, SLOT( showDay(int,int,int) ) );
connect( this, SIGNAL( newEvent() ), weekView, SLOT( redraw() ) );
}
//But also get it right: the year that we display can be different
//from the year of the current date. So, first find the year
//number of the current week.
int yearNumber, totWeeks;
calcWeek( currentDate(), totWeeks, yearNumber, onMonday );
QDate d = QDate( yearNumber, 12, 31 );
calcWeek( d, totWeeks, yearNumber, onMonday );
while ( totWeeks == 1 ) {
d = d.addDays( -1 );
calcWeek( d, totWeeks, yearNumber, onMonday );
}
}
void DateBook::initWeekLst() {
if ( !weekLstView ) {
weekLstView = new DateBookWeekLst( ampm, onMonday, db, views, "weeklst view" );
views->addWidget( weekLstView, WEEKLST );
//weekLstView->setStartViewTime( startTime );
- connect( weekLstView, SIGNAL( showDate( int, int, int ) ), this, SLOT( showDay( int, int, int ) ) );
- connect( weekLstView, SIGNAL( addEvent( const QDateTime &, const QDateTime &, const QString & , const QString &) ),
- this, SLOT( slotNewEntry( const QDateTime &, const QDateTime &, const QString & , const QString &) ) );
+ connect( weekLstView, SIGNAL( showDate(int,int,int) ), this, SLOT( showDay(int,int,int) ) );
+ connect( weekLstView, SIGNAL( addEvent(const QDateTime&,const QDateTime&,const QString&, const QString&) ),
+ this, SLOT( slotNewEntry(const QDateTime&,const QDateTime&,const QString&, const QString&) ) );
connect( this, SIGNAL( newEvent() ), weekLstView, SLOT( redraw() ) );
- connect( weekLstView, SIGNAL( editEvent( const Event & ) ), this, SLOT( editEvent( const Event & ) ) );
+ connect( weekLstView, SIGNAL( editEvent(const Event&) ), this, SLOT( editEvent(const Event&) ) );
}
}
void DateBook::initMonth()
{
if ( !monthView ) {
monthView = new DateBookMonth( views, "month view", FALSE, db );
views->addWidget( monthView, MONTH );
- connect( monthView, SIGNAL( dateClicked( int, int, int ) ), this, SLOT( showDay( int, int, int ) ) );
+ connect( monthView, SIGNAL( dateClicked(int,int,int) ), this, SLOT( showDay(int,int,int) ) );
connect( this, SIGNAL( newEvent() ), monthView, SLOT( redraw() ) );
qApp->processEvents();
}
}
void DateBook::loadSettings()
{
Config qpeconfig( "qpe" );
qpeconfig.setGroup("Time");
ampm = qpeconfig.readBoolEntry( "AMPM", TRUE );
onMonday = qpeconfig.readBoolEntry( "MONDAY" );
Config config("DateBook");
config.setGroup("Main");
startTime = config.readNumEntry("startviewtime", 8);
aPreset = config.readBoolEntry("alarmpreset");
presetTime = config.readNumEntry("presettime");
bJumpToCurTime = config.readBoolEntry("jumptocurtime");
rowStyle = config.readNumEntry("rowstyle");
defaultView = config.readNumEntry("defaultview",DAY);
weeklistviewconfig = config.readNumEntry("weeklistviewconfig",NORMAL);
defaultLocation=config.readEntry("defaultLocation");
QString tmpString=config.readEntry("defaultCategories");
@@ -884,72 +884,70 @@ void DateBook::slotNewEntry(const QDateTime &start, const QDateTime &end, const
emit newEvent();
break;
}
}
void DateBook::setDocument( const QString &filename )
{
if ( filename.find(".vcs") != int(filename.length()) - 4 ) return;
QValueList<Event> tl = Event::readVCalendar( filename );
for( QValueList<Event>::Iterator it = tl.begin(); it != tl.end(); ++it ) {
db->addEvent( *it );
}
}
static const char * beamfile = "/tmp/obex/event.vcs";
void DateBook::beamEvent( const Event &e )
{
qDebug("trying to beamn");
unlink( beamfile ); // delete if exists
mkdir("/tmp/obex/", 0755);
Event::writeVCalendar( beamfile, e );
Ir *ir = new Ir( this );
- connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
+ connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
QString description = e.description();
ir->send( beamfile, description, "text/x-vCalendar" );
}
void DateBook::beamDone( Ir *ir )
{
delete ir;
unlink( beamfile );
}
void DateBook::slotFind()
{
// move it to the day view...
viewDay();
FindDialog frmFind( "Calendar", this ); // no tr needed
frmFind.setUseDate( true );
frmFind.setDate( currentDate() );
QObject::connect( &frmFind,
- SIGNAL(signalFindClicked(const QString&, const QDate&,
- bool, bool, int)),
+ SIGNAL(signalFindClicked(const QString&,const QDate&,bool,bool,int)),
this,
- SLOT(slotDoFind(const QString&, const QDate&,
- bool, bool, int)) );
+ SLOT(slotDoFind(const QString&,const QDate&,bool,bool,int)) );
QObject::connect( this,
SIGNAL(signalNotFound()),
&frmFind,
SLOT(slotNotFound()) );
QObject::connect( this,
SIGNAL(signalWrapAround()),
&frmFind,
SLOT(slotWrapAround()) );
frmFind.move(0,0);
frmFind.exec();
inSearch = false;
}
bool catComp( QArray<int> cats, int category )
{
bool returnMe;
int i,
count;
count = int(cats.count());
returnMe = false;
if ( (category == -1 && count == 0) || category == -2 )
returnMe = true;
else {
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp
index 751a1da..ca63dc5 100644
--- a/core/pim/datebook/datebookday.cpp
+++ b/core/pim/datebook/datebookday.cpp
@@ -187,83 +187,83 @@ void DateBookDayView::contentsMouseReleaseEvent( QMouseEvent* /* e */ )
eh=9;
}
quickLineEdit=new DateBookDayViewQuickLineEdit(QDateTime(currDate,QTime(sh,0,0,0)),QDateTime(currDate,QTime(eh,0,0,0)),this->viewport(),"quickedit");
quickLineEdit->setGeometry(0,0,this->columnWidth(0)-1,this->rowHeight(0));
this->moveChild(quickLineEdit,0,sh*this->rowHeight(0));
quickLineEdit->setFocus();
quickLineEdit->show();
}
//===========================================================================
DateBookDayViewQuickLineEdit::DateBookDayViewQuickLineEdit(const QDateTime &start, const QDateTime &end,QWidget * parent, const char *name) : QLineEdit(parent,name)
{
active=1;
quickEvent.setStart(start);
quickEvent.setEnd(end);
connect(this,SIGNAL(returnPressed()),this,SLOT(slotReturnPressed()));
}
void DateBookDayViewQuickLineEdit::slotReturnPressed()
{
if(active && (!this->text().isEmpty())) { // Fix to avoid having this event beeing added multiple times.
quickEvent.setDescription(this->text());
- connect(this,SIGNAL(insertEvent(const Event &)),this->topLevelWidget(),SLOT(insertEvent(const Event &)));
+ connect(this,SIGNAL(insertEvent(const Event&)),this->topLevelWidget(),SLOT(insertEvent(const Event&)));
emit(insertEvent(quickEvent));
active=0;
}
/* we need to return to this object.. */
QTimer::singleShot(500, this, SLOT(finallyCallClose()) ); // Close and also delete this widget
}
void DateBookDayViewQuickLineEdit::finallyCallClose() {
close(true); // also deletes this widget...
}
void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent* /* e */)
{
slotReturnPressed(); // Reuse code to add event and close this widget.
}
//===========================================================================
DateBookDay::DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb, QWidget *parent, const char *name )
: QVBox( parent, name ), currDate( QDate::currentDate() ), db( newDb ), startTime( 0 )
{
widgetList.setAutoDelete( true );
header = new DateBookDayHeader( startOnMonday, this, "day header" );
header->setDate( currDate.year(), currDate.month(), currDate.day() );
m_allDays = new DatebookdayAllday(newDb, this, "all day event list" );
m_allDays->hide();
view = new DateBookDayView( ampm, this, "day view" );
- connect( header, SIGNAL( dateChanged( int, int, int ) ), this, SLOT( dateChanged( int, int, int ) ) );
- connect( header, SIGNAL( dateChanged( int, int, int ) ), view, SLOT( slotDateChanged( int, int, int ) ) );
+ connect( header, SIGNAL( dateChanged(int,int,int) ), this, SLOT( dateChanged(int,int,int) ) );
+ connect( header, SIGNAL( dateChanged(int,int,int) ), view, SLOT( slotDateChanged(int,int,int) ) );
connect( view, SIGNAL( sigColWidthChanged() ), this, SLOT( slotColWidthChanged() ) );
connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(slotWeekChanged(bool)) );
- connect( view, SIGNAL(sigCapturedKey(const QString &)), this, SIGNAL(sigNewEvent(const QString&)) );
+ connect( view, SIGNAL(sigCapturedKey(const QString&)), this, SIGNAL(sigNewEvent(const QString&)) );
QTimer *timer = new QTimer( this );
connect( timer, SIGNAL(timeout()), this, SLOT(updateView()) ); //connect timer for updating timeMarker & daywidgetcolors
timer->start( 1000*60*5, FALSE ); //update every 5min
selectedWidget = 0;
timeMarker = new DateBookDayTimeMarker( this );
timeMarker->setTime( QTime::currentTime() );
rowStyle = -1; // initialize with bogus values
jumpToCurTime = false;
}
void DateBookDay::setJumpToCurTime( bool bJump )
{
jumpToCurTime = bJump;
}
void DateBookDay::setRowStyle( int style )
{
if (rowStyle != style) view->setRowStyle( style );
rowStyle = style;
}
@@ -352,52 +352,52 @@ void DateBookDay::redraw()
void DateBookDay::getEvents()
{
widgetList.clear();
/* clear the AllDay List */
m_allDays->hide(); // just in case
m_allDays->removeAllEvents();
QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, currDate );
QValueListIterator<EffectiveEvent> it;
QObject* object = 0;
for ( it = eventList.begin(); it != eventList.end(); ++it ) {
EffectiveEvent ev=*it;
if(!((ev.end().hour()==0) && (ev.end().minute()==0) && (ev.startDate()!=ev.date()))) { // Skip events ending at 00:00 starting at another day.
if (ev.event().type() == Event::AllDay ) {
object = m_allDays->addEvent( ev );
if (!object)
continue;
}else {
DateBookDayWidget* w = new DateBookDayWidget( *it, this );
widgetList.append( w );
object = w;
}
- connect( object, SIGNAL( deleteMe( const Event & ) ), this, SIGNAL( removeEvent( const Event & ) ) );
- connect( object, SIGNAL( duplicateMe( const Event & ) ), this, SIGNAL( duplicateEvent( const Event & ) ) );
- connect( object, SIGNAL( editMe( const Event & ) ), this, SIGNAL( editEvent( const Event & ) ) );
- connect( object, SIGNAL( beamMe( const Event & ) ), this, SIGNAL( beamEvent( const Event & ) ) );
+ connect( object, SIGNAL( deleteMe(const Event&) ), this, SIGNAL( removeEvent(const Event&) ) );
+ connect( object, SIGNAL( duplicateMe(const Event&) ), this, SIGNAL( duplicateEvent(const Event&) ) );
+ connect( object, SIGNAL( editMe(const Event&) ), this, SIGNAL( editEvent(const Event&) ) );
+ connect( object, SIGNAL( beamMe(const Event&) ), this, SIGNAL( beamEvent(const Event&) ) );
}
}
}
static int place( const DateBookDayWidget *item, bool *used, int maxn )
{
int place = 0;
int start = item->event().start().hour();
QTime e = item->event().end();
int end = e.hour();
if ( e.minute() < 5 )
end--;
if ( end < start )
end = start;
while ( place < maxn ) {
bool free = TRUE;
int s = start;
while( s <= end ) {
if ( used[10*s+place] ) {
free = FALSE;
break;
}
s++;
diff --git a/core/pim/datebook/datebookdayallday.cpp b/core/pim/datebook/datebookdayallday.cpp
index d43d31a..a0aefd3 100644
--- a/core/pim/datebook/datebookdayallday.cpp
+++ b/core/pim/datebook/datebookdayallday.cpp
@@ -39,49 +39,49 @@ DatebookdayAllday::DatebookdayAllday(DateBookDB* db, QWidget* parent, const cha
datebookdayalldayLayout->setMargin( 0 );
lblDesc = new DatebookEventDesc(parent->parentWidget(),"");
lblDesc->setBackgroundColor(Qt::yellow);
lblDesc->hide();
subWidgets.setAutoDelete(true);
}
/*
* Destroys the object and frees any allocated resources
*/
DatebookdayAllday::~DatebookdayAllday()
{
// no need to delete child widgets, Qt does it all for us
}
DatebookAlldayDisp* DatebookdayAllday::addEvent(const EffectiveEvent&ev)
{
DatebookAlldayDisp * lb;
lb = new DatebookAlldayDisp(dateBook,ev,m_MainFrame,NULL);
lb->show();
datebookdayalldayLayout->addWidget(lb);
subWidgets.append(lb);
- connect(lb,SIGNAL(displayMe(const Event &)),lblDesc,SLOT(disp_event(const Event&)));
+ connect(lb,SIGNAL(displayMe(const Event&)),lblDesc,SLOT(disp_event(const Event&)));
++item_count;
return lb;
}
void DatebookdayAllday::removeAllEvents()
{
subWidgets.clear();
item_count = 0;
}
DatebookAlldayDisp::DatebookAlldayDisp(DateBookDB *db,const EffectiveEvent& ev,
QWidget* parent,const char* name,WFlags f)
: QLabel(parent,name,f),m_Ev(ev),dateBook(db)
{
QString strDesc = m_Ev.description();
strDesc = strDesc.replace(QRegExp("<"),"&#60;");
setBackgroundColor(yellow);
setText(strDesc);
setFrameStyle(QFrame::Raised|QFrame::Panel);
int s = QFontMetrics(font()).height()+4;
setMaximumHeight( s );
setMinimumSize( QSize( 0, s ) );
diff --git a/core/pim/datebook/datebookdayheaderimpl.cpp b/core/pim/datebook/datebookdayheaderimpl.cpp
index 213c843..51b78ca 100644
--- a/core/pim/datebook/datebookdayheaderimpl.cpp
+++ b/core/pim/datebook/datebookdayheaderimpl.cpp
@@ -75,50 +75,50 @@ void DateBookDayHeader::setupNames()
cmdDay4->setText( DateBookDayHeaderBase::tr("Thursday").left(1) );
cmdDay5->setText( DateBookDayHeaderBase::tr("Friday").left(1) );
cmdDay6->setText( DateBookDayHeaderBase::tr("Saturday").left(1) );
cmdDay7->setText( DateBookDayHeaderBase::tr("Sunday").left(1) );
} else {
cmdDay1->setText( DateBookDayHeaderBase::tr("Sunday").left(1) );
cmdDay2->setText( DateBookDayHeaderBase::tr("Monday").left(1) );
cmdDay3->setText( DateBookDayHeaderBase::tr("Tuesday").left(1) );
cmdDay4->setText( DateBookDayHeaderBase::tr("Wednesday").left(1) );
cmdDay5->setText( DateBookDayHeaderBase::tr("Thursday").left(1) );
cmdDay6->setText( DateBookDayHeaderBase::tr("Friday").left(1) );
cmdDay7->setText( DateBookDayHeaderBase::tr("Saturday").left(1) );
}
}
void DateBookDayHeader::pickDate()
{
static QPopupMenu *m1 = 0;
static DateBookMonth *picker = 0;
if ( !m1 ) {
m1 = new QPopupMenu( this );
picker = new DateBookMonth( m1, 0, TRUE );
m1->insertItem( picker );
- connect( picker, SIGNAL( dateClicked( int, int, int ) ),
- this, SLOT( setDate( int, int, int ) ) );
+ connect( picker, SIGNAL( dateClicked(int,int,int) ),
+ this, SLOT( setDate(int,int,int) ) );
connect( m1, SIGNAL( aboutToHide() ),
this, SLOT( gotHide() ) );
}
picker->setDate( currDate.year(), currDate.month(), currDate.day() );
m1->popup(mapToGlobal(date->pos()+QPoint(0,date->height())));
picker->setFocus();
}
void DateBookDayHeader::gotHide()
{
// we have to redo the button...
date->setDown( false );
}
/*
* public slot
*/
void DateBookDayHeader::goBack()
{
currDate = currDate.addDays( -1 );
setDate( currDate.year(), currDate.month(), currDate.day() );
}
/*
* public slot
diff --git a/core/pim/datebook/datebooksettings.cpp b/core/pim/datebook/datebooksettings.cpp
index a6d04ba..cb4b73b 100644
--- a/core/pim/datebook/datebooksettings.cpp
+++ b/core/pim/datebook/datebooksettings.cpp
@@ -10,49 +10,49 @@
**
** 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 "datebooksettings.h"
#include <qpe/qpeapplication.h>
#include <qspinbox.h>
#include <qcheckbox.h>
DateBookSettings::DateBookSettings( bool whichClock, QWidget *parent,
const char *name, bool modal, WFlags fl )
: DateBookSettingsBase( parent, name, modal, fl ),
ampm( whichClock )
{
init();
- QObject::connect( qApp, SIGNAL( clockChanged( bool ) ), this, SLOT( slotChangeClock( bool ) ) );
+ QObject::connect( qApp, SIGNAL( clockChanged(bool) ), this, SLOT( slotChangeClock(bool) ) );
QArray<int> categories;
comboCategory->setCategories( categories, "Calendar", tr("Calendar") );
}
DateBookSettings::~DateBookSettings()
{
}
void DateBookSettings::setStartTime( int newStartViewTime )
{
if ( ampm ) {
if ( newStartViewTime >= 12 ) {
newStartViewTime %= 12;
if ( newStartViewTime == 0 )
newStartViewTime = 12;
spinStart->setSuffix( tr(":00 PM") );
}
else if ( newStartViewTime == 0 ) {
newStartViewTime = 12;
spinStart->setSuffix( tr(":00 AM") );
}
oldtime = newStartViewTime;
}
spinStart->setValue( newStartViewTime );
diff --git a/core/pim/datebook/datebookweek.cpp b/core/pim/datebook/datebookweek.cpp
index 933e191..7503751 100644
--- a/core/pim/datebook/datebookweek.cpp
+++ b/core/pim/datebook/datebookweek.cpp
@@ -341,52 +341,52 @@ void DateBookWeekView::setStartOfWeek( bool bStartOnMonday )
//-------------------------------------------------------------------
DateBookWeek::DateBookWeek( bool ap, bool startOnMonday, DateBookDB *newDB,
QWidget *parent, const char *name )
: QWidget( parent, name ),
db( newDB ),
startTime( 0 ),
ampm( ap ),
bStartOnMonday( startOnMonday )
{
setFocusPolicy(StrongFocus);
QVBoxLayout *vb = new QVBoxLayout( this );
header = new DateBookWeekHeader( bStartOnMonday, this );
view = new DateBookWeekView( ampm, startOnMonday, this );
vb->addWidget( header );
vb->addWidget( view );
lblDesc = new QLabel( this, "event label" );
lblDesc->setFrameStyle( QFrame::Plain | QFrame::Box );
lblDesc->setBackgroundColor( yellow );
lblDesc->hide();
tHide = new QTimer( this );
- connect( view, SIGNAL( showDay( int ) ), this, SLOT( showDay( int ) ) );
+ connect( view, SIGNAL( showDay(int) ), this, SLOT( showDay(int) ) );
connect( view, SIGNAL(signalShowEvent(const EffectiveEvent&)), this, SLOT(slotShowEvent(const EffectiveEvent&)) );
connect( view, SIGNAL(signalHideEvent()), this, SLOT(slotHideEvent()) );
- connect( header, SIGNAL( dateChanged( QDate &) ), this, SLOT( dateChanged( QDate &) ) );
+ connect( header, SIGNAL( dateChanged(QDate&) ), this, SLOT( dateChanged(QDate&) ) );
connect( tHide, SIGNAL( timeout() ), lblDesc, SLOT( hide() ) );
connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(slotWeekChanged(bool)) );
connect( qApp, SIGNAL(clockChanged(bool)), this, SLOT(slotClockChanged(bool)));
setDate(QDate::currentDate());
}
void DateBookWeek::keyPressEvent(QKeyEvent *e)
{
switch(e->key()) {
case Key_Up:
view->scrollBy(0, -20);
break;
case Key_Down:
view->scrollBy(0, 20);
break;
case Key_Left:
setDate(date().addDays(-7));
break;
case Key_Right:
setDate(date().addDays(7));
break;
default:
e->ignore();
}
diff --git a/core/pim/datebook/datebookweekheaderimpl.cpp b/core/pim/datebook/datebookweekheaderimpl.cpp
index eaa9730..c237b2d 100644
--- a/core/pim/datebook/datebookweekheaderimpl.cpp
+++ b/core/pim/datebook/datebookweekheaderimpl.cpp
@@ -35,49 +35,49 @@ DateBookWeekHeader::DateBookWeekHeader( bool startOnMonday, QWidget* parent, con
setBackgroundMode( PaletteButton );
labelDate->setBackgroundMode( PaletteButton );
backmonth->setPixmap( Resource::loadPixmap("fastback") );
backweek->setPixmap( Resource::loadPixmap("back") );
forwardweek->setPixmap( Resource::loadPixmap("forward") );
forwardmonth->setPixmap( Resource::loadPixmap("fastforward") );
}
/*
* Destroys the object and frees any allocated resources
*/
DateBookWeekHeader::~DateBookWeekHeader()
{
// no need to delete child widgets, Qt does it all for us
}
void DateBookWeekHeader::pickDate()
{
static QPopupMenu *m1 = 0;
static DateBookMonth *picker = 0;
if ( !m1 ) {
m1 = new QPopupMenu( this );
picker = new DateBookMonth( m1, 0, TRUE );
m1->insertItem( picker );
- connect( picker, SIGNAL( dateClicked( int, int, int ) ), this, SLOT( setDate( int, int, int ) ) );
+ connect( picker, SIGNAL( dateClicked(int,int,int) ), this, SLOT( setDate(int,int,int) ) );
// connect( m1, SIGNAL( aboutToHide() ), this, SLOT( gotHide() ) );
}
picker->setDate( date.year(), date.month(), date.day() );
m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height())));
picker->setFocus();
}
void DateBookWeekHeader::nextMonth()
{
qWarning("nextMonth() " );
setDate(date.addDays(28));
}
void DateBookWeekHeader::prevMonth()
{
qWarning("prevMonth() " );
setDate(date.addDays(-28));
}
void DateBookWeekHeader::nextWeek()
{
qWarning("nextWeek() " );
setDate(date.addDays(7));
}
void DateBookWeekHeader::prevWeek()
{
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index 42a1753..af40143 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -51,49 +51,49 @@ void DateBookWeekLstHeader::setDate(const QDate &d) {
/* we already have the right day -7 would lead to the same week */
dayofweek = 0;
date=date.addDays(-dayofweek);
calcWeek(date,week,year,bStartOnMonday);
QDate start=date;
QDate stop=start.addDays(6);
labelDate->setText( QString::number(start.day()) + "." +
Calendar::nameOfMonth( start.month() ) + "-" +
QString::number(stop.day()) + "." +
Calendar::nameOfMonth( stop.month()) +" ("+
tr("w")+":"+QString::number( week ) +")");
date = d; // bugfix: 0001126 - date has to be the selected date, not monday!
emit dateChanged(date);
}
void DateBookWeekLstHeader::pickDate() {
static QPopupMenu *m1 = 0;
static DateBookMonth *picker = 0;
if ( !m1 ) {
m1 = new QPopupMenu( this );
picker = new DateBookMonth( m1, 0, TRUE );
m1->insertItem( picker );
- connect( picker, SIGNAL( dateClicked( int, int, int ) ),this, SLOT( setDate( int, int, int ) ) );
+ connect( picker, SIGNAL( dateClicked(int,int,int) ),this, SLOT( setDate(int,int,int) ) );
//connect( m1, SIGNAL( aboutToHide() ),
//this, SLOT( gotHide() ) );
}
picker->setDate( date.year(), date.month(), date.day() );
m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height())));
picker->setFocus();
}
void DateBookWeekLstHeader::setDate(int y, int m, int d) {
setDate(QDate(y,m,d));
}
void DateBookWeekLstHeader::nextWeek() {
setDate(date.addDays(7));
}
void DateBookWeekLstHeader::prevWeek() {
setDate(date.addDays(-7));
}
void DateBookWeekLstHeader::nextMonth()
{
setDate(date.addDays(28));
}
void DateBookWeekLstHeader::prevMonth()
{
setDate(date.addDays(-28));
@@ -214,108 +214,108 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
QVBoxLayout *layout = new QVBoxLayout( this );
qBubbleSort(ev);
QValueListIterator<EffectiveEvent> it;
it=ev.begin();
int dayOrder[7];
if (bStartOnMonday) {
for (int d=0; d<7; d++) dayOrder[d]=d+1;
} else {
for (int d=0; d<7; d++) dayOrder[d]=d;
dayOrder[0]=7;
}
// Calculate offset to first day of week.
int dayoffset=d.dayOfWeek();
if(bStartOnMonday) dayoffset--;
else if( dayoffset == 7 ) dayoffset = 0;
for (int i=0; i<7; i++) {
// Header
DateBookWeekLstDayHdr *hdr=new DateBookWeekLstDayHdr(d.addDays(i-dayoffset), bStartOnMonday,this);
connect(hdr, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
- connect(hdr, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)),
- this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)));
+ connect(hdr, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
+ this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
layout->addWidget(hdr);
// Events
while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) {
if(!(((*it).end().hour()==0) && ((*it).end().minute()==0) && ((*it).startDate()!=(*it).date()))) { // Skip events ending at 00:00 starting at another day.
DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,weeklistviewconfig,this);
layout->addWidget(l);
- connect (l, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &)));
+ connect (l, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
}
it++;
}
layout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding));
}
}
DateBookWeekLstView::~DateBookWeekLstView(){}
void DateBookWeekLstView::keyPressEvent(QKeyEvent *e) {e->ignore();}
DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
QValueList<EffectiveEvent> &ev2,
QDate &d, bool onM,
QWidget* parent,
const char* name, WFlags fl)
: QWidget( parent, name, fl )
{
QHBoxLayout *layout = new QHBoxLayout( this );
DateBookWeekLstView *w=new DateBookWeekLstView(ev1,d,onM,this);
layout->addWidget(w);
- connect (w, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &)));
+ connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
- connect (w, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &,const QString &)),
- this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)));
+ connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
+ this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
w=new DateBookWeekLstView(ev2,d.addDays(7),onM,this);
layout->addWidget(w);
- connect (w, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &)));
+ connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
- connect (w, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)),
- this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)));
+ connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
+ this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
}
DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDB *newDB,
QWidget *parent,
const char *name )
: QWidget( parent, name ),
db( newDB ),
startTime( 0 ),
ampm( ap ),
bStartOnMonday(onM)
{
setFocusPolicy(StrongFocus);
layout = new QVBoxLayout( this );
layout->setMargin(0);
header=new DateBookWeekLstHeader(onM, this);
layout->addWidget( header );
- connect(header, SIGNAL(dateChanged(QDate &)), this, SLOT(dateChanged(QDate &)));
+ connect(header, SIGNAL(dateChanged(QDate&)), this, SLOT(dateChanged(QDate&)));
connect(header, SIGNAL(setDbl(bool)), this, SLOT(setDbl(bool)));
scroll=new QScrollView(this);
scroll->setResizePolicy(QScrollView::AutoOneFit);
layout->addWidget(scroll);
view=NULL;
Config config("DateBook");
config.setGroup("Main");
dbl=config.readBoolEntry("weeklst_dbl", false);
header->dbl->setOn(dbl);
}
DateBookWeekLst::~DateBookWeekLst(){
Config config("DateBook");
config.setGroup("Main");
config.writeEntry("weeklst_dbl", dbl);
}
void DateBookWeekLst::setDate(const QDate &d) {
bdate=d;
header->setDate(d);
}
void DateBookWeekLst::setDbl(bool on) {
@@ -337,52 +337,52 @@ QDate DateBookWeekLst::weekDate() const
// Calculate offset to first day of week.
int dayoffset=d.dayOfWeek();
if(bStartOnMonday) dayoffset--;
else if( dayoffset == 7 )
dayoffset = 0;
return d.addDays(-dayoffset);
}
void DateBookWeekLst::getEvents() {
QDate start = weekDate(); //date();
QDate stop = start.addDays(6);
QValueList<EffectiveEvent> el = db->getEffectiveEvents(start, stop);
if (view) delete view;
if (dbl) {
QDate start2=start.addDays(7);
stop=start2.addDays(6);
QValueList<EffectiveEvent> el2 = db->getEffectiveEvents(start2, stop);
view=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,scroll);
} else {
view=new DateBookWeekLstView(el,start,bStartOnMonday,scroll);
}
- connect (view, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &)));
+ connect (view, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
connect (view, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
- connect (view, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)),
- this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)));
+ connect (view, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
+ this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
scroll->addChild(view);
view->show();
scroll->updateScrollBars();
}
void DateBookWeekLst::dateChanged(QDate &newdate) {
bdate=newdate;
getEvents();
}
void DateBookWeekLst::keyPressEvent(QKeyEvent *e)
{
switch(e->key()) {
case Key_Up:
scroll->scrollBy(0, -20);
break;
case Key_Down:
scroll->scrollBy(0, 20);
break;
case Key_Left:
header->prevWeek();
break;
case Key_Right:
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index 018bb5a..57bcd89 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -169,71 +169,71 @@ void DateEntry::updateTimeEdit(bool s, bool e) {
} else {
if ( ehour == 0 )
ehour = 12;
strEnd.sprintf( "%d:%02d AM", ehour, endTime.minute() );
}
} else {
strStart.sprintf( "%02d:%02d", startTime.hour(), startTime.minute() );
strEnd.sprintf( "%02d:%02d", endTime.hour(), endTime.minute() );
}
if (s) comboStart->setText(strStart);
if (e) comboEnd->setText(strEnd);
}
void DateEntry::init()
{
comboDescription->setInsertionPolicy(QComboBox::AtCurrent);
comboLocation->setInsertionPolicy(QComboBox::AtCurrent);
initCombos();
QPopupMenu *m1 = new QPopupMenu( this );
startPicker = new DateBookMonth( m1, 0, TRUE );
m1->insertItem( startPicker );
buttonStart->setPopup( m1 );
- connect( startPicker, SIGNAL( dateClicked( int, int, int ) ),
- this, SLOT( startDateChanged( int, int, int ) ) );
+ connect( startPicker, SIGNAL( dateClicked(int,int,int) ),
+ this, SLOT( startDateChanged(int,int,int) ) );
//Let start button change both start and end dates
- connect( startPicker, SIGNAL( dateClicked( int, int, int ) ),
- this, SLOT( endDateChanged( int, int, int ) ) );
- connect( qApp, SIGNAL( clockChanged( bool ) ),
- this, SLOT( slotChangeClock( bool ) ) );
+ connect( startPicker, SIGNAL( dateClicked(int,int,int) ),
+ this, SLOT( endDateChanged(int,int,int) ) );
+ connect( qApp, SIGNAL( clockChanged(bool) ),
+ this, SLOT( slotChangeClock(bool) ) );
connect( qApp, SIGNAL(weekChanged(bool)),
this, SLOT(slotChangeStartOfWeek(bool)) );
connect( editNote, SIGNAL(clicked()),
this, SLOT(slotEditNote()) );
QPopupMenu *m2 = new QPopupMenu( this );
endPicker = new DateBookMonth( m2, 0, TRUE );
m2->insertItem( endPicker );
buttonEnd->setPopup( m2 );
- connect( endPicker, SIGNAL( dateClicked( int, int, int ) ),
- this, SLOT( endDateChanged( int, int, int ) ) );
+ connect( endPicker, SIGNAL( dateClicked(int,int,int) ),
+ this, SLOT( endDateChanged(int,int,int) ) );
- connect(timePickerStart, SIGNAL( timeChanged(const QTime &) ),
- this, SLOT( startTimePicked(const QTime &) ));
+ connect(timePickerStart, SIGNAL( timeChanged(const QTime&) ),
+ this, SLOT( startTimePicked(const QTime&) ));
// install eventFilters
comboEnd->installEventFilter( this );
comboStart->installEventFilter( this );
}
/*
* Destroys the object and frees any allocated resources
*/
DateEntry::~DateEntry()
{
// no need to delete child widgets, Qt does it all for us
//cout << "Del: " << comboStart->currentText() << endl;
}
/*
* public slot
*/
void DateEntry::slotEditNote() {
QString s;
s = "<B>"+ TimeString::longDateString( startDate ) + "</B>";
// s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month());
NoteEntry noteDlg(s+comboDescription->currentText(), noteStr,
this,0,TRUE);
diff --git a/core/pim/datebook/repeatentry.cpp b/core/pim/datebook/repeatentry.cpp
index 7cf36da..04c3cf3 100644
--- a/core/pim/datebook/repeatentry.cpp
+++ b/core/pim/datebook/repeatentry.cpp
@@ -338,50 +338,50 @@ void RepeatEntry::setupMonthly()
void RepeatEntry::setupYearly()
{
hideExtras();
lblWeekVar->hide();
spinFreq->setValue( 1 );
lblFreq->setText( tr("year(s)") );
lblFreq->show();
lblFreq->show();
showRepeatStuff();
lblVar2->show();
QString strEvery = strYearTemplate.arg( start.monthName(start.month()) ).arg( numberPlacing(start.day()) );
lblRepeat->setText( strEvery );
setupRepeatLabel( 1 );
}
void RepeatEntry::init()
{
QPopupMenu *m1 = new QPopupMenu( this );
repeatPicker = new DateBookMonth( m1, 0, TRUE );
m1->insertItem( repeatPicker );
cmdEnd->setPopup( m1 );
cmdEnd->setPopupDelay( 0 );
- QObject::connect( repeatPicker, SIGNAL(dateClicked(int, int, int)),
- this, SLOT(endDateChanged(int, int, int)) );
+ QObject::connect( repeatPicker, SIGNAL(dateClicked(int,int,int)),
+ this, SLOT(endDateChanged(int,int,int)) );
QObject::connect( qApp, SIGNAL(weekChanged(bool)),
this, SLOT(slotChangeStartOfWeek(bool)) );
listRTypeButtons.setAutoDelete( TRUE );
listRTypeButtons.append( cmdNone );
listRTypeButtons.append( cmdDay );
listRTypeButtons.append( cmdWeek );
listRTypeButtons.append( cmdMonth );
listRTypeButtons.append( cmdYear );
listExtra.setAutoDelete( TRUE );
listExtra.append( cmdExtra1 );
listExtra.append( cmdExtra2 );
listExtra.append( cmdExtra3 );
listExtra.append( cmdExtra4 );
listExtra.append( cmdExtra5 );
listExtra.append( cmdExtra6 );
listExtra.append( cmdExtra7 );
}
void RepeatEntry::slotNoEnd( bool unused )
{
// if the item was toggled, then go ahead and set it to the maximum date
if ( unused ) {
diff --git a/core/pim/datebook2/mainwindow.cpp b/core/pim/datebook2/mainwindow.cpp
index 7ff2204..3937796 100644
--- a/core/pim/datebook2/mainwindow.cpp
+++ b/core/pim/datebook2/mainwindow.cpp
@@ -13,54 +13,54 @@
#include <qpe/qpemessagebox.h>
#include <qpe/resource.h>
#include "editor.h"
#include "show.h"
#include "templatemanager.h"
#include "bookmanager.h"
#include "mainwindow.h"
using namespace Datebook;
MainWindow::MainWindow()
: OPimMainWindow( "Datebook", 0, 0 ), m_descMan( "Descriptions" ), m_locMan( "Locations" )
{
setIcon( Resource::loadPixmap( "datebook_icon" ) );
initUI();
initManagers();
initView();
initConfig();
QTimer::singleShot(0, this, SLOT(populate() ) );
QCopChannel* chan = new QCopChannel( "QPE/System", this );
- connect( chan, SIGNAL( received(const QCString&, const QByteArray& ) ),
- this, SLOT( slotReceive( const QCString&, const QByteArray& ) ) );
+ connect( chan, SIGNAL( received(const QCString&,const QByteArray&) ),
+ this, SLOT( slotReceive(const QCString&,const QByteArray&) ) );
chan = new QCopChannel( "QPE/Datebook", this );
- connect( chan, SIGNAL( received(const QCString&, const QByteArray& ) ),
- this, SLOT( slotReceive( const QCString&, const QByteArray& ) ) );
+ connect( chan, SIGNAL( received(const QCString&,const QByteArray&) ),
+ this, SLOT( slotReceive(const QCString&,const QByteArray&) ) );
}
MainWindow::~MainWindow() {
m_tempMan.save();
m_locMan.save();
m_descMan.save();
manager()->save();
delete m_manager;
}
void MainWindow::doSetDocument( const QString& str ) {
}
void MainWindow::flush() {
manager()->save();
}
void MainWindow::reload() {
manager()->reload();
}
int MainWindow::create() {
return 0;
}
bool MainWindow::remove( int uid ) {
manager()->remove( uid );
return true;
@@ -129,50 +129,50 @@ void MainWindow::initUI() {
a->addTo( m_toolBar );
connect(a, SIGNAL( activated() ), this, SLOT( slotFind() ) );
a = new QAction( tr("Configure"), QString::null, 0, 0 );
a->addTo( m_popSetting );
connect(a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) );
a = new QAction( tr("Configure Locations"), QString::null, 0, 0 );
a->addTo( m_popSetting );
connect(a, SIGNAL( activated() ), this, SLOT( slotConfigureLocs() ) );
a = new QAction( tr("Configure Descriptions"), QString::null, 0, 0 );
a->addTo( m_popSetting );
connect(a, SIGNAL( activated() ), this, SLOT(slotConfigureDesc() ) );
a = new QAction( tr("Configure Templates"), QString::null, 0, 0 );
a->addTo( m_popSetting );
connect(a, SIGNAL( activated() ), this, SLOT(slotConfigureTemp() ) );
connect( qApp, SIGNAL(clockChanged(bool) ),
this, SLOT(slotClockChanged(bool) ) );
connect( qApp, SIGNAL(weekChanged(bool) ),
this, SLOT(slotWeekChanged(bool) ) );
- connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray& ) ),
- this, SLOT(slotAppMessage( const QCString&, const QByteArray& ) ) );
+ connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&) ),
+ this, SLOT(slotAppMessage(const QCString&,const QByteArray&) ) );
}
void MainWindow::initConfig() {
}
void MainWindow::initView() {
}
void MainWindow::initManagers() {
m_manager = new BookManager;
m_tempMan.load();
m_locMan.load();
m_descMan.load();
setTemplateMenu();
}
void MainWindow::raiseCurrentView() {
}
/*
* populate the view
*/
void MainWindow::populate() {
if (!manager()->isLoaded() )
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index bfe95b0..8b6a5df 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -180,49 +180,49 @@ void MainWindow::makeMenu()
//SEARCH BAR
LabelEnterText = new QLabel( searchBar, "Label" );
LabelEnterText->setAutoMask( FALSE );
LabelEnterText->setText( tr( "Search for: " ) );
addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" );
QWhatsThis::add( searchEdit, tr("Enter your search terms here") );
searchEdit->setFocus();
searchBar->setHorizontalStretchable( TRUE );
searchBar->setStretchableWidget( searchEdit );
//Search button
SearchAllAction->addTo( searchBar );
//image ripped of off opie-login/loginwindow.cpp
QPixmap image1( ( const char** ) image1_data );
//Clear text
ClearSearchText = new QToolButton( searchBar, "ClearSearchText");
ClearSearchText->setText( tr( "" ) );
ClearSearchText->setPixmap( image1 );
- connect( searchEdit, SIGNAL( textChanged( const QString & ) ),this, SLOT( setSearch( const QString & ) ) );
+ connect( searchEdit, SIGNAL( textChanged(const QString&) ),this, SLOT( setSearch(const QString&) ) );
connect( ClearSearchText, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) );
}
MainWindow::~MainWindow()
{
Config cfg( "osearch", Config::User );
cfg.setGroup( "search_settings" );
cfg.writeEntry( "caseSensitiv", actionCaseSensitiv->isOn() );
cfg.writeEntry( "wildcards", actionWildcards->isOn() );
//cfg.writeEntry( "whole_words_only", actionWholeWordsOnly->isOn() );
}
void MainWindow::setCurrent(QListViewItem *item)
{
if (!item) return;
_currentItem = (OListViewItem*)item;
// _currentItem = dynamic_cast<OListViewItem*>(item);
if (_currentItem->rtti() == OListViewItem::Result){
ResultItem *res = (ResultItem*)item;
// ResultItem *res = dynamic_cast<ResultItem*>(item);
richEdit->setText( res->toRichText() );
QIntDict<QString> acts = res->actions();
QButton *button;
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
index c8652f3..b0d456d 100644
--- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
@@ -16,50 +16,50 @@
* *
***************************************************************************/
#include "addresspluginwidget.h"
#include <qpe/config.h>
#include <opie/ocontact.h>
AddressBookPluginWidget::AddressBookPluginWidget( QWidget *parent, const char* name )
: QWidget( parent, name ) {
addressLabel = 0l;
m_contactdb = 0l;
layoutTodo = 0l;
// Hä ? Nonsense ! (se)
if ( m_contactdb ) {
delete m_contactdb;
}
m_contactdb = new OContactAccess("addressplugin");
- connect( m_contactdb, SIGNAL( signalChanged( const OContactAccess * ) ),
- this, SLOT( refresh( const OContactAccess * ) ) );
+ connect( m_contactdb, SIGNAL( signalChanged(const OContactAccess*) ),
+ this, SLOT( refresh(const OContactAccess*) ) );
readConfig();
getAddress();
}
AddressBookPluginWidget::~AddressBookPluginWidget() {
delete m_contactdb;
}
void AddressBookPluginWidget::refresh( const OContactAccess* )
{
qWarning(" AddressBookPluginWidget::Database was changed externally ! ");
m_contactdb->reload();
getAddress();
}
void AddressBookPluginWidget::reinitialize() {
readConfig();
getAddress();
}
void AddressBookPluginWidget::readConfig() {
Config cfg( "todayaddressplugin" );
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index b6707df..0820802 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -78,63 +78,63 @@ void DatebookPluginWidget::refresh() {
*/
void DatebookPluginWidget::getDates() {
if ( db ) {
delete db;
}
db = new DateBookDB;
QDate date = QDate::currentDate();
QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) );
qBubbleSort( list );
int count = 0;
if ( list.count() > 0 ) {
for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) {
if ( count < m_max_lines_meet ) {
if ( !m_onlyLater ) {
count++;
DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
m_eventsList.append( l );
l->show();
- QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
+ QObject::connect ( l, SIGNAL( editEvent(const Event&) ), l, SLOT( editEventSlot(const Event&) ) );
} else {
if ( ( QDateTime::currentDateTime() <= (*it).event().end() )
// Show events which span over many days and are not elapsed.
|| ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) )
// Show repeated event for today that is not elapsed.
|| ( ( (*it).event().repeatType() != Event::NoRepeat )
&& ( ( date.dayOfWeek() == (*it).date().dayOfWeek() )
&& ( QTime::currentTime() < (*it).event().start().time() ) ) )
// Show repeated event for next days.
|| ( ( (*it).event().repeatType() != Event::NoRepeat )
&& ( date.dayOfWeek() != (*it).date().dayOfWeek() ) )
)
{
count++;
// show only later appointments
DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
m_eventsList.append( l );
l->show();
- QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
+ QObject::connect ( l, SIGNAL( editEvent(const Event&) ), l, SLOT( editEventSlot(const Event&) ) );
}
}
}
}
if ( m_onlyLater && count == 0 ) {
QLabel* noMoreEvents = new QLabel( this );
m_eventsList.append( noMoreEvents );
noMoreEvents->show();
noMoreEvents->setText( QObject::tr( "No more appointments today" ) );
}
} else {
QLabel* noEvents = new QLabel( this );
m_eventsList.append( noEvents );
noEvents->show();
noEvents->setText( QObject::tr( "No appointments today" ) );
}
}
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.cpp b/core/pim/today/plugins/mail/mailpluginwidget.cpp
index 4194270..a8e4c41 100644
--- a/core/pim/today/plugins/mail/mailpluginwidget.cpp
+++ b/core/pim/today/plugins/mail/mailpluginwidget.cpp
@@ -19,50 +19,50 @@
#include <qpe/qcopenvelope_qws.h>
MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name)
: QWidget(parent, name ) {
m_mailLabel = 0l;
m_layout = 0l;
if ( m_mailLabel ) {
delete m_mailLabel;
}
m_mailLabel = new OClickableLabel( this );
connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) );
if ( m_layout ) {
delete m_layout;
}
m_layout = new QHBoxLayout( this );
m_layout->setAutoAdd( true );
#if defined(Q_WS_QWS)
#if !defined(QT_NO_COP)
QCopChannel *qCopChannel = new QCopChannel( "QPE/Pim" , this );
- connect ( qCopChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
- this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) );
+ connect ( qCopChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
+ this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) );
#endif
#endif
readConfig();
getInfo();
}
void MailPluginWidget::channelReceived( const QCString &msg, const QByteArray & data ) {
QDataStream stream( data, IO_ReadOnly );
if ( msg == "outgoingMails(int)" ) {
stream >> m_outgoing;
} else if ( msg == "newMails(int)" ) {
stream >> m_newMails;
}
getInfo();
}
MailPluginWidget::~MailPluginWidget() {
delete m_mailLabel;
delete m_layout;
}
void MailPluginWidget::readConfig() {
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 72cdfd6..812f8b5 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -32,50 +32,50 @@ struct TodayPlugin {
TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {}
QLibrary *library;
QInterfacePtr<TodayPluginInterface> iface;
TodayPluginObject *guiPart;
QWidget *guiBox;
QString name;
bool active;
bool excludeRefresh;
int pos;
};
static QValueList<TodayPlugin> pluginList;
static QMap<QString, TodayPlugin> tempList;
Today::Today( QWidget* parent, const char* name, WFlags fl )
: TodayBase( parent, name, fl ) {
QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) );
QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) );
#if defined(Q_WS_QWS)
#if !defined(QT_NO_COP)
QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this );
- connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
- this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) );
+ connect ( todayChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
+ this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) );
#endif
#endif
setOwnerField();
m_refreshTimer = new QTimer( this );
connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
m_refreshTimer->start( 15000 );
m_big_box = 0L;
layout = new QVBoxLayout( this );
layout->addWidget( Frame );
layout->addWidget( OwnerField );
m_sv = new QScrollView( this );
m_sv->setResizePolicy( QScrollView::AutoOneFit );
m_sv->setHScrollBarMode( QScrollView::AlwaysOff );
m_sv->setFrameShape( QFrame::NoFrame );
layout->addWidget( m_sv );
layout->setStretchFactor( m_sv,4 );
qApp->processEvents();
loadPlugins();
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index 5c51515..a6f53e1 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -64,49 +64,49 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
tab2Layout->addWidget( l );
QHBox *hbox1 = new QHBox( tab_2 );
m_appletListView = new QListView( hbox1 );
m_appletListView->addColumn( "PluginList" );
m_appletListView->header()->hide();
m_appletListView->setSorting( -1 );
QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the appearance order" ) );
QVBox *vbox1 = new QVBox( hbox1 );
new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) );
new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) );
tab2Layout->addWidget( hbox1 );
TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) );
// Misc tab
tab_3 = new QWidget( TabWidget3, "tab_3" );
QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 );
m_guiMisc = new TodayConfigMiscBase( tab_3 );
tab3Layout->addWidget( m_guiMisc );
TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) );
m_applets_changed = false;
- connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) );
+ connect ( m_appletListView , SIGNAL( clicked(QListViewItem*) ), this, SLOT( appletChanged() ) );
readConfig();
QPEApplication::showDialog( this );
}
/**
* Autostart, uses the new (opie only) autostart method in the launcher code.
* If registered against that today ist started on each resume.
*/
void TodayConfig::setAutoStart() {
Config cfg( "today" );
cfg.setGroup( "Autostart" );
if ( m_autoStart ) {
QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" );
e << QString( "add" );
e << QString( "today" );
e << QString( "%1" ).arg( m_autoStartTimer );
} else {
QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" );
e << QString( "remove" );
e << QString( "today" );
}
}
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index b68aad2..a244e58 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -168,49 +168,49 @@ void MainWindow::initActions() {
connect(a, SIGNAL( activated() ), this, SLOT( slotFind() ) );
a->addTo( m_options );
m_findAction = a;
m_options->insertSeparator();
#endif
m_completedAction = new QAction( QString::null, QWidget::tr("Show completed tasks"),
0, this, 0, TRUE );
m_completedAction->addTo( m_options );
m_completedAction->setOn( showCompleted() );
connect(m_completedAction, SIGNAL( toggled(bool) ), this, SLOT(slotShowCompleted(bool) ) );
a = new QAction( QString::null, QWidget::tr("Show only over-due tasks"),
0, this, 0, TRUE );
a->addTo( m_options );
a->setOn( showOverDue() );
connect(a, SIGNAL(toggled(bool)), this, SLOT(slotShowDue(bool) ) );
m_showDeadLineAction = new QAction( QString::null, QWidget::tr("Show task deadlines"),
0, this, 0, TRUE );
m_showDeadLineAction->addTo( m_options );
m_showDeadLineAction->setOn( showDeadline() );
- connect(m_showDeadLineAction, SIGNAL(toggled(bool) ), this, SLOT( slotShowDeadLine( bool ) ) );
+ connect(m_showDeadLineAction, SIGNAL(toggled(bool) ), this, SLOT( slotShowDeadLine(bool) ) );
m_showQuickTaskAction = new QAction( QString::null, QWidget::tr("Show quick task bar"),
0, this, 0, TRUE );
m_showQuickTaskAction->addTo( m_options );
m_showQuickTaskAction->setOn( showQuickTask() );
connect(m_showQuickTaskAction, SIGNAL( toggled(bool) ), this, SLOT(slotShowQuickTask(bool) ) );
m_options->insertSeparator();
m_bar->insertItem( QWidget::tr("Data") ,m_edit );
m_bar->insertItem( QWidget::tr("Category"), m_catMenu );
m_bar->insertItem( QWidget::tr("Options"), m_options );
m_curQuick = new QuickEditImpl( this, m_quicktask );
addToolBar( (QToolBar *)m_curQuick->widget(), QWidget::tr( "QuickEdit" ), QMainWindow::Top, TRUE );
m_curQuick->signal()->connect( this, SLOT(slotQuickEntered() ) );
}
/* m_curCat from Config */
void MainWindow::initConfig() {
Config config( "todo" );
config.setGroup( "View" );
m_completed = config.readBoolEntry( "ShowComplete", TRUE );
m_curCat = config.readEntry( "Category", QString::null );
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp
index ab1ce94..d1e50f7 100644
--- a/core/pim/todo/otaskeditor.cpp
+++ b/core/pim/todo/otaskeditor.cpp
@@ -62,29 +62,29 @@ void OTaskEditor::init() {
m_stat = new TaskEditorStatus( m_tab );
m_tab->addTab( m_stat, "todo/TodoList", tr("Status") );
m_alarm = new TaskEditorAlarms( m_tab );
m_tab->addTab( m_alarm, "todo/alarm", tr("Alarms") );
// m_remind = new TaskEditorAlarms( m_tab );
// m_tab->addTab( m_remind, "todo/reminder", tr("Reminders") );
// QLabel* lbl = new QLabel( m_tab );
// lbl->setText( tr("X-Ref") );
// m_tab->addTab( lbl, "todo/xref", tr("X-Ref") );
m_rec = new OPimRecurrenceWidget( true, QDate::currentDate(), this );
m_tab->addTab( m_rec, "repeat", tr("Recurrence") );
/* signal and slots */
connect(m_overView, SIGNAL(recurranceEnabled(bool) ),
m_rec, SLOT(setEnabled(bool) ) );
/* connect due date changed to the recurrence tab */
connect(m_stat, SIGNAL(dueDateChanged(const QDate&) ),
- m_rec, SLOT(setStartDate(const QDate& ) ) );
+ m_rec, SLOT(setStartDate(const QDate&) ) );
m_tab->setCurrentTab( m_overView );
}
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp
index 5bbf880..0d298f4 100644
--- a/core/pim/todo/tableview.cpp
+++ b/core/pim/todo/tableview.cpp
@@ -95,56 +95,56 @@ TableView::TableView( MainWindow* window, QWidget* wid )
namestr = "todo/priority";
namestr.append( QString::number( i ) );
m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr );
}
setUpdatesEnabled( false );
viewport()->setUpdatesEnabled( false );
m_enablePaint = false;
setNumRows(0);
setNumCols(4);
horizontalHeader()->setLabel( 0, QWidget::tr("C.") );
horizontalHeader()->setLabel( 1, QWidget::tr("Priority") );
horizontalHeader()->setLabel( 2, QWidget::tr("Summary" ) );
horizontalHeader()->setLabel( 3, QWidget::tr("Deadline") );
setShowDeadline( todoWindow()->showDeadline() );
setSorting( TRUE );
setSelectionMode( NoSelection );
setLeftMargin( 0 );
verticalHeader()->hide();
- connect((QTable*)this, SIGNAL( clicked( int, int, int, const QPoint& ) ),
- this, SLOT( slotClicked(int, int, int, const QPoint& ) ) );
- connect((QTable*)this, SIGNAL( pressed( int, int, int, const QPoint& ) ),
- this, SLOT( slotPressed(int, int, int, const QPoint& ) ) );
- connect((QTable*)this, SIGNAL(valueChanged(int, int) ),
- this, SLOT( slotValueChanged(int, int) ) );
- connect((QTable*)this, SIGNAL(currentChanged(int, int) ),
- this, SLOT( slotCurrentChanged(int, int) ) );
+ connect((QTable*)this, SIGNAL( clicked(int,int,int,const QPoint&) ),
+ this, SLOT( slotClicked(int,int,int,const QPoint&) ) );
+ connect((QTable*)this, SIGNAL( pressed(int,int,int,const QPoint&) ),
+ this, SLOT( slotPressed(int,int,int,const QPoint&) ) );
+ connect((QTable*)this, SIGNAL(valueChanged(int,int) ),
+ this, SLOT( slotValueChanged(int,int) ) );
+ connect((QTable*)this, SIGNAL(currentChanged(int,int) ),
+ this, SLOT( slotCurrentChanged(int,int) ) );
m_menuTimer = new QTimer( this );
connect( m_menuTimer, SIGNAL(timeout()),
this, SLOT(slotShowMenu()) );
/* now let's init the config */
initConfig();
m_enablePaint = true;
setUpdatesEnabled( true );
viewport()->setUpdatesEnabled( true );
viewport()->update();
setSortOrder( 0 );
setAscending( TRUE );
m_first = true;
}
/* a new day has started
* update the day
*/
void TableView::newDay() {
clear();
diff --git a/core/pim/todo/taskeditoralarms.cpp b/core/pim/todo/taskeditoralarms.cpp
index 930c94e..a512fb0 100644
--- a/core/pim/todo/taskeditoralarms.cpp
+++ b/core/pim/todo/taskeditoralarms.cpp
@@ -58,50 +58,50 @@ void AlarmItem::setAlarm( const OPimAlarm& dt ) {
m_type = dt.sound();
setText( 0, TimeString::dateString( m_dt.date() ) );
setText( 1, TimeString::timeString( m_dt.time() ) );
setText( 2, m_type == 0 ? QObject::tr("silent") : QObject::tr("loud") );
}
AlarmItem::~AlarmItem() {
}
OPimAlarm AlarmItem::alarm()const{
OPimAlarm al( m_type, m_dt );
return al;
}
TaskEditorAlarms::TaskEditorAlarms( QWidget* parent, int, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
m_date = m_type = m_time = 0;
QGridLayout *layout = new QGridLayout( this, 2, 2, 4, 4 );
lstAlarms = new QListView( this );
lstAlarms->addColumn( tr("Date") );
lstAlarms->addColumn( tr("Time") );
lstAlarms->addColumn( tr("Type") );
- connect( lstAlarms, SIGNAL(clicked ( QListViewItem *, const QPoint &, int ) ),
- this, SLOT(inlineEdit(QListViewItem*, const QPoint&, int ) ) );
+ connect( lstAlarms, SIGNAL(clicked(QListViewItem*,const QPoint&,int) ),
+ this, SLOT(inlineEdit(QListViewItem*,const QPoint&,int) ) );
layout->addMultiCellWidget( lstAlarms, 0, 0, 0, 2 );
QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), this );
//QWhatsThis::add( btn, tr( "Click here to add a new transaction." ) );
connect( btn, SIGNAL( clicked() ), this, SLOT( slotNew() ) );
layout->addWidget( btn, 1, 0 );
/* use when we've reminders too */
#if 0
btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Edit" ), this );
//QWhatsThis::add( btn, tr( "Select a transaction and then click here to edit it." ) );
connect( btn, SIGNAL( clicked() ), this, SLOT( slotEdit() ) );
layout->addWidget( btn, 1, 1 );
#endif
btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), this );
//QWhatsThis::add( btn, tr( "Select a checkbook and then click here to delete it." ) );
connect( btn, SIGNAL( clicked() ), this, SLOT( slotDelete() ) );
layout->addWidget( btn, 1, 2 );
}
TaskEditorAlarms::~TaskEditorAlarms(){
}
diff --git a/core/pim/todo/taskeditorstatus.cpp b/core/pim/todo/taskeditorstatus.cpp
index 367dd58..16351e0 100644
--- a/core/pim/todo/taskeditorstatus.cpp
+++ b/core/pim/todo/taskeditorstatus.cpp
@@ -79,82 +79,82 @@ TaskEditorStatus::TaskEditorStatus( QWidget* parent, const char* name, WFlags f
QWhatsThis::add( label, tr( "Select progress made on this task here." ) );
cmbProgress = new QComboBox( FALSE, container );
cmbProgress->insertItem( tr( "0 %" ) );
cmbProgress->insertItem( tr( "20 %" ) );
cmbProgress->insertItem( tr( "40 %" ) );
cmbProgress->insertItem( tr( "60 %" ) );
cmbProgress->insertItem( tr( "80 %" ) );
cmbProgress->insertItem( tr( "100 %" ) );
layout->addMultiCellWidget( cmbProgress, 1, 1, 1, 2 );
QWhatsThis::add( cmbProgress, tr( "Select progress made on this task here." ) );
// Start date
ckbStart = new QCheckBox( tr( "Start Date:" ), container );
layout->addWidget( ckbStart, 2, 0 );
QWhatsThis::add( ckbStart, tr( "Click here to set the date this task was started." ) );
connect( ckbStart, SIGNAL( clicked() ), this, SLOT( slotStartChecked() ) );
btnStart = new QPushButton( curDateStr, container );
btnStart->setEnabled( FALSE );
layout->addMultiCellWidget( btnStart, 2, 2, 1, 2 );
QWhatsThis::add( btnStart, tr( "Click here to set the date this task was started." ) );
QPopupMenu *popup = new QPopupMenu( this );
m_startBook = new DateBookMonth( popup, 0, TRUE );
popup->insertItem( m_startBook );
btnStart->setPopup( popup );
- connect( m_startBook, SIGNAL( dateClicked( int, int, int ) ),
- this, SLOT( slotStartChanged( int, int, int ) ) );
+ connect( m_startBook, SIGNAL( dateClicked(int,int,int) ),
+ this, SLOT( slotStartChanged(int,int,int) ) );
// Due date
ckbDue = new QCheckBox( tr( "Due Date:" ), container );
layout->addWidget( ckbDue, 3, 0 );
QWhatsThis::add( ckbDue, tr( "Click here to set the date this task needs to be completed by." ) );
connect( ckbDue, SIGNAL( clicked() ), this, SLOT( slotDueChecked() ) );
btnDue = new QPushButton( curDateStr, container );
btnDue->setEnabled( FALSE );
layout->addMultiCellWidget( btnDue, 3, 3, 1, 2 );
QWhatsThis::add( btnDue, tr( "Click here to set the date this task needs to be completed by." ) );
popup = new QPopupMenu( this );
m_dueBook = new DateBookMonth( popup, 0, TRUE );
popup->insertItem( m_dueBook );
btnDue->setPopup( popup );
- connect( m_dueBook, SIGNAL( dateClicked( int, int, int ) ),
- this, SLOT( slotDueChanged( int, int, int ) ) );
+ connect( m_dueBook, SIGNAL( dateClicked(int,int,int) ),
+ this, SLOT( slotDueChanged(int,int,int) ) );
// Completed
ckbComp = new QCheckBox( tr( "Completed:" ), container );
layout->addWidget( ckbComp, 4, 0 );
QWhatsThis::add( ckbComp, tr( "Click here to mark this task as completed." ) );
connect( ckbComp, SIGNAL( clicked() ), this, SLOT( slotCompChecked() ) );
btnComp = new QPushButton( curDateStr, container );
btnComp->setEnabled( FALSE );
layout->addMultiCellWidget( btnComp, 4, 4, 1, 2 );
QWhatsThis::add( btnComp, tr( "Click here to set the date this task was completed." ) );
popup = new QPopupMenu( this );
m_compBook = new DateBookMonth( popup, 0, TRUE );
popup->insertItem( m_compBook );
btnComp->setPopup( popup );
- connect( m_compBook, SIGNAL( dateClicked( int, int, int ) ),
- this, SLOT( slotCompChanged( int, int, int ) ) );
+ connect( m_compBook, SIGNAL( dateClicked(int,int,int) ),
+ this, SLOT( slotCompChanged(int,int,int) ) );
QSpacerItem *spacer = new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding );
layout->addItem( spacer, 5, 0 );
// Maintainer mode
#if 0
label = new QLabel( tr( "Maintainer Mode:" ), container );
layout->addWidget( label, 6, 0 );
QWhatsThis::add( label, tr( "Click here to set the maintainer's role." ) );
cmbMaintMode = new QComboBox( FALSE, container );
cmbMaintMode->insertItem( tr( "Nothing" ) );
cmbMaintMode->insertItem( tr( "Responsible" ) );
cmbMaintMode->insertItem( tr( "Done By" ) );
cmbMaintMode->insertItem( tr( "Coordinating" ) );
// layout->addMultiCellWidget( cmbMaintMode, 6, 6, 1, 2 );
QWhatsThis::add( cmbMaintMode, tr( "Click here to set the maintainer's role." ) );
// Maintainer
label = new QLabel( tr( "Maintainer:" ), container );
layout->addWidget( label, 7, 0 );
QWhatsThis::add( label, tr( "This is the name of the current task maintainer." ) );
txtMaintainer = new QLabel( tr( "test" ), container );
txtMaintainer->setTextFormat( QLabel::RichText );
layout->addWidget( txtMaintainer, 7, 1 );