\section{KLine\-Edit\-Dlg Class Reference}
\label{classKLineEditDlg}\index{KLineEditDlg@{KLineEditDlg}}
Dialog for user to enter a single line of text.  


{\tt \#include $<$klineeditdlg.h$>$}

Inheritance diagram for KLine\-Edit\-Dlg:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=58pt]{classKLineEditDlg__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KLine\-Edit\-Dlg:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=95pt]{classKLineEditDlg__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Clear} ()
\begin{CompactList}\small\item\em Clears the edit widget. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KLine\-Edit\-Dlg} (const  {\bf QString} \&\_\-text, const  {\bf QString} \&\_\-value, {\bf QWidget} $\ast$parent)
\begin{CompactList}\small\item\em Create a dialog that asks for a single line of text. \item\end{CompactList}\item 
{\bf QString} {\bf text} () const 
\item 
{\bf KLine\-Edit} $\ast$ {\bf line\-Edit} () const 
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf QString} {\bf get\-Text} (const  {\bf QString} \&\_\-text, const  {\bf QString} \&\_\-value, bool $\ast$ok, {\bf QWidget} $\ast$parent, {\bf QValidator} $\ast$validator=0)
\begin{CompactList}\small\item\em Static convenience function to get a textual input from the user. \item\end{CompactList}\item 
{\bf QString} {\bf get\-Text} (const  {\bf QString} \&\_\-caption, const  {\bf QString} \&\_\-text, const  {\bf QString} \&\_\-value=QString::null, bool $\ast$ok=0, {\bf QWidget} $\ast$parent=0, {\bf QValidator} $\ast$validator=0)
\begin{CompactList}\small\item\em Static convenience function to get a textual input from the user. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Text\-Changed} (const  {\bf QString} \&)
\begin{CompactList}\small\item\em Enables and disables the OK button depending on the state returned by the lineedit's {\bf QValidator}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKLineEditDlg_b0}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf KLine\-Edit} $\ast$ {\bf edit}
\begin{CompactList}\small\item\em The line edit widget. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Dialog for user to enter a single line of text. 

\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf klineeditdlg.h}{\rm (p.\,\pageref{klineeditdlg_8h})},v 1.13 2002/03/04 00:51:50 lunakl Exp \end{Desc}
\end{Desc}
\begin{Desc}
\item[Author:]David Faure $<${\tt faure@kde.org}$>$, layout management by Preston Brown $<${\tt pbrown@kde.org}$>$ \end{Desc}




Definition at line 35 of file klineeditdlg.h.

