14
14
You should have received a copy of the GNU Library General Public License
15
15
along with this library; see the file COPYING.LIB. If not, write to
16
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
Boston, MA 02111-1307, USA.
16
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
* Boston, MA 02110-1301, USA.
20
20
#ifndef KEXIDB_MSGHANDLER_H
67
67
See KexiMainWindowImpl::renameObject() implementation for example. */
68
68
inline void enableMessages(bool enable) { m_enableMessages = enable; }
70
/*! Shows error message with \a title (it is not caption) and details. */
70
71
virtual void showErrorMessage(const QString &title,
71
72
const QString &details = QString::null) = 0;
74
/*! Shows error message with \a msg text. Existing error message from \a obj object
75
is also copied, if present. */
73
76
virtual void showErrorMessage(KexiDB::Object *obj, const QString& msg = QString::null) = 0;
78
/*! Interactively asks a question. For GUI version, KMessageBox class is used.
79
See KMessageBox documentation for explanation of the parameters.
80
\a defaultResult is returned in case when no message handler is installed.
81
\a message should be i18n's string.
82
Value from KMessageBox::ButtonCode enum is returned.
83
Reimplement this. This implementation does nothing, just returns \a defaultResult. */
84
virtual int askQuestion( const QString& message,
85
KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult,
86
const KGuiItem &buttonYes=KStdGuiItem::yes(),
87
const KGuiItem &buttonNo=KStdGuiItem::no(),
88
const QString &dontShowAskAgainName = QString::null,
89
int options = KMessageBox::Notify );
76
92
QGuardedPtr<QWidget> m_messageHandlerParentWidget;
77
93
bool m_enableMessages : 1;