[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kexi/kexiutils
From:       Jarosław Staniek <staniek () kde ! org>
Date:       2009-08-08 22:58:33
Message-ID: 1249772313.660714.5133.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1009025 by staniek:

add setMargins()


 M  +9 -3      utils.cpp  
 M  +4 -1      utils.h  


--- trunk/koffice/kexi/kexiutils/utils.cpp #1009024:1009025
@@ -1,5 +1,5 @@
 /* This file is part of the KDE project
-   Copyright (C) 2003-2008 Jarosław Staniek <staniek@kde.org>
+   Copyright (C) 2003-2009 Jarosław Staniek <staniek@kde.org>
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
@@ -694,13 +694,19 @@
     }
 }
 
+//---------------------
+
 void KexiUtils::setStandardMarginsAndSpacing(QLayout *layout)
 {
-    layout->setContentsMargins(
-        KDialog::marginHint(), KDialog::marginHint(), KDialog::marginHint(), KDialog::marginHint());
+    setMargins(QLayout *layout, KDialog::marginHint());
     layout->setSpacing( KDialog::spacingHint() );
 }
 
+void KexiUtils::setMargins(QLayout *layout, int value);
+{
+    layout->setContentsMargins(value, value, value, value);
+}
+
 QPixmap KexiUtils::replaceColors(const QPixmap& original, const QColor& color)
 {
     QPixmap dest(original);
--- trunk/koffice/kexi/kexiutils/utils.h #1009024:1009025
@@ -1,5 +1,5 @@
 /* This file is part of the KDE project
-   Copyright (C) 2003-2008 Jarosław Staniek <staniek@kde.org>
+   Copyright (C) 2003-2009 Jarosław Staniek <staniek@kde.org>
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
@@ -550,6 +550,9 @@
  for the layout @a layout. */
 KEXIUTILS_EXPORT void setStandardMarginsAndSpacing(QLayout *layout);
 
+/*! Sets the same @a value for layout @a layout margins. */
+KEXIUTILS_EXPORT void setMargins(QLayout *layout, int value);
+
 //! sometimes we leave a space in the form of empty QFrame and want to insert here
 //! a widget that must be instantiated by hand.
 //! This macro inserts a widget \a what into a frame \a where.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic