OllamaInterface/OllamaWidget.ui

Wed, 28 Aug 2024 18:20:33 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 28 Aug 2024 18:20:33 +0200
changeset 12
cf507e6f12d7
parent 8
3118d16e526e
child 20
8cb7bfe07e15
permissions
-rw-r--r--

Changed the message input widget to a QPlainTextEdit to be able to enter longer texts.

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>OllamaWidget</class>
 <widget class="QWidget" name="OllamaWidget">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>553</width>
    <height>762</height>
   </rect>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout">
   <item>
    <layout class="QHBoxLayout" name="horizontalLayout_2">
     <item>
      <spacer name="horizontalSpacer">
       <property name="orientation">
        <enum>Qt::Horizontal</enum>
       </property>
       <property name="sizeHint" stdset="0">
        <size>
         <width>40</width>
         <height>20</height>
        </size>
       </property>
      </spacer>
     </item>
     <item>
      <widget class="QLabel" name="ollamaVersionLabel"/>
     </item>
     <item>
      <spacer name="horizontalSpacer_2">
       <property name="orientation">
        <enum>Qt::Horizontal</enum>
       </property>
       <property name="sizeHint" stdset="0">
        <size>
         <width>40</width>
         <height>20</height>
        </size>
       </property>
      </spacer>
     </item>
     <item>
      <widget class="EricToolButton" name="ollamaMenuButton">
       <property name="popupMode">
        <enum>QToolButton::InstantPopup</enum>
       </property>
      </widget>
     </item>
    </layout>
   </item>
   <item>
    <layout class="QHBoxLayout" name="horizontalLayout">
     <item>
      <widget class="QToolButton" name="reloadModelsButton">
       <property name="toolTip">
        <string>Press to reload the models list and update the 'ollama' version information.</string>
       </property>
       <property name="statusTip">
        <string>Select to reload the list of selectable models.</string>
       </property>
      </widget>
     </item>
     <item>
      <widget class="QComboBox" name="modelComboBox">
       <property name="sizePolicy">
        <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
       <property name="statusTip">
        <string>Select the model for the chat.</string>
       </property>
      </widget>
     </item>
     <item>
      <widget class="QToolButton" name="newChatButton">
       <property name="toolTip">
        <string>Press to start a new chat.</string>
       </property>
      </widget>
     </item>
    </layout>
   </item>
   <item>
    <widget class="QSplitter" name="mainSplitter">
     <property name="orientation">
      <enum>Qt::Vertical</enum>
     </property>
     <widget class="QScrollArea" name="historyScrollArea">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
      <property name="horizontalScrollBarPolicy">
       <enum>Qt::ScrollBarAlwaysOff</enum>
      </property>
      <property name="widgetResizable">
       <bool>true</bool>
      </property>
      <widget class="QWidget" name="historyScrollWidget">
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
         <width>533</width>
         <height>68</height>
        </rect>
       </property>
      </widget>
     </widget>
     <widget class="QStackedWidget" name="chatStackWidget">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
     </widget>
     <widget class="QWidget" name="">
      <layout class="QGridLayout" name="gridLayout">
       <item row="0" column="0" rowspan="2">
        <widget class="QPlainTextEdit" name="messageEdit">
         <property name="toolTip">
          <string>Enter the message to be sent to the 'ollama' server.</string>
         </property>
         <property name="tabChangesFocus">
          <bool>true</bool>
         </property>
         <property name="placeholderText">
          <string>Enter Message</string>
         </property>
        </widget>
       </item>
       <item row="1" column="1">
        <spacer name="verticalSpacer">
         <property name="orientation">
          <enum>Qt::Vertical</enum>
         </property>
         <property name="sizeHint" stdset="0">
          <size>
           <width>20</width>
           <height>40</height>
          </size>
         </property>
        </spacer>
       </item>
       <item row="0" column="1">
        <widget class="QToolButton" name="sendButton">
         <property name="enabled">
          <bool>false</bool>
         </property>
         <property name="toolTip">
          <string>Press to send the message of the current chat to the 'ollama' server.</string>
         </property>
        </widget>
       </item>
      </layout>
     </widget>
    </widget>
   </item>
  </layout>
 </widget>
 <customwidgets>
  <customwidget>
   <class>EricToolButton</class>
   <extends>QToolButton</extends>
   <header>eric7/EricWidgets/EricToolButton.h</header>
  </customwidget>
 </customwidgets>
 <tabstops>
  <tabstop>modelComboBox</tabstop>
  <tabstop>newChatButton</tabstop>
  <tabstop>reloadModelsButton</tabstop>
  <tabstop>historyScrollArea</tabstop>
  <tabstop>ollamaMenuButton</tabstop>
 </tabstops>
 <resources/>
 <connections/>
</ui>

eric ide

mercurial