\subsection{Constructor \& Destructor Documentation}
\index{KLineEditDlg@{KLine\-Edit\-Dlg}!KLineEditDlg@{KLineEditDlg}}
\index{KLineEditDlg@{KLineEditDlg}!KLineEditDlg@{KLine\-Edit\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KLine\-Edit\-Dlg::KLine\-Edit\-Dlg (const {\bf QString} \& {\em \_\-text}, const {\bf QString} \& {\em \_\-value}, {\bf QWidget} $\ast$ {\em parent})}\label{classKLineEditDlg_a0}


Create a dialog that asks for a single line of text. 

\_\-value is the initial value of the line. \_\-text appears as label on top of the entry box. If the internal line edit has an associated {\bf QValidator} set, the OK button is disabled as long as the validator doesn't return Acceptable. If there's no validator, the OK button is enabled whenever the line edit isn't empty.

If you want to accept empty input, make a trivial {\bf QValidator} that always returns Acceptable, e.g. {\bf QReg\-Exp\-Validator} with a regexp of \char`\"{}.$\ast$\char`\"{}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-text}]Text of the label \item[{\em \_\-value}]Initial value of the inputline \end{description}
\end{Desc}


Definition at line 37 of file klineeditdlg.cpp.

References edit, KDialog\-Base::enable\-Button(), KDialog\-Base::enable\-Button\-OK(), QString::is\-Empty(), KStd\-Accel::label(), KDialog\-Base::plain\-Page(), QLine\-Edit::set\-Selection(), QLine\-Edit::set\-Text(), QLine\-Edit::size\-Hint(), slot\-Clear(), slot\-Text\-Changed(), KDialog::spacing\-Hint(), QLine\-Edit::text(), and KDialog\-Base::user1Clicked().

\subsection{Member Function Documentation}
\index{KLineEditDlg@{KLine\-Edit\-Dlg}!text@{text}}
\index{text@{text}!KLineEditDlg@{KLine\-Edit\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLine\-Edit\-Dlg::text () const}\label{classKLineEditDlg_a2}


\begin{Desc}
\item[Returns:]the value the user entered \end{Desc}


Definition at line 154 of file klineeditdlg.cpp.

References edit, and QLine\-Edit::text().

Referenced by get\-Text().\index{KLineEditDlg@{KLine\-Edit\-Dlg}!lineEdit@{lineEdit}}
\index{lineEdit@{lineEdit}!KLineEditDlg@{KLine\-Edit\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KLine\-Edit}$\ast$ KLine\-Edit\-Dlg::line\-Edit () const\hspace{0.3cm}{\tt  [inline]}}\label{classKLineEditDlg_a3}


\begin{Desc}
\item[Returns:]the line edit widget \end{Desc}


Definition at line 65 of file klineeditdlg.h.

References edit.

Referenced by get\-Text().\index{KLineEditDlg@{KLine\-Edit\-Dlg}!getText@{getText}}
\index{getText@{getText}!KLineEditDlg@{KLine\-Edit\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLine\-Edit\-Dlg::get\-Text (const {\bf QString} \& {\em \_\-text}, const {\bf QString} \& {\em \_\-value}, bool $\ast$ {\em ok}, {\bf QWidget} $\ast$ {\em parent}, {\bf QValidator} $\ast$ {\em validator} = 0)\hspace{0.3cm}{\tt  [static]}}\label{classKLineEditDlg_e0}


Static convenience function to get a textual input from the user. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-text}]Text of the label \item[{\em \_\-value}]Initial value of the inputline \item[{\em ok}]this bool will be set to true if user pressed \char`\"{}Ok\char`\"{} \item[{\em \_\-validator}]Validator to be stuffed into the line edit. \end{description}
\end{Desc}


Definition at line 159 of file klineeditdlg.cpp.

References QDialog::exec(), line\-Edit(), QLine\-Edit::set\-Validator(), slot\-Text\-Changed(), and text().\index{KLineEditDlg@{KLine\-Edit\-Dlg}!getText@{getText}}
\index{getText@{getText}!KLineEditDlg@{KLine\-Edit\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KLine\-Edit\-Dlg::get\-Text (const {\bf QString} \& {\em \_\-caption}, const {\bf QString} \& {\em \_\-text}, const {\bf QString} \& {\em \_\-value} = QString::null, bool $\ast$ {\em ok} = 0, {\bf QWidget} $\ast$ {\em parent} = 0, {\bf QValidator} $\ast$ {\em validator} = 0)\hspace{0.3cm}{\tt  [static]}}\label{classKLineEditDlg_e1}


Static convenience function to get a textual input from the user. 

This method includes a caption, and has (almost) the same API as {\bf QInput\-Dialog::get\-Text} (no echo mode, we have {\bf KPassword\-Dialog}{\rm (p.\,\pageref{classKPasswordDialog})}).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-caption}]Caption of the dialog \item[{\em \_\-text}]Text of the label \item[{\em \_\-value}]Initial value of the inputline \item[{\em ok}]this bool will be set to true if user pressed \char`\"{}Ok\char`\"{} \item[{\em \_\-validator}]Validator to be stuffed into the line edit. \end{description}
\end{Desc}


Definition at line 174 of file klineeditdlg.cpp.

References QDialog::exec(), line\-Edit(), KDialog::set\-Caption(), QLine\-Edit::set\-Validator(), slot\-Text\-Changed(), and text().\index{KLineEditDlg@{KLine\-Edit\-Dlg}!slotClear@{slotClear}}
\index{slotClear@{slotClear}!KLineEditDlg@{KLine\-Edit\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLine\-Edit\-Dlg::slot\-Clear ()\hspace{0.3cm}{\tt  [slot]}}\label{classKLineEditDlg_i0}


Clears the edit widget. 



Definition at line 134 of file klineeditdlg.cpp.

References edit, and QLine\-Edit::set\-Text().

Referenced by KLine\-Edit\-Dlg().\index{KLineEditDlg@{KLine\-Edit\-Dlg}!slotTextChanged@{slotTextChanged}}
\index{slotTextChanged@{slotTextChanged}!KLineEditDlg@{KLine\-Edit\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KLine\-Edit\-Dlg::slot\-Text\-Changed (const {\bf QString} \&)\hspace{0.3cm}{\tt  [protected, slot]}}\label{classKLineEditDlg_j0}


Enables and disables the OK button depending on the state returned by the lineedit's {\bf QValidator}. 



Definition at line 139 of file klineeditdlg.cpp.

References QLine\-Edit::cursor\-Position(), edit, KDialog\-Base::enable\-Button(), KDialog\-Base::enable\-Button\-OK(), QString::is\-Empty(), QString::length(), QLine\-Edit::text(), and QLine\-Edit::validator().

Referenced by get\-Text(), and KLine\-Edit\-Dlg().

\subsection{Member Data Documentation}
\index{KLineEditDlg@{KLine\-Edit\-Dlg}!edit@{edit}}
\index{edit@{edit}!KLineEditDlg@{KLine\-Edit\-Dlg}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KLine\-Edit}$\ast$ {\bf KLine\-Edit\-Dlg::edit}\hspace{0.3cm}{\tt  [protected]}}\label{classKLineEditDlg_p0}


The line edit widget. 



Definition at line 111 of file klineeditdlg.h.

Referenced by KLine\-Edit\-Dlg(), line\-Edit(), slot\-Clear(), slot\-Text\-Changed(), and text().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
klineeditdlg.h\item 
klineeditdlg.cpp\end{CompactItemize}
