Source Code (Use browser search to find items of interest.)

Class Index

karchie'KAView (./kdenetwork/karchie/KAView.h:159)

class KAView : public QDialog // Fenster zum rummalen
{
Q_OBJECT
public:
KAView( QWidget *parent=0, const char *name=0, bool modal=FALSE, WFlags f=0 );
~KAView();

  KAViewSearchterm &getSearchterm() { return *searchterm; }
  KAViewList &getList() { return *list; }
  KAViewFiletype &getFiletype() { return *filetype; }

  /* calls KAViewList::displayFileList(...) */
  void newFileList( KAQueryList &fileList );

public slots:
  void slotShowFileDiscriptor( bool );
  void slotListFileSelected( int index );
  inline void slotListFileSelected( int index, int /*column*/ );

private:

  QBoxLayout  *box;
  KAViewSearchterm *searchterm;
  KAViewList  *list;
  KAViewFiletype *filetype;

  KAQueryList *fList;
};

void 
KAView::slotListFileSelected( int index, int /*column*/ )
{ slotListFileSelected(index); }

karchie'KAView::KAView() (./kdenetwork/karchie/KAView.cpp:453)

KAView::KAView(QWidget *parent, const char *name, bool modal, WFlags f)
  : QDialog( parent, name, modal, f ), box(0L), filetype(0), fList(0)
{

  // setup searchterm line editor
  searchterm = new KAViewSearchterm( this, "viewsearchterm" );
  // lineeditor shouldn't grow vertical, only horiontal
  //  searchterm->setFixedHeight( 120 );

  // setup list
  list = new KAViewList( this, "viewlist" );

  // setup fileview
  //  config = KApplication::kApplication()->config();  
  slotShowFileDiscriptor(KApplication::kApplication()
			 ->config()
			 ->readBoolEntry("FAttr", true));

  connect( list, SIGNAL(highlighted(int,int)), this, SLOT(slotListFileSelected(int,int)));
}


karchie'KAView::~KAView() (./kdenetwork/karchie/KAView.cpp:474)

KAView::~KAView()
{
  delete box;
  delete searchterm;
  delete list;
  if ( filetype != 0 )
    delete filetype;
}

void 

karchie'KAView::newFileList() (./kdenetwork/karchie/KAView.cpp:484)

KAView::newFileList( KAQueryList &fileList )
{
  fList = &fileList;
  // max breite des filedate Feldes herausfinden
  const QFontMetrics &fm = fontMetrics();
  int width, maxwidth = 0, i, count = fileList.count();
  if ( count > 150 ) // don't count too much lines
    count = 150;
  for ( i=0; i<count; i++ ) {
    width = fm.boundingRect(fileList.at(i)->getDateTime().toString()).width();
    if ( width > maxwidth )
      maxwidth = width;
  }
  //debug("filetype is %ld", (long)filetype);
  if (filetype)
    filetype->setFileDateWidth( maxwidth );
  list->displayFileList( fileList );
}

void 

karchie'KAView::slotShowFileDiscriptor() (./kdenetwork/karchie/KAView.cpp:504)

KAView::slotShowFileDiscriptor( bool showit )
{
  // if show true, show it to the world
  if ( showit ){
    // erase the boxlayout
    if (box)
      delete box;
    // and do a new with the filetype
    box = new QBoxLayout( this, QBoxLayout::Down );
    box->addWidget( searchterm );
    box->addWidget( list );
    // construct a new filetypeview if nessesary
    if ( filetype == 0 )
        // setup fileview
      filetype = new KAViewFiletype( this, "viewfiletype" );
    box->addWidget( filetype );
    int currentitem = list->currentItem();
    if (-1 != currentitem)
      filetype->displayQueryFile( *(fList->at(currentitem)) );
    filetype->show();
  }
  else{
    // erase filetypeview
    if ( filetype != 0 ){
      delete filetype;
      filetype = 0;
    }
    // erase the boxlayout
    if (box)
      delete box;
    // and do a new without the filetype
    box = new QBoxLayout( this, QBoxLayout::Down );
    box->addWidget( searchterm );
    box->addWidget( list );
  }
  box->activate();
  searchterm->show();
  list->show();
  show();
}

void 

karchie'KAView::slotListFileSelected() (./kdenetwork/karchie/KAView.cpp:546)

KAView::slotListFileSelected( int index )
{
  if (filetype)
    filetype->displayQueryFile( *(fList->at( index )));
}


karchie'KAView::slotListFileSelected() (./kdenetwork/karchie/KAView.h:189)

KAView::slotListFileSelected( int index, int /*column*/ )
{ slotListFileSelected(index); }