Diffstat (limited to 'noncore/settings/appearance2/appearance.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index f918767..9638686 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp | |||
@@ -18,48 +18,49 @@ | |||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
19 | ..}^=.= = ; Public License for more details. | 19 | ..}^=.= = ; Public License for more details. |
20 | ++= -. .` .: | 20 | ++= -. .` .: |
21 | : = ...= . :.=- You should have received a copy of the GNU | 21 | : = ...= . :.=- You should have received a copy of the GNU |
22 | -. .:....=;==+<; General Public License along with this file; | 22 | -. .:....=;==+<; General Public License along with this file; |
23 | -_. . . )=. = see the file COPYING. If not, write to the | 23 | -_. . . )=. = see the file COPYING. If not, write to the |
24 | -- :-=` Free Software Foundation, Inc., | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 59 Temple Place - Suite 330, | 25 | 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "appearance.h" | 30 | #include "appearance.h" |
31 | #include "editScheme.h" | 31 | #include "editScheme.h" |
32 | #include "stylelistitem.h" | 32 | #include "stylelistitem.h" |
33 | #include "decolistitem.h" | 33 | #include "decolistitem.h" |
34 | #include "colorlistitem.h" | 34 | #include "colorlistitem.h" |
35 | #include "exceptlistitem.h" | 35 | #include "exceptlistitem.h" |
36 | #include "sample.h" | 36 | #include "sample.h" |
37 | 37 | ||
38 | /* OPIE */ | 38 | /* OPIE */ |
39 | #include <opie2/odevice.h> | 39 | #include <opie2/odevice.h> |
40 | #include <opie2/ofiledialog.h> | 40 | #include <opie2/ofiledialog.h> |
41 | #include <opie2/otabwidget.h> | 41 | #include <opie2/otabwidget.h> |
42 | #include <opie2/odebug.h> | ||
42 | 43 | ||
43 | #include <qpe/config.h> | 44 | #include <qpe/config.h> |
44 | #include <qpe/global.h> | 45 | #include <qpe/global.h> |
45 | #include <qpe/qpeapplication.h> | 46 | #include <qpe/qpeapplication.h> |
46 | #include <qpe/qpemessagebox.h> | 47 | #include <qpe/qpemessagebox.h> |
47 | #include <qpe/qcopenvelope_qws.h> | 48 | #include <qpe/qcopenvelope_qws.h> |
48 | #include <qpe/qpestyle.h> | 49 | #include <qpe/qpestyle.h> |
49 | #include <qpe/lightstyle.h> | 50 | #include <qpe/lightstyle.h> |
50 | #include <qpe/styleinterface.h> | 51 | #include <qpe/styleinterface.h> |
51 | 52 | ||
52 | /* QT */ | 53 | /* QT */ |
53 | #include <qbuttongroup.h> | 54 | #include <qbuttongroup.h> |
54 | #include <qcheckbox.h> | 55 | #include <qcheckbox.h> |
55 | #include <qcombobox.h> | 56 | #include <qcombobox.h> |
56 | #include <qdialog.h> | 57 | #include <qdialog.h> |
57 | #include <qdir.h> | 58 | #include <qdir.h> |
58 | #include <qlabel.h> | 59 | #include <qlabel.h> |
59 | #include <qlayout.h> | 60 | #include <qlayout.h> |
60 | #include <qlineedit.h> | 61 | #include <qlineedit.h> |
61 | #include <qlistbox.h> | 62 | #include <qlistbox.h> |
62 | #include <qmessagebox.h> | 63 | #include <qmessagebox.h> |
63 | #include <qpushbutton.h> | 64 | #include <qpushbutton.h> |
64 | #include <qradiobutton.h> | 65 | #include <qradiobutton.h> |
65 | #if QT_VERSION >= 300 | 66 | #if QT_VERSION >= 300 |
@@ -811,49 +812,50 @@ void Appearance::downExcept ( ) | |||
811 | ExceptListItem *it = (ExceptListItem *) m_except-> selectedItem ( ); | 812 | ExceptListItem *it = (ExceptListItem *) m_except-> selectedItem ( ); |
812 | 813 | ||
813 | if ( it && it-> itemBelow ( )) | 814 | if ( it && it-> itemBelow ( )) |
814 | it-> moveItem ( it-> itemBelow ( )); | 815 | it-> moveItem ( it-> itemBelow ( )); |
815 | } | 816 | } |
816 | 817 | ||
817 | class ExEdit : public QLineEdit | 818 | class ExEdit : public QLineEdit |
818 | { | 819 | { |
819 | public: | 820 | public: |
820 | ExEdit ( ExceptListItem *item ) | 821 | ExEdit ( ExceptListItem *item ) |
821 | : QLineEdit ( item-> listView ( )-> viewport ( ), "exedit" ), it ( item ) | 822 | : QLineEdit ( item-> listView ( )-> viewport ( ), "exedit" ), it ( item ) |
822 | { | 823 | { |
823 | setFrame ( false ); | 824 | setFrame ( false ); |
824 | 825 | ||
825 | QRect r = it-> listView ( )-> itemRect ( it ); | 826 | QRect r = it-> listView ( )-> itemRect ( it ); |
826 | 827 | ||
827 | int x = it-> listView ( )-> header ( )-> cellPos ( 3 ) - 1; | 828 | int x = it-> listView ( )-> header ( )-> cellPos ( 3 ) - 1; |
828 | int y = r. y ( ); | 829 | int y = r. y ( ); |
829 | int w = it-> listView ( )-> viewport ( )-> width ( ) - x; | 830 | int w = it-> listView ( )-> viewport ( )-> width ( ) - x; |
830 | int h = r. height ( ); // + 2; | 831 | int h = r. height ( ); // + 2; |
831 | 832 | ||
832 | setText ( it-> pattern ( )); | 833 | setText ( it-> pattern ( )); |
833 | setGeometry ( x, y, w, h ); | 834 | setGeometry ( x, y, w, h ); |
834 | 835 | ||
835 | qDebug ( "ExEdit: [%s] at %d,%d %d,%d", it->text(2).latin1(),x,y,w,h); | 836 | odebug << "ExEdit: [" << it->text(2).latin1() << "] at " |
837 | << x << "," << y << " " << w << "," << h << oendl; | ||
836 | 838 | ||
837 | m_out = true; | 839 | m_out = true; |
838 | 840 | ||
839 | show ( ); | 841 | show ( ); |
840 | setFocus ( ); | 842 | setFocus ( ); |
841 | selectAll ( ); | 843 | selectAll ( ); |
842 | end ( true ); | 844 | end ( true ); |
843 | } | 845 | } |
844 | 846 | ||
845 | virtual void focusOutEvent ( QFocusEvent * ) | 847 | virtual void focusOutEvent ( QFocusEvent * ) |
846 | { | 848 | { |
847 | hide ( ); | 849 | hide ( ); |
848 | if ( m_out ) | 850 | if ( m_out ) |
849 | it-> setPattern ( text ( )); | 851 | it-> setPattern ( text ( )); |
850 | delete this; | 852 | delete this; |
851 | } | 853 | } |
852 | 854 | ||
853 | virtual void keyPressEvent ( QKeyEvent *e ) | 855 | virtual void keyPressEvent ( QKeyEvent *e ) |
854 | { | 856 | { |
855 | if ( e-> key ( ) == Key_Return ) | 857 | if ( e-> key ( ) == Key_Return ) |
856 | it-> listView ( )-> setFocus ( ); | 858 | it-> listView ( )-> setFocus ( ); |
857 | else if ( e-> key ( ) == Key_Escape ) | 859 | else if ( e-> key ( ) == Key_Escape ) |
858 | { | 860 | { |
859 | m_out = false; | 861 | m_out = false; |