[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: konqueror components (was Re: konqueror issues)
From:       David Faure <David.Faure () insa-lyon ! fr>
Date:       1999-02-15 17:47:29
[Download RAW message or body]

> interface KfmView : OpenParts::Part, KfmGui
> {
>   void openURL( in string url );
>   string url();
> 
>   What else can be here?

All the stuff that is currently repeated in kiconcontainer and kfmfinder
(see the comment in my last commit (or below) about this)

Want a list ? Here it is :)

  virtual void setBgColor( const QColor& _color );
  virtual const QColor& bgColor() { return m_bgColor; }
  virtual void setTextColor( const QColor& _color );
  virtual const QColor& textColor() { return m_textColor; }
  virtual void setLinkColor( const QColor& _color );
  virtual const QColor& linkColor() { return m_linkColor; }
  virtual void setVLinkColor( const QColor& _color );
  virtual const QColor& vLinkColor() { return m_vLinkColor; }
 
  virtual void setStdFontName( const char *_name );
  virtual const char* stdFontName() { return m_stdFontName; }
  virtual void setFixedFontName( const char *_name );
  virtual const char* fixedFontName() { return m_fixedFontName; }
  virtual void setFontSize( const int _size );
  virtual const int fontSize() { return m_fontSize; }
 
  virtual void setBgPixmap( const QPixmap& _pixmap );
  virtual const QPixmap& bgPixmap() { return m_bgPixmap; }
 
  virtual void setMouseMode( KfmAbstractGui::MouseMode _mode ) { m_mouseMode = _mode; }
  virtual KfmAbstractGui::MouseMode mouseMode() { return m_mouseMode; }
 
  virtual void setUnderlineLink( bool _underlineLink );
  virtual bool underlineLink() { return m_underlineLink; }
  virtual void setChangeCursor( bool _changeCursor ) { m_changeCursor = _changeCursor; }
  virtual bool changeCursor() { return m_changeCursor; };
  virtual void setShowingDotFiles( bool _isShowingDotFiles );
  virtual bool isShowingDotFiles() { return m_isShowingDotFiles; } 


> }
> 
> interface IconView : KfmView
> {
>   view specific stuff
> }
> 
> interface TreeView : KfmView
> {
>   view specific stuff
> }
> 
> interface HTMLView : KfmView
> {
>   view specific stuff
> }

I agree with this. Currently IconView is called kiconcontainer and doesn't
inherit from kfmview, but is a standalone class used by kfmview. This
explains the ugly code that can be found in kfmview right now :

void KfmView::fetchFocus()
{
  switch( m_viewMode )
  {
  case FINDER:
    m_pFinder->setFocus();
    break;
  case HOR_ICONS:
  case VERT_ICONS:
    m_pIconView->setFocus();
    break;
  case HTML:
    m_pBrowser->setFocus();
    break;
  case NOMODE:
    break;
  }

This could be easily solved by a common parent for all types of view, be it 
KfmView itself or something else.

> And then there's (the current) KfmGui, renamed to KfmMainView to avoid
> name conflicts with the already defined interface:

I don't understand the renaming.
KfmGui is not a main view, it's a set of view.
The code below seems to agree with it, so I guess it's just a matter of renaming.

> interface KfmMainView : OpenParts::Part, KfmGui
> {
>   (...all the current stuff...)
> 
>   addView( in KfmView view ); //this is for the kmultipanner/qsplitter-guys ;)
>   KfmView view();
> 
>   plus some other stuff
> }

<snipped>
I will have to think a bit more about the second part...
Is there a difference with the proposal above ?

-- 
 ____________________________________________________________________
|                                                                    |
|  David FAURE                                                       |
|  E-mail : David.Faure@insa-lyon.fr, faure@kde.org                  |
|  http://www.insa-lyon.fr/People/AEDI/dfaure/index.html             |
|____________________________________________________________________|

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic