Ejemplo n.º 1
0
KViewSearchLine::KViewSearchLine(QWidget *parent, QAbstractItemView *v) :
    KLineEdit(parent)
{
    d = new KViewSearchLinePrivate;

    setClearButtonShown(true);

    d->treeView = dynamic_cast<QTreeView *>(v);
    d->listView = dynamic_cast<QListView *>(v);

    connect(this, SIGNAL(textChanged(const QString &)),
            this, SLOT(queueSearch(const QString &)));

    if(view()) {
        connect(view(), SIGNAL(destroyed()),
                this, SLOT(listViewDeleted()));
        connect(model(), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
                this, SLOT(slotDataChanged(const QModelIndex &, const QModelIndex &)));
        connect(model(), SIGNAL(rowsInserted(const QModelIndex &, int , int )),
                this, SLOT(slotRowsInserted(const QModelIndex &, int, int)));
        connect(model(), SIGNAL(rowsRemoved(const QModelIndex &, int , int )),
                this, SLOT(slotRowsRemoved(const QModelIndex &, int, int)));
        connect(model(), SIGNAL(columnsInserted(const QModelIndex &, int, int )),
                this, SLOT(slotColumnsInserted(const QModelIndex &, int, int )));
        connect(model(), SIGNAL(columnsRemoved(const QModelIndex &, int, int)),
                this, SLOT(slotColumnsRemoved(const QModelIndex &, int, int)));
        connect(model(), SIGNAL(modelReset()), this, SLOT(slotModelReset()));
    }
    else
Ejemplo n.º 2
0
QExLineEdit::QExLineEdit(QWidget *parent) :
	QLineEdit(parent),
	d(new QExLineEditPrivate(this))
{
    setClearButtonShown(false);
    
    connect(this, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
    connect(this, SIGNAL(textEdited(const QString &)), this, SLOT(textEdited(const QString &)));
}
Ejemplo n.º 3
0
KTreeWidgetSearchLine::KTreeWidgetSearchLine( QWidget *q,
                                              const QList<QTreeWidget *> &treeWidgets )
  : KLineEdit( q ), d( new Private( this ) )
{
  connect( this, SIGNAL(textChanged(QString)),
           this, SLOT(_k_queueSearch(QString)) );

  setClearButtonShown( true );
  setTreeWidgets( treeWidgets );
}
Ejemplo n.º 4
0
QExLineEdit::QExLineEdit(const QPixmap &clearPxm, QWidget *parent ) :
	QLineEdit(parent),
	d(new QExLineEditPrivate(this))
{
    d->pxm = clearPxm.scaled(16, 16);
    setClearButtonShown(!d->pxm.isNull());
    
    connect(this, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
    connect(this, SIGNAL(textEdited(const QString &)), this, SLOT(textEdited(const QString &)));
}
Ejemplo n.º 5
0
KTreeViewSearchLine::KTreeViewSearchLine( QWidget *parent, QTreeView *treeView )
  : KLineEdit( parent ), d( new Private( this ) )
{
  connect(this, &KTreeViewSearchLine::textChanged, this, &KTreeViewSearchLine::queueSearch);

  setClearButtonShown( true );
  setTreeView( treeView );

  if ( !treeView ) {
      setEnabled( false );
  }
}
Ejemplo n.º 6
0
KTreeWidgetSearchLine::KTreeWidgetSearchLine( QWidget *q, QTreeWidget *treeWidget )
  : KLineEdit( q ), d( new Private( this ) )
{
  connect( this, SIGNAL(textChanged(QString)),
           this, SLOT(_k_queueSearch(QString)) );

  setClearButtonShown( true );
  setTreeWidget( treeWidget );

  if ( !treeWidget ) {
      setEnabled( false );
  }
}
Ejemplo n.º 7
0
KTreeViewSearchLine::KTreeViewSearchLine( QWidget *parent, QTreeView *treeView )
  : KLineEdit( parent ), d( new Private( this ) )
{
  connect( this, SIGNAL(textChanged(QString)),
           this, SLOT(queueSearch(QString)) );

  setClearButtonShown( true );
  setTreeView( treeView );

  if ( !treeView ) {
      setEnabled( false );
  }
}
Ejemplo n.º 8
0
ProxyLineEdit::ProxyLineEdit(QWidget* const parent)
    : KLineEdit(parent),
      m_widget(0)
{
    m_layout = new QVBoxLayout;
    m_layout->setSpacing(0);
    m_layout->setMargin(0);
    setLayout(m_layout);

    // unset text edit cursor
    unsetCursor();

    // unset clear button per default
    setClearButtonShown(false);
}
Ejemplo n.º 9
0
SearchLineEdit::SearchLineEdit( QWidget * parent, Okular::Document * document )
    : KLineEdit( parent ), m_document( document ), m_minLength( 0 ),
      m_caseSensitivity( Qt::CaseInsensitive ),
      m_searchType( Okular::Document::AllDocument ), m_id( -1 ),
      m_moveViewport( false ), m_changed( false ), m_fromStart( true ),
      m_searchRunning( false )
{
    setObjectName( QStringLiteral( "SearchLineEdit" ) );
    setClearButtonShown( true );

    // a timer to ensure that we don't flood the document with requests to search
    m_inputDelayTimer = new QTimer(this);
    m_inputDelayTimer->setSingleShot(true);
    connect(m_inputDelayTimer, &QTimer::timeout, this, &SearchLineEdit::startSearch);

    connect(this, &SearchLineEdit::textChanged, this, &SearchLineEdit::slotTextChanged);
    connect(this, &SearchLineEdit::returnPressed, this, &SearchLineEdit::slotReturnPressed);
    connect(document, &Okular::Document::searchFinished, this, &SearchLineEdit::searchFinished);
}
void K3IconViewSearchLine::init( Q3IconView *iconView )
{
  delete d;
  d = new K3IconViewSearchLinePrivate;

  d->iconView = iconView;

  connect( this, SIGNAL(textChanged(QString)),
	   this, SLOT(queueSearch(QString)) );

  if ( iconView != NULL )
  {
      connect( iconView, SIGNAL(destroyed()),
              this,     SLOT(iconViewDeleted()) );
      setEnabled( true );
  } else {
      setEnabled( false );
  }

  setClearButtonShown(true);
}
Ejemplo n.º 11
0
AdvancedRenameLineEditProxy::AdvancedRenameLineEditProxy(QWidget* parent)
    : ProxyLineEdit(parent)
{
    setClearButtonShown(true);
}
Ejemplo n.º 12
0
KonqComboLineEdit::KonqComboLineEdit( QWidget *parent )
                  :KLineEdit( parent )
{
    setClearButtonShown( true );
}