Translations:KDevelop5/Manual/Code generation with templates/33/uk: Difference between revisions

From KDE UserBase Wiki
(Importing a new version from external source)
(No difference)

Revision as of 08:03, 16 September 2017

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (KDevelop5/Manual/Code generation with templates)
Clicking <menuchoice>> Next</menuchoice> brings up the ''Class Members'' dialog box where you can add members to a class. Depending on the selected template, these may appear in the new class as member variables, or the template may create properties with setters and getters for them. In a language where variable types have to be declared, such as C++, you have to specify both the type and the name of the member, such as <code>int number</code> or <code>QString name</code>. In other languages, you may leave out the type, but it is good practice to enter it anyway because the selected template could still make some use of it. Optionally you can rearrange the order of the class members by selecting a member and then hitting either <menuchoice>Move Up</menuchoice> or <menuchoice>Move Down</menuchoice>. The chosen order will be the sequence used in generating the source file.

Після натискання кнопки Далі буде показано сторінку, за допомогою якої ви можете додати до класу методи. Залежно від вибраного шаблона, методи може бути реалізовано у новому класі як змінні-елементи або може бути створено властивості з функціями встановлення та отримання значень. У мовах, де типи змінних слід оголошувати, зокрема у C++, вам слід вказати одразу тип і назву елемента, наприклад int number або QString name. У інших мовах можна не вказувати тип, але все ж варто його визначити, оскільки таке визначення може бути корисним для подальшої роботи з шаблоном.