diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-02-28 20:07:03 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-03-04 19:33:16 +0100 |
commit | 7488ad52d7aa0941ec09757240acc3f542b3832a (patch) | |
tree | 2da251ad36765987bba0f480352432401697ff48 /dbaccess/source/ui/inc/LimitBox.hxx | |
parent | 30e14d7d3a70f0b5f5a6163d122e501cc5edc334 (diff) |
Add new dialog to Query Design View
In Query Properties Dialog can be set properties like
distinct values and limit.
To open choose Edit\Query Properties.
Steps of implementation:
- Add new slot to Edit menu (menubar.xml): delete the slot of distinct values,
because it can set in this dialog too
- Separate LimitBox class from limitboxcontroller.cxx (LimitBox.hxx\cxx)
With it only LimitBox header is included in the dialog source.
- Extend LimitBox class to work with new layout widget (make... and GetOptimalSize())
and add it to the galde catalog
- Make a class for the new dialog (QueryPropertiesDialog.hxx\cxx) and
write the .ui file. (querypropertiesdialog.ui)
- Syncronize the two LimitBox (querycontroller.cxx)
Change-Id: Ib84bef5a2ed55030333d6151342b99ff27766538
Diffstat (limited to 'dbaccess/source/ui/inc/LimitBox.hxx')
-rw-r--r-- | dbaccess/source/ui/inc/LimitBox.hxx | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/dbaccess/source/ui/inc/LimitBox.hxx b/dbaccess/source/ui/inc/LimitBox.hxx new file mode 100644 index 000000000000..52084a0ce33a --- /dev/null +++ b/dbaccess/source/ui/inc/LimitBox.hxx @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LIMIT_BOX_HXX +#define LIMIT_BOX_HXX + +#include <vcl/field.hxx> +#include <rtl/ustring.hxx> + +namespace dbaui +{ + +/** + * Input box to add limit to an SQL query (maximum number of result's rows) + * This box is reachable on the Query Design Toolbar + */ +class LimitBox: public NumericBox +{ + public: + LimitBox( Window* pParent, WinBits nStyle ); + virtual ~LimitBox(); + + virtual long Notify( NotifyEvent& rNEvt ); + + virtual OUString CreateFieldText( sal_Int64 nValue ) const; + + virtual void Reformat(); + virtual void ReformatAll(); + + virtual Size GetOptimalSize() const; + + private: + void LoadDefaultLimits(); +}; + +} ///dbaui namespace + +#endif ///LIMIT_BOX_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |