Parcourir la source

Start implementing Help/News.
kdebase required to display proxy settings.


git-svn-id: file:///var/svn/tigccpp/trunk@715 9552661e-59e3-4036-b4f2-dbe53926924f

kevinkofler il y a 18 ans
Parent
commit
6da0826202
7 fichiers modifiés avec 214 ajouts et 5 suppressions
  1. 2 0
      ktigcc/INSTALL
  2. 4 2
      ktigcc/KTIGCC.prj
  3. 4 1
      ktigcc/fedora/ktigcc.spec
  4. 2 1
      ktigcc/ktigcc.pro
  5. 3 1
      ktigcc/mainform.ui.h
  6. 149 0
      ktigcc/newsdlg.ui
  7. 50 0
      ktigcc/newsdlg.ui.h

+ 2 - 0
ktigcc/INSTALL

@@ -14,6 +14,7 @@ WARNING: This section is ONLY for Fedora Core 5 (and possibly later versions,
         qt (NOT qt4)
         qt-devel (for the Qt Assistant help file viewer)
         kdelibs (obviously), version 3.5.2 or higher
+        kdebase (required for some features), version 3.5.2 or higher
         desktop-file-utils (for update-desktop-database)
         ctags (to locate C functions/prototypes)
         These can be installed with:
@@ -40,6 +41,7 @@ B. Installing KTIGCC from source
    kdelibs from KDE 3, version 3.5.2 or higher (*) (NOT KDE 4, which is not even
                                                     alpha at the time I'm
                                                     writing this)
+   kdebase from KDE 3 (should be the same version as kdelibs)
    Qt 3 Assistant (*) (often included in qt or qt-devel packages)
    pkg-config
    Exuberant Ctags - can be obtained from http://ctags.sourceforge.net

+ 4 - 2
ktigcc/KTIGCC.prj

@@ -80,7 +80,8 @@ module.include.files=\
 	tiemu_stub.h\
 	callbacks.h\
 	parsing.h\
-	functions.ui.h
+	functions.ui.h\
+	newsdlg.ui.h
 
 module.source.name=.
 module.source.type=
@@ -101,7 +102,8 @@ module.source.files=\
 	tiemu_stub.cpp\
 	callbacks.cpp\
 	parsing.cpp\
-	functions.ui
+	functions.ui\
+	newsdlg.ui
 
 module.pixmap.name=.
 module.pixmap.type=

+ 4 - 1
ktigcc/fedora/ktigcc.spec

@@ -12,7 +12,7 @@ Source: %{name}.tar.bz2
 Group: Development/Tools
 License: GPL
 BuildRequires: qt-devel >= 1:3.3.0 kdelibs-devel >= 6:3.5.2 glib2-devel >= 2.10.0 libticonv-devel >= 20060723 libticables2-devel >= 20060723 libtifiles2-devel >= 20060723 libticalcs2-devel >= 20060723 desktop-file-utils >= 0.10
-Requires: kdelibs >= 6:3.5.2 tigcc >= 1:0.96b06r1 /usr/bin/assistant ctags
+Requires: kdelibs >= 6:3.5.2 kdebase >= 6:3.5.2 tigcc >= 1:0.96b06r1 /usr/bin/assistant ctags
 Requires(post): desktop-file-utils >= 0.10
 Requires(postun): desktop-file-utils >= 0.10
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -67,6 +67,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc %{tigccdir}/doc/ktigcc
 
 %changelog
+* Wed Jul 26 2006 Kevin Kofler <Kevin@tigcc.ticalc.org>
+Require kdebase (needed at least for proxy settings).
+
 * Sun Jul 23 2006 Kevin Kofler <Kevin@tigcc.ticalc.org>
 Use libti*-devel instead of libti* in BuildRequires.
 BuildRequire libti* 20060723.

+ 2 - 1
ktigcc/ktigcc.pro

@@ -28,7 +28,8 @@ FORMS	= srcfilewin.ui \
 	mainform.ui \
 	errorlist.ui \
 	programoutput.ui \
-	functions.ui
+	functions.ui \
+	newsdlg.ui
 
 IMAGES	= images/00 \
 	images/01 \

+ 3 - 1
ktigcc/mainform.ui.h

@@ -99,6 +99,7 @@
 #include "callbacks.h"
 #include "parsing.h"
 #include "functions.h"
+#include "newsdlg.h"
 
 using std::puts;
 using std::exit;
@@ -4876,7 +4877,8 @@ void MainForm::helpSearch()
 
 void MainForm::helpNews()
 {
-  
+  NewsDialog newsDialog(this);
+  newsDialog.exec();
 }
 
 void MainForm::helpAbout()

+ 149 - 0
ktigcc/newsdlg.ui

@@ -0,0 +1,149 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>NewsDialog</class>
+<widget class="QDialog">
+    <property name="name">
+        <cstring>NewsDialog</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>427</width>
+            <height>424</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>TIGCC/*nix News</string>
+    </property>
+    <vbox>
+        <property name="name">
+            <cstring>unnamed</cstring>
+        </property>
+        <widget class="KPushButton">
+            <property name="name">
+                <cstring>proxySettingsButton</cstring>
+            </property>
+            <property name="text">
+                <string>Change KDE HTTP &amp;proxy settings...</string>
+            </property>
+            <property name="accel">
+                <string>Alt+P</string>
+            </property>
+        </widget>
+        <widget class="KListBox">
+            <property name="name">
+                <cstring>newsListBox</cstring>
+            </property>
+            <property name="selectionMode">
+                <enum>NoSelection</enum>
+            </property>
+        </widget>
+        <widget class="QLayoutWidget">
+            <property name="name">
+                <cstring>layout2</cstring>
+            </property>
+            <hbox>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="KPushButton">
+                    <property name="name">
+                        <cstring>refreshButton</cstring>
+                    </property>
+                    <property name="text">
+                        <string>&amp;Refresh</string>
+                    </property>
+                    <property name="accel">
+                        <string>Alt+R</string>
+                    </property>
+                </widget>
+                <widget class="KPushButton">
+                    <property name="name">
+                        <cstring>visitButton</cstring>
+                    </property>
+                    <property name="text">
+                        <string>&amp;Visit</string>
+                    </property>
+                    <property name="accel">
+                        <string>Alt+V</string>
+                    </property>
+                </widget>
+                <spacer>
+                    <property name="name">
+                        <cstring>spacer1</cstring>
+                    </property>
+                    <property name="orientation">
+                        <enum>Horizontal</enum>
+                    </property>
+                    <property name="sizeType">
+                        <enum>Expanding</enum>
+                    </property>
+                    <property name="sizeHint">
+                        <size>
+                            <width>101</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+                <widget class="KPushButton">
+                    <property name="name">
+                        <cstring>closeButton</cstring>
+                    </property>
+                    <property name="text">
+                        <string>&amp;Close</string>
+                    </property>
+                    <property name="accel">
+                        <string>Alt+C</string>
+                    </property>
+                    <property name="stdItem" stdset="0">
+                        <number>13</number>
+                    </property>
+                </widget>
+            </hbox>
+        </widget>
+    </vbox>
+</widget>
+<connections>
+    <connection>
+        <sender>proxySettingsButton</sender>
+        <signal>clicked()</signal>
+        <receiver>NewsDialog</receiver>
+        <slot>proxySettingsButton_clicked()</slot>
+    </connection>
+    <connection>
+        <sender>refreshButton</sender>
+        <signal>clicked()</signal>
+        <receiver>NewsDialog</receiver>
+        <slot>refreshButton_clicked()</slot>
+    </connection>
+    <connection>
+        <sender>visitButton</sender>
+        <signal>clicked()</signal>
+        <receiver>NewsDialog</receiver>
+        <slot>visitButton_clicked()</slot>
+    </connection>
+    <connection>
+        <sender>closeButton</sender>
+        <signal>clicked()</signal>
+        <receiver>NewsDialog</receiver>
+        <slot>close()</slot>
+    </connection>
+</connections>
+<includes>
+    <include location="local" impldecl="in implementation">newsdlg.ui.h</include>
+</includes>
+<slots>
+    <slot>proxySettingsButton_clicked()</slot>
+    <slot>refreshButton_clicked()</slot>
+    <slot>visitButton_clicked()</slot>
+</slots>
+<pixmapinproject/>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+    <includehint>kpushbutton.h</includehint>
+    <includehint>klistbox.h</includehint>
+    <includehint>kpushbutton.h</includehint>
+    <includehint>kpushbutton.h</includehint>
+    <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>

+ 50 - 0
ktigcc/newsdlg.ui.h

@@ -0,0 +1,50 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you want to add, delete, or rename functions or slots, use
+** Qt Designer to update this file, preserving your code.
+**
+** You should not define a constructor or destructor in this file.
+** Instead, write your code in functions called init() and destroy().
+** These will automatically be called by the form's constructor and
+** destructor.
+*****************************************************************************/
+
+/*
+   ktigcc - TIGCC IDE for KDE
+
+   Copyright (C) 2006 Kevin Kofler
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+*/
+
+#include <kcmultidialog.h>
+
+void NewsDialog::proxySettingsButton_clicked()
+{
+  KCMultiDialog proxySettings(this);
+  proxySettings.addModule("proxy");
+  proxySettings.exec();
+}
+
+void NewsDialog::refreshButton_clicked()
+{
+
+}
+
+void NewsDialog::visitButton_clicked()
+{
+
+}