summaryrefslogtreecommitdiff
path: root/libopie2/opieui
Side-by-side diff
Diffstat (limited to 'libopie2/opieui') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/fileselector/ofiledialog.cpp4
-rw-r--r--libopie2/opieui/fileselector/ofileselector.cpp14
-rw-r--r--libopie2/opieui/ofontselector.cpp8
-rw-r--r--libopie2/opieui/otabwidget.cpp4
-rw-r--r--libopie2/opieui/otimepicker.cpp12
-rw-r--r--libopie2/opieui/oversatileview.cpp40
6 files changed, 41 insertions, 41 deletions
diff --git a/libopie2/opieui/fileselector/ofiledialog.cpp b/libopie2/opieui/fileselector/ofiledialog.cpp
index 2a89c5d..e7daead 100644
--- a/libopie2/opieui/fileselector/ofiledialog.cpp
+++ b/libopie2/opieui/fileselector/ofiledialog.cpp
@@ -90,50 +90,50 @@ OFileDialog::OFileDialog(const QString &caption,
const QString &dirName,
const QString &fileName,
const QMap<QString,QStringList>& mimetypes )
: QDialog( wid, "OFileDialog", true )
{
// QVBoxLayout *lay = new QVBoxLayout(this);
//showMaximized();
QVBoxLayout *lay = new QVBoxLayout(this );
file = new OFileSelector(this , mode, selector,
dirName, fileName,
mimetypes );
lay->addWidget( file );
//lay->addWidget( file );
//showFullScreen();
setCaption( caption.isEmpty() ? tr("FileDialog") : caption );
connect(file, SIGNAL(fileSelected(const QString&) ),
this, SLOT(slotFileSelected(const QString&) ) );
connect(file, SIGNAL(ok() ),
this, SLOT(slotSelectorOk()) ) ;
connect(file, SIGNAL(dirSelected(const QString&) ), this, SLOT(slotDirSelected(const QString&) ) );
#if 0
- connect(file, SIGNAL(dirSelected(const QString &) ),
- this, SLOT(slotDirSelected(const QString &) ) );
+ connect(file, SIGNAL(dirSelected(const QString&) ),
+ this, SLOT(slotDirSelected(const QString&) ) );
#endif
}
/**
* @returns the mimetype of the selected
* currently it return QString::null
*/
QString OFileDialog::mimetype()const
{
return QString::null;
}
/**
* @return the fileName
*/
QString OFileDialog::fileName()const
{
return file->selectedName();
}
/**
* return a DocLnk to the current file
*/
DocLnk OFileDialog::selectedDocument()const
{
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp
index 600daff..15cadd4 100644
--- a/libopie2/opieui/fileselector/ofileselector.cpp
+++ b/libopie2/opieui/fileselector/ofileselector.cpp
@@ -189,54 +189,54 @@ void ODocumentFileView::reread()
m_selector->reread();
}
int ODocumentFileView::fileCount()const
{
if (!m_selector)
return -1;
return m_selector->fileCount();
}
DocLnk ODocumentFileView::selectedDocument()const
{
if (!m_selector)
return DocLnk();
return m_selector->selectedDocument();
}
QWidget* ODocumentFileView::widget( QWidget* parent )
{
if (!m_selector )
{
m_selector = new FileSelector(currentMimeType().join(";"), parent, "fileselector", showNew(), showClose() );
- QObject::connect(m_selector, SIGNAL(fileSelected( const DocLnk& ) ),
+ QObject::connect(m_selector, SIGNAL(fileSelected(const DocLnk&) ),
selector(), SLOT(slotDocLnkBridge(const DocLnk&) ) );
QObject::connect(m_selector, SIGNAL(closeMe() ),
selector(), SIGNAL(closeMe() ) );
- QObject::connect(m_selector, SIGNAL(newSelected(const DocLnk& ) ),
- selector(), SIGNAL(newSelected(const DocLnk& ) ) );
+ QObject::connect(m_selector, SIGNAL(newSelected(const DocLnk&) ),
+ selector(), SIGNAL(newSelected(const DocLnk&) ) );
}
return m_selector;
}
/*
* This is the file system view used
* we use a QListView + QListViewItems for it
*/
OFileSelectorItem::OFileSelectorItem( QListView* view, const QPixmap& pixmap,
const QString& path, const QString& date,
const QString& size, const QString& dir,
bool isLocked, bool isDir )
: QListViewItem( view )
{
setPixmap(0, pixmap );
setText(1, path );
setText(2, size );
setText(3, date );
m_isDir = isDir;
m_dir = dir;
m_locked = isLocked;
}
@@ -503,50 +503,50 @@ QString OFileViewFileListView::currentDir()const
OFileSelector* OFileViewFileListView::selector()
{
return m_sel;
}
bool OFileViewFileListView::eventFilter (QObject *o, QEvent *e)
{
if ( e->type() == QEvent::KeyPress )
{
QKeyEvent *k = (QKeyEvent *)e;
if ( (k->key()==Key_Enter) || (k->key()==Key_Return))
{
slotClicked( Qt::LeftButton,m_view->currentItem(),QPoint(0,0),0);
return true;
}
}
return false;
}
void OFileViewFileListView::connectSlots()
{
connect(m_view, SIGNAL(clicked(QListViewItem*) ),
this, SLOT(slotCurrentChanged(QListViewItem*) ) );
- connect(m_view, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint&, int ) ),
- this, SLOT(slotClicked(int, QListViewItem*, const QPoint&, int ) ) );
+ connect(m_view, SIGNAL(mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ),
+ this, SLOT(slotClicked(int,QListViewItem*,const QPoint&,int) ) );
}
void OFileViewFileListView::slotCurrentChanged( QListViewItem* item)
{
if (!item)
return;
#if 0
OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item);
if (!sel->isDir() )
{
selector()->m_lneEdit->setText( sel->text(1) );
// if in fileselector mode we will emit selected
if ( selector()->mode() == OFileSelector::FileSelector )
{
qWarning("slot Current Changed");
QStringList str = QStringList::split("->", sel->text(1) );
QString path = sel->directory() + "/" + str[0].stripWhiteSpace();
emit selector()->fileSelected( path );
DocLnk lnk( path );
emit selector()->fileSelected( lnk );
}
}
@@ -958,50 +958,50 @@ bool OFileSelector::eventFilter (QObject *o, QEvent *e)
* This will insert the MimeTypes into the Combo Box
* And also connect the changed signal
*
* AutoMimeTyping is disabled for now. It used to reparse a dir and then set available mimetypes
*/
void OFileSelector::initMime()
{
MimeTypes::Iterator it;
for ( it = m_mimeType.begin(); it != m_mimeType.end(); ++it )
{
m_cmbMime->insertItem( it.key() );
}
m_cmbMime->setCurrentItem( 0 );
connect( m_cmbMime, SIGNAL(activated(int) ),
this, SLOT(slotMimeTypeChanged() ) );
}
void OFileSelector::initViews()
{
m_cmbView->insertItem( QObject::tr("Documents") );
m_cmbView->insertItem( QObject::tr("Files") );
m_cmbView->insertItem( QObject::tr("All Files") );
- connect(m_cmbView, SIGNAL(activated( const QString& ) ),
- this, SLOT(slotViewChange( const QString& ) ) );
+ connect(m_cmbView, SIGNAL(activated(const QString&) ),
+ this, SLOT(slotViewChange(const QString&) ) );
m_views.insert( QObject::tr("Documents"), new ODocumentFileView(this) );
/* see above why add both */
OFileViewInterface* in = new OFileViewFileSystem( this );
m_views.insert( QObject::tr("Files"), in );
m_views.insert( QObject::tr("All Files"), in );
}
/**
* d'tor
*/
OFileSelector::~OFileSelector()
{
}
/**
* Convience function for the fileselector
* make sure to delete the DocLnk
*
* @see DocLnk
diff --git a/libopie2/opieui/ofontselector.cpp b/libopie2/opieui/ofontselector.cpp
index 49ddeb6..f93781f 100644
--- a/libopie2/opieui/ofontselector.cpp
+++ b/libopie2/opieui/ofontselector.cpp
@@ -111,63 +111,63 @@ static int findItemCB( QComboBox *box, const QString &str )
/* static same as anon. namespace */
static int qt_version()
{
const char *qver = qVersion();
return ( qver [0] - '0' ) * 100 + ( qver [2] - '0' ) * 10 + ( qver [4] - '0' );
}
/**
* Constructs the Selector object
* @param withpreview If a font preview should be given
* @param parent The parent of the Font Selector
* @param name The name of the object
* @param fl WidgetFlags
*/
OFontSelector::OFontSelector( bool withpreview, QWidget *parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl )
{
d = new OFontSelectorPrivate();
QGridLayout *gridLayout = new QGridLayout( this, 0, 0, 4, 4 );
gridLayout->setRowStretch( 4, 10 );
d->m_font_family_list = new QListBox( this, "FontListBox" );
gridLayout->addMultiCellWidget( d->m_font_family_list, 0, 4, 0, 0 );
- connect( d->m_font_family_list, SIGNAL( highlighted( int ) ), this, SLOT( fontFamilyClicked( int ) ) );
+ connect( d->m_font_family_list, SIGNAL( highlighted(int) ), this, SLOT( fontFamilyClicked(int) ) );
QLabel *label = new QLabel( tr( "Style" ), this );
gridLayout->addWidget( label, 0, 1 );
d->m_font_style_list = new QComboBox( this, "StyleListBox" );
- connect( d->m_font_style_list, SIGNAL( activated( int ) ), this, SLOT( fontStyleClicked( int ) ) );
+ connect( d->m_font_style_list, SIGNAL( activated(int) ), this, SLOT( fontStyleClicked(int) ) );
gridLayout->addWidget( d->m_font_style_list, 1, 1 );
label = new QLabel( tr( "Size" ), this );
gridLayout->addWidget( label, 2, 1 );
d->m_font_size_list = new QComboBox( this, "SizeListBox" );
- connect( d->m_font_size_list, SIGNAL( activated( int ) ),
- this, SLOT( fontSizeClicked( int ) ) );
+ connect( d->m_font_size_list, SIGNAL( activated(int) ),
+ this, SLOT( fontSizeClicked(int) ) );
gridLayout->addWidget( d->m_font_size_list, 3, 1 );
d->m_pointbug = ( qt_version() <= 233 );
if ( withpreview )
{
d->m_preview = new QMultiLineEdit ( this, "Preview" );
d->m_preview->setAlignment ( AlignCenter );
d->m_preview->setWordWrap ( QMultiLineEdit::WidgetWidth );
d->m_preview->setMargin ( 3 );
d->m_preview->setText ( tr( "The Quick Brown Fox Jumps Over The Lazy Dog" ));
gridLayout->addRowSpacing ( 5, 4 );
gridLayout->addMultiCellWidget ( d->m_preview, 6, 6, 0, 1 );
gridLayout->setRowStretch ( 6, 5 );
}
else
d->m_preview = 0;
loadFonts ( d->m_font_family_list );
}
OFontSelector::~OFontSelector()
{
delete d;
diff --git a/libopie2/opieui/otabwidget.cpp b/libopie2/opieui/otabwidget.cpp
index ec6af9d..f47c90b 100644
--- a/libopie2/opieui/otabwidget.cpp
+++ b/libopie2/opieui/otabwidget.cpp
@@ -53,53 +53,53 @@ OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPositi
s = ( TabStyle ) config.readNumEntry( "TabStyle", (int) IconTab );
if ( s <= Global || s > IconList)
{
s = IconTab;
}
QString pos = config.readEntry( "TabPosition", "Top");
if ( pos == "Bottom" )
{
p = Bottom;
}
else
{
p = Top;
}
}
widgetStack = new QWidgetStack( this, "widgetstack" );
widgetStack->setFrameStyle( QFrame::NoFrame );
widgetStack->setLineWidth( style().defaultFrameWidth() );
tabBarStack = new QWidgetStack( this, "tabbarstack" );
tabBar = new OTabBar( tabBarStack, "tabbar" );
tabBarStack->addWidget( tabBar, 0 );
- connect( tabBar, SIGNAL( selected( int ) ), this, SLOT( slotTabBarSelected( int ) ) );
+ connect( tabBar, SIGNAL( selected(int) ), this, SLOT( slotTabBarSelected(int) ) );
tabList = new QComboBox( false, tabBarStack, "tablist" );
tabBarStack->addWidget( tabList, 1 );
- connect( tabList, SIGNAL( activated( int ) ), this, SLOT( slotTabListSelected( int ) ) );
+ connect( tabList, SIGNAL( activated(int) ), this, SLOT( slotTabListSelected(int) ) );
tabBarPosition = p;
setTabStyle( s );
setTabPosition( p );
currTab= 0x0;
}
OTabWidget::~OTabWidget()
{}
void OTabWidget::addTab( QWidget *child, const QString &icon, const QString &label )
{
QPixmap iconset = loadSmooth( icon );
QTab *tab = new QTab();
if ( tabBarStyle == IconTab )
{
tab->label = QString::null;
}
else
{
tab->label = label;
}
diff --git a/libopie2/opieui/otimepicker.cpp b/libopie2/opieui/otimepicker.cpp
index d4712a4..66f9ce0 100644
--- a/libopie2/opieui/otimepicker.cpp
+++ b/libopie2/opieui/otimepicker.cpp
@@ -200,54 +200,54 @@ void OTimePicker::setHour(int h)
QString hour;
hour.sprintf("%.2d",h);
QValueListIterator<OClickableLabel *> it;
for (it=hourLst.begin(); it!=hourLst.end(); it++)
{
if ((*it)->text() == hour) (*it)->setOn(true);
else (*it)->setOn(false);
}
tm.setHMS(h,tm.minute(),0);
}
/**
* This is a modal Dialog.
*
* @param parent The parent widget
* @param name The name of the object
* @param fl Possible window flags
*/
OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl )
: OTimePickerDialogBase (parent , name, true , fl)
{
- connect ( m_timePicker, SIGNAL( timeChanged( const QTime& ) ),
- this, SLOT( setTime ( const QTime& ) ) );
- connect ( minuteField, SIGNAL( textChanged ( const QString& ) ),
- this, SLOT ( setMinute ( const QString& ) ) );
- connect ( hourField, SIGNAL( textChanged ( const QString& ) ),
- this, SLOT ( setHour ( const QString& ) ) );
+ connect ( m_timePicker, SIGNAL( timeChanged(const QTime&) ),
+ this, SLOT( setTime(const QTime&) ) );
+ connect ( minuteField, SIGNAL( textChanged(const QString&) ),
+ this, SLOT ( setMinute(const QString&) ) );
+ connect ( hourField, SIGNAL( textChanged(const QString&) ),
+ this, SLOT ( setHour(const QString&) ) );
}
/**
* @return the time
*/
QTime OTimePickerDialog::time()const
{
return m_time;
}
/**
* Set the time to time
* @param time The time to be set
*/
void OTimePickerDialog::setTime( const QTime& time )
{
m_time = time;
m_timePicker->setHour ( time.hour() );
m_timePicker->setMinute( time.minute() );
// Set Textfields
if ( time.hour() < 10 )
diff --git a/libopie2/opieui/oversatileview.cpp b/libopie2/opieui/oversatileview.cpp
index 8839456..78154b7 100644
--- a/libopie2/opieui/oversatileview.cpp
+++ b/libopie2/opieui/oversatileview.cpp
@@ -149,94 +149,94 @@ OVersatileView::OVersatileView( QWidget* parent, const char* name, int mode )
#endif
setViewMode( mode ); // TODO: Read last style from config
// setSynchronization( true ); // TODO: Implement this
// create context menu allowing to switch between the views
_contextmenu = new QPopupMenu( 0, "oversatileview contextmenu" );
_contextmenu->setCaption( "Style" );
_contextmenu->setCheckable( true );
QActionGroup* ag = new QActionGroup( _contextmenu, "style option group" );
QAction* a1 = new QAction( "View Items in Icon Style", QIconSet( QPixmap( view_icon_xpm ) ),
"View Icons", 0, ag, "viewicon action", true );
QAction* a2 = new QAction( "View Items in Tree Style", QIconSet( QPixmap( view_tree_xpm ) ),
"View Tree", 0, ag, "viewtree action", true );
ag->addTo( _contextmenu );
if ( mode == Icons )
a1->setOn( true );
else if ( mode == Tree )
a2->setOn( true );
connect( a1, SIGNAL( activated() ), this, SLOT( setIconViewMode() ) );
connect( a2, SIGNAL( activated() ), this, SLOT( setTreeViewMode() ) );
#if (QT_VERSION >= 0x030000)
- connect( _listview, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint&, int ) ), this, SLOT( contextMenuRequested( QListViewItem*, const QPoint&, int ) ) );
- connect( _iconview, SIGNAL( contextMenuRequested( QIconViewItem*, const QPoint& ) ), this, SLOT( contextMenuRequested( QIconViewItem*, const QPoint& ) ) );
+ connect( _listview, SIGNAL( contextMenuRequested(QListViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) );
+ connect( _iconview, SIGNAL( contextMenuRequested(QIconViewItem*,const QPoint&) ), this, SLOT( contextMenuRequested(QIconViewItem*,const QPoint&) ) );
#else
- connect( _listview, SIGNAL( rightButtonPressed( QListViewItem*, const QPoint&, int ) ), this, SLOT( contextMenuRequested( QListViewItem*, const QPoint&, int ) ) );
- connect( _iconview, SIGNAL( rightButtonPressed( QIconViewItem*, const QPoint& ) ), this, SLOT( contextMenuRequested( QIconViewItem*, const QPoint& ) ) );
+ connect( _listview, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) );
+ connect( _iconview, SIGNAL( rightButtonPressed(QIconViewItem*,const QPoint&) ), this, SLOT( contextMenuRequested(QIconViewItem*,const QPoint&) ) );
#endif
//
// signal forwarders
//
// unfortunately we can't short-circuit all the QListView and QIconView signals
// to OVersatileView signals, because the signal/slot mechanism doesn't allow
// type-conversion :-(
// common signals for listview
connect( _listview, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
- connect( _listview, SIGNAL( selectionChanged( QListViewItem * ) ), this, SLOT( selectionChanged( QListViewItem * ) ) );
- connect( _listview, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( currentChanged( QListViewItem * ) ) );
- connect( _listview, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( clicked( QListViewItem * ) ) );
- connect( _listview, SIGNAL( pressed( QListViewItem * ) ), this, SLOT( pressed( QListViewItem * ) ) );
+ connect( _listview, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( selectionChanged(QListViewItem*) ) );
+ connect( _listview, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( currentChanged(QListViewItem*) ) );
+ connect( _listview, SIGNAL( clicked(QListViewItem*) ), this, SLOT( clicked(QListViewItem*) ) );
+ connect( _listview, SIGNAL( pressed(QListViewItem*) ), this, SLOT( pressed(QListViewItem*) ) );
- connect( _listview, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( doubleClicked( QListViewItem * ) ) );
- connect( _listview, SIGNAL( returnPressed( QListViewItem * ) ), this, SLOT( returnPressed( QListViewItem * ) ) );
+ connect( _listview, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( doubleClicked(QListViewItem*) ) );
+ connect( _listview, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( returnPressed(QListViewItem*) ) );
- connect( _listview, SIGNAL( onItem( QListViewItem * ) ), this, SLOT( onItem( QListViewItem * ) ) );
+ connect( _listview, SIGNAL( onItem(QListViewItem*) ), this, SLOT( onItem(QListViewItem*) ) );
connect( _listview, SIGNAL( onViewport() ), this, SIGNAL( onViewport() ) );
// common signals for iconview
connect( _iconview, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
- connect( _iconview, SIGNAL( selectionChanged( QIconViewItem * ) ), this, SLOT( selectionChanged( QIconViewItem * ) ) );
- connect( _iconview, SIGNAL( currentChanged( QIconViewItem * ) ), this, SLOT( currentChanged( QIconViewItem * ) ) );
- connect( _iconview, SIGNAL( clicked( QIconViewItem * ) ), this, SLOT( clicked( QIconViewItem * ) ) );
- connect( _iconview, SIGNAL( pressed( QIconViewItem * ) ), this, SLOT( pressed( QIconViewItem * ) ) );
+ connect( _iconview, SIGNAL( selectionChanged(QIconViewItem*) ), this, SLOT( selectionChanged(QIconViewItem*) ) );
+ connect( _iconview, SIGNAL( currentChanged(QIconViewItem*) ), this, SLOT( currentChanged(QIconViewItem*) ) );
+ connect( _iconview, SIGNAL( clicked(QIconViewItem*) ), this, SLOT( clicked(QIconViewItem*) ) );
+ connect( _iconview, SIGNAL( pressed(QIconViewItem*) ), this, SLOT( pressed(QIconViewItem*) ) );
- connect( _iconview, SIGNAL( doubleClicked( QIconViewItem * ) ), this, SLOT( doubleClicked( QIconViewItem * ) ) );
- connect( _iconview, SIGNAL( returnPressed( QIconViewItem * ) ), this, SLOT( returnPressed( QIconViewItem * ) ) );
+ connect( _iconview, SIGNAL( doubleClicked(QIconViewItem*) ), this, SLOT( doubleClicked(QIconViewItem*) ) );
+ connect( _iconview, SIGNAL( returnPressed(QIconViewItem*) ), this, SLOT( returnPressed(QIconViewItem*) ) );
- connect( _iconview, SIGNAL( onItem( QIconViewItem * ) ), this, SLOT( onItem( QIconViewItem * ) ) );
+ connect( _iconview, SIGNAL( onItem(QIconViewItem*) ), this, SLOT( onItem(QIconViewItem*) ) );
connect( _iconview, SIGNAL( onViewport() ), this, SIGNAL( onViewport() ) );
// listview only signals
- connect( _listview, SIGNAL( expanded( QListViewItem * ) ), this, SLOT( expanded( QListViewItem * ) ) );
- connect( _listview, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( collapsed( QListViewItem * ) ) );
+ connect( _listview, SIGNAL( expanded(QListViewItem*) ), this, SLOT( expanded(QListViewItem*) ) );
+ connect( _listview, SIGNAL( collapsed(QListViewItem*) ), this, SLOT( collapsed(QListViewItem*) ) );
// iconview only signals
connect( _iconview, SIGNAL( moved() ), this, SIGNAL( moved() ) );
}
OVersatileView::~OVersatileView()
{
}
QPopupMenu* OVersatileView::contextMenu() const
{
return _contextmenu;
}
void OVersatileView::contextMenuRequested( QListViewItem* item, const QPoint& pos, int col )
{
// can't use QObject::inherits here, because ListViewItems, beit Q, O or K,
// do not inherit from QObject - assuming here the programmer is
// disciplined enough to only add OVersatileViewItems to an OVersatileView
popupContextMenu( static_cast<OVersatileViewItem*>( item ), pos, col );
}
void OVersatileView::contextMenuRequested( QIconViewItem* item, const QPoint& pos )