kexi

msghandler.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2004-2005 Jaroslaw Staniek <js@iidea.pl>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#include <kexidb/msghandler.h>
21
22using namespace KexiDB;
23
24MessageTitle::MessageTitle(Object* o, const TQString& msg)
25 : m_obj(o)
26 , m_prevMsgTitle(o->m_msgTitle)
27{
28 m_obj->m_msgTitle = msg;
29}
30
31MessageTitle::~MessageTitle()
32{
33 m_obj->m_msgTitle = m_prevMsgTitle;
34}
35
36//------------------------------------------------
37
39 : m_messageHandlerParentWidget(parent)
40 , m_enableMessages(true)
41{
42}
43
44MessageHandler::~MessageHandler()
45{
46}
47
48int MessageHandler::askQuestion( const TQString& message,
49 KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult,
50 const KGuiItem &buttonYes,
51 const KGuiItem &buttonNo,
52 const TQString &dontShowAskAgainName,
53 int options )
54{
55 Q_UNUSED(message);
56 Q_UNUSED(dlgType);
57 Q_UNUSED(buttonYes);
58 Q_UNUSED(buttonNo);
59 Q_UNUSED(dontShowAskAgainName);
60 Q_UNUSED(options);
61 return defaultResult;
62}
virtual int askQuestion(const TQString &message, KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const TQString &dontShowAskAgainName=TQString(), int options=KMessageBox::Notify)
MessageHandler(TQWidget *parent=0)
High-level database connectivity library with database backend drivers